NxWM: Toolbar font ID can now be separately configured

This commit is contained in:
Gregory Nutt 2014-07-14 11:21:02 -06:00
parent f57ae7d18d
commit df63f41fbf
3 changed files with 26 additions and 3 deletions

21
Kconfig
View File

@ -562,6 +562,23 @@ config NXWM_TOOLBAR_HEIGHT
icons are selected icons are selected
endif # NXWM_CUSTOM_TOOLBAR_HEIGHT endif # NXWM_CUSTOM_TOOLBAR_HEIGHT
config NXWM_TOOLBAR_CUSTOM_FONTID
bool "Use Custom Toolbar Font"
default n
---help---
Set to override the NxWM default font id (NXWM_DEFAULT_FONTID).
if NXWM_TOOLBAR_CUSTOM_FONTID
config NXWM_TOOLBAR_FONTID
int "Toolbar Font ID"
default 0
---help---
Use this default font ID in the NxConsole window instead of the
NxWM font ID (NXWM_DEFAULT_FONTID). Default: 0 (maybe invalid)
endif # NXWM_TOOLBAR_CUSTOM_FONTID
endmenu # NxWM Toolbar Configuration endmenu # NxWM Toolbar Configuration
menu "NxWM Application Window Configuration" menu "NxWM Application Window Configuration"
@ -713,7 +730,7 @@ config NXWM_NXCONSOLE_CUSTOM_FONTID
bool "Use Custom Default Font" bool "Use Custom Default Font"
default n default n
---help--- ---help---
Set to override the system default font id (NXWM_DEFAULT_FONTID). Set to override the NxWM default font id (NXWM_DEFAULT_FONTID).
if NXWM_NXCONSOLE_CUSTOM_FONTID if NXWM_NXCONSOLE_CUSTOM_FONTID
@ -1074,7 +1091,7 @@ config NXWM_HEXCALCULATOR_CUSTOM_FONTID
bool "Use Custom Default Font" bool "Use Custom Default Font"
default n default n
---help--- ---help---
Set to override the system default font id (NXWM_DEFAULT_FONTID). Set to override the NxWM default font id (NXWM_DEFAULT_FONTID).
if NXWM_HEXCALCULATOR_CUSTOM_FONTID if NXWM_HEXCALCULATOR_CUSTOM_FONTID

View File

@ -276,6 +276,12 @@
(CONFIG_NXWM_TASKBAR_ICONHEIGHT + 2*CONFIG_NXWM_TASKBAR_HSPACING) (CONFIG_NXWM_TASKBAR_ICONHEIGHT + 2*CONFIG_NXWM_TASKBAR_HSPACING)
#endif #endif
/* CONFIG_NXWM_TOOLBAR_FONTID overrides the default NxWM font selection */
#ifndef CONFIG_NXWM_TOOLBAR_FONTID
# define CONFIG_NXWM_TOOLBAR_FONTID CONFIG_NXWM_DEFAULT_FONTID
#endif
/* Background Image **********************************************************/ /* Background Image **********************************************************/
/** /**
* CONFIG_NXWM_BACKGROUND_IMAGE - The name of the image to use in the * CONFIG_NXWM_BACKGROUND_IMAGE - The name of the image to use in the

View File

@ -307,7 +307,7 @@ bool CApplicationWindow::open(void)
// The rest of the toolbar will hold the left-justified application label // The rest of the toolbar will hold the left-justified application label
// Create the default font instance // Create the default font instance
m_windowFont = new NXWidgets::CNxFont(CONFIG_NXWM_DEFAULT_FONTID, m_windowFont = new NXWidgets::CNxFont((nx_fontid_e)CONFIG_NXWM_TOOLBAR_FONTID,
CONFIG_NXWM_DEFAULT_FONTCOLOR, CONFIG_NXWM_DEFAULT_FONTCOLOR,
CONFIG_NXWM_TRANSPARENT_COLOR); CONFIG_NXWM_TRANSPARENT_COLOR);
if (!m_windowFont) if (!m_windowFont)