summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowstheme.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2012-03-07 08:56:41 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-07 12:43:32 +0100
commit83cabda862dced9477d155c84df9440047c856cf (patch)
tree9f39de378bfeed923d2a35e433481e4da1dc0f32 /src/plugins/platforms/windows/qwindowstheme.h
parent7439fb47cd7c5731dd1aadeaf10c46b58aa59798 (diff)
Add fonts to QPlatformTheme.
- Remove QPlatformFontDatabase::defaultFonts() returning a hash containing widget name ->font and the Windows implementation. - Add enumeration and font accessor to QPlatformTheme. The value returned for the enumeration value overwrites the default font of the font database. - Implement for Windows, Mac and KDE. - Add more Windows palettes. Task-number: QTBUG-23686 Change-Id: I8a2abdfd216df23daa7c9630c54264cdf61295db Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowstheme.h')
-rw-r--r--src/plugins/platforms/windows/qwindowstheme.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qwindowstheme.h b/src/plugins/platforms/windows/qwindowstheme.h
index 950c380737..37346eed3a 100644
--- a/src/plugins/platforms/windows/qwindowstheme.h
+++ b/src/plugins/platforms/windows/qwindowstheme.h
@@ -64,14 +64,20 @@ public:
virtual QVariant themeHint(ThemeHint) const;
virtual const QPalette *palette(Palette type = SystemPalette) const
{ return m_palettes[type]; }
+ virtual const QFont *font(Font type = SystemFont) const
+ { return m_fonts[type]; }
void windowsThemeChanged(QWindow *window);
private:
- void refresh();
+ void refresh() { refreshPalettes(); refreshFonts(); }
void clearPalettes();
+ void refreshPalettes();
+ void clearFonts();
+ void refreshFonts();
QPalette *m_palettes[NPalettes];
+ QFont *m_fonts[NFonts];
};
static inline COLORREF qColorToCOLORREF(const QColor &color)