From 157799cd6ecdf571c268cdb80aff8ab988535852 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 14 Jul 2014 11:21:02 -0600 Subject: NxWM: Toolbar font ID can now be separately configured --- NxWidgets/Kconfig | 21 +++++++++++++++++++-- NxWidgets/nxwm/include/nxwmconfig.hxx | 6 ++++++ NxWidgets/nxwm/src/capplicationwindow.cxx | 2 +- 3 files changed, 26 insertions(+), 3 deletions(-) (limited to 'NxWidgets') 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) -- cgit v1.2.3