From 7ef1ad19448670543bece35c3a6119e6a440c778 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 15 Oct 2013 14:29:06 -0600 Subject: Use NxWidgets::CScaledBitmap to scale icons in the NxWM taskbar --- NxWidgets/nxwm/include/ctaskbar.hxx | 4 ++-- NxWidgets/nxwm/include/nxwmconfig.hxx | 24 ++++++++++++++++++++++-- 2 files changed, 24 insertions(+), 4 deletions(-) (limited to 'NxWidgets/nxwm/include') diff --git a/NxWidgets/nxwm/include/ctaskbar.hxx b/NxWidgets/nxwm/include/ctaskbar.hxx index 84c7b28f4..cbd35b52f 100644 --- a/NxWidgets/nxwm/include/ctaskbar.hxx +++ b/NxWidgets/nxwm/include/ctaskbar.hxx @@ -92,8 +92,8 @@ namespace NxWM struct STaskbarSlot { - IApplication *app; /**< A reference to the icon */ - NXWidgets::CImage *image; /**< The icon image that goes with the application */ + IApplication *app; /**< A reference to the application */ + NXWidgets::CImage *image; /**< The icon image for the application */ }; /** diff --git a/NxWidgets/nxwm/include/nxwmconfig.hxx b/NxWidgets/nxwm/include/nxwmconfig.hxx index 6e540fefc..7715224e2 100644 --- a/NxWidgets/nxwm/include/nxwmconfig.hxx +++ b/NxWidgets/nxwm/include/nxwmconfig.hxx @@ -223,6 +223,24 @@ # define CONFIG_NXWM_TASKBAR_TOP 1 #endif +// Taskbar ICON scaling + +#ifdef CONFIG_NXWM_TASKBAR_ICONSCALE +# ifndef CONFIG_NXWM_TASKBAR_ICONWIDTH +# error Scaling requires CONFIG_NXWM_TASKBAR_ICONWIDTH +# define CONFIG_NXWM_TASKBAR_ICONWIDTH 50 +# endif +# ifndef CONFIG_NXWM_TASKBAR_ICONHEIGHT +# error Scaling requires CONFIG_NXWM_TASKBAR_ICONHEIGHT +# define CONFIG_NXWM_TASKBAR_ICONHEIGHT 42 +# endif +#else +# undef CONFIG_NXWM_TASKBAR_ICONWIDTH +# define CONFIG_NXWM_TASKBAR_ICONWIDTH 25 // Used below +# undef CONFIG_NXWM_TASKBAR_ICONHEIGHT +# define CONFIG_NXWM_TASKBAR_ICONHEIGHT 21 // Used below (NOT) +#endif + /** * At present, all icons are 25 pixels in "width" and, hence require a * task bar of at least that size. @@ -230,9 +248,11 @@ #ifndef CONFIG_NXWM_TASKBAR_WIDTH # if defined(CONFIG_NXWM_TASKBAR_TOP) || defined(CONFIG_NXWM_TASKBAR_BOTTOM) -# define CONFIG_NXWM_TASKBAR_WIDTH (25+2*CONFIG_NXWM_TASKBAR_HSPACING) +# define CONFIG_NXWM_TASKBAR_WIDTH \ + (CONFIG_NXWM_TASKBAR_ICONWIDTH+2*CONFIG_NXWM_TASKBAR_HSPACING) # else -# define CONFIG_NXWM_TASKBAR_WIDTH (25+2*CONFIG_NXWM_TASKBAR_VSPACING) +# define CONFIG_NXWM_TASKBAR_WIDTH \ + (CONFIG_NXWM_TASKBAR_ICONWIDTH+2*CONFIG_NXWM_TASKBAR_VSPACING) # endif #endif -- cgit v1.2.3