summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qs60style_p.h
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2009-04-30 09:26:14 (GMT)
committerJason Barron <jbarron@trolltech.com>2009-04-30 09:26:14 (GMT)
commit4b1137345a0bbfedc348b020ad0ad6e5720eb6d1 (patch)
tree5b3d5981f01dd14ce414a286d0e3beb2edfd70aa /src/gui/styles/qs60style_p.h
parent9b091d474a0584ea5aa271d466833cfb24e9a5da (diff)
downloadQt-4b1137345a0bbfedc348b020ad0ad6e5720eb6d1.zip
Qt-4b1137345a0bbfedc348b020ad0ad6e5720eb6d1.tar.gz
Qt-4b1137345a0bbfedc348b020ad0ad6e5720eb6d1.tar.bz2
Avoid overwriting a user set palette.
The polish(QWidget*) function is called the first time a widget is shown and therefore setting the widget's palette in this function will overwrite the user set palette if one is specified before show() is called. The solution is to break this into two parts, the first part sets the global palette in polish(QApplication*) and this is the part of the palette that is independent of widget. The second part involves adding the widget specific palettes using the QApplication:: setPalette() function that takes a classname and this is done in the polish(QWidget*) function.
Diffstat (limited to 'src/gui/styles/qs60style_p.h')
-rw-r--r--src/gui/styles/qs60style_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/styles/qs60style_p.h b/src/gui/styles/qs60style_p.h
index c11d89a..88f0864 100644
--- a/src/gui/styles/qs60style_p.h
+++ b/src/gui/styles/qs60style_p.h
@@ -307,7 +307,7 @@ public:
static bool isTouchSupported();
// calculates average color based on button skin graphics (minus borders).
QColor colorFromFrameGraphics(QS60StylePrivate::SkinFrameElements frame) const;
- void setThemePalette(QWidget *widget) const;
+ void setThemePalette(QApplication *application) const;
static int focusRectPenWidth();