From eff93621daf43e9a7d3672175a6503a633e9d4a0 Mon Sep 17 00:00:00 2001 From: Mavridis Philippe Date: Sat, 1 May 2021 15:14:43 +0300 Subject: Added customization options for Kxkb Signed-off-by: Mavridis Philippe --- kxkb/pixmap.h | 48 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 16 deletions(-) (limited to 'kxkb/pixmap.h') diff --git a/kxkb/pixmap.h b/kxkb/pixmap.h index 7070d91b2..2fd6c2a3c 100644 --- a/kxkb/pixmap.h +++ b/kxkb/pixmap.h @@ -6,26 +6,42 @@ #include #include +#include "kxkbconfig.h" + +enum PixmapStyle { + PIXMAP_STYLE_NORMAL = 0, + PIXMAP_STYLE_INDICATOR = 1, + PIXMAP_STYLE_CONTEXTMENU = 2 +}; class LayoutIcon { private: - static LayoutIcon* instance; - static const TQString flagTemplate; - - TQDict m_pixmapCache; - TQFont m_labelFont; - - LayoutIcon(); - TQPixmap* createErrorPixmap(); - void dimPixmap(TQPixmap& pixmap); - TQString getCountryFromLayoutName(const TQString& layoutName); - - public: - static const TQString& ERROR_CODE; - - static LayoutIcon& getInstance(); - const TQPixmap& findPixmap(const TQString& code, bool showFlag, const TQString& displayName=""); + static LayoutIcon* instance; + static const TQString flagTemplate; + + KxkbConfig m_kxkbConfig; + bool m_showFlag; + bool m_showLabel; + TQColor m_bgColor; + TQColor m_fgColor; + TQFont m_labelFont; + bool m_labelShadow; + TQColor m_shColor; + bool m_fitToBox; + + TQDict m_pixmapCache; + + LayoutIcon(); + TQPixmap* createErrorPixmap(); + void dimPixmap(TQPixmap& pixmap); + TQString getCountryFromLayoutName(const TQString& layoutName); + +public: + static const TQString& ERROR_CODE; + + static LayoutIcon& getInstance(); + const TQPixmap& findPixmap(const TQString& code, int pixmapStyle, const TQString& displayName=""); }; #endif -- cgit v1.2.1