diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-07-14 11:21:02 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-07-14 11:21:02 -0600 |
commit | 157799cd6ecdf571c268cdb80aff8ab988535852 (patch) | |
tree | bd1292212da5919bd66724750989fbfe5384da1e /NxWidgets | |
parent | dfaebc058783564a1c858345eb86fab1014d9934 (diff) | |
download | px4-nuttx-157799cd6ecdf571c268cdb80aff8ab988535852.tar.gz px4-nuttx-157799cd6ecdf571c268cdb80aff8ab988535852.tar.bz2 px4-nuttx-157799cd6ecdf571c268cdb80aff8ab988535852.zip |
NxWM: Toolbar font ID can now be separately configured
Diffstat (limited to 'NxWidgets')
-rw-r--r-- | NxWidgets/Kconfig | 21 | ||||
-rw-r--r-- | NxWidgets/nxwm/include/nxwmconfig.hxx | 6 | ||||
-rw-r--r-- | NxWidgets/nxwm/src/capplicationwindow.cxx | 2 |
3 files changed, 26 insertions, 3 deletions
diff --git a/NxWidgets/Kconfig b/NxWidgets/Kconfig index 8495d0908..2f91b0308 100644 --- a/NxWidgets/Kconfig +++ b/NxWidgets/Kconfig @@ -562,6 +562,23 @@ config NXWM_TOOLBAR_HEIGHT icons are selected 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 menu "NxWM Application Window Configuration" @@ -713,7 +730,7 @@ config NXWM_NXCONSOLE_CUSTOM_FONTID bool "Use Custom Default Font" default n ---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 @@ -1074,7 +1091,7 @@ config NXWM_HEXCALCULATOR_CUSTOM_FONTID bool "Use Custom Default Font" default n ---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 diff --git a/NxWidgets/nxwm/include/nxwmconfig.hxx b/NxWidgets/nxwm/include/nxwmconfig.hxx index 453ab0421..d6202c066 100644 --- a/NxWidgets/nxwm/include/nxwmconfig.hxx +++ b/NxWidgets/nxwm/include/nxwmconfig.hxx @@ -276,6 +276,12 @@ (CONFIG_NXWM_TASKBAR_ICONHEIGHT + 2*CONFIG_NXWM_TASKBAR_HSPACING) #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 **********************************************************/ /** * CONFIG_NXWM_BACKGROUND_IMAGE - The name of the image to use in the diff --git a/NxWidgets/nxwm/src/capplicationwindow.cxx b/NxWidgets/nxwm/src/capplicationwindow.cxx index 77d196d07..0c1bb1a96 100644 --- a/NxWidgets/nxwm/src/capplicationwindow.cxx +++ b/NxWidgets/nxwm/src/capplicationwindow.cxx @@ -307,7 +307,7 @@ bool CApplicationWindow::open(void) // The rest of the toolbar will hold the left-justified application label // 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_TRANSPARENT_COLOR); if (!m_windowFont) |