author | sandman <sandman> | 2002-09-21 01:34:45 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-09-21 01:34:45 (UTC) |
commit | 1a8d7cd34db3b9f443bcb956f85c41336a60e948 (patch) (unidiff) | |
tree | 678ab5558ea35ca4e5ce454d49d70ec9595d64f7 | |
parent | 804a06520928973d706bf827209f8a7625010b7f (diff) | |
download | opie-1a8d7cd34db3b9f443bcb956f85c41336a60e948.zip opie-1a8d7cd34db3b9f443bcb956f85c41336a60e948.tar.gz opie-1a8d7cd34db3b9f443bcb956f85c41336a60e948.tar.bz2 |
Workaround for a (IMHO) design-flaw in the style/palette handling. Styles
like liquid that need to recalculate things on a palette change can get
seriously confused when a class specific palette is polished
-rw-r--r-- | qt/qte234-for-opie091-setpalette.patch | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/qt/qte234-for-opie091-setpalette.patch b/qt/qte234-for-opie091-setpalette.patch new file mode 100644 index 0000000..2aee4e5 --- a/dev/null +++ b/qt/qte234-for-opie091-setpalette.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | --- src/kernel/qapplication.cpp.origSat Sep 21 05:01:47 2002 | ||
2 | +++ src/kernel/qapplication.cppSat Sep 21 05:24:42 2002 | ||
3 | @@ -1187,8 +1187,19 @@ | ||
4 | { | ||
5 | QPalette pal = palette; | ||
6 | #ifndef QT_NO_STYLE | ||
7 | - if ( !startingUp() ) | ||
8 | + if ( !startingUp() ) { | ||
9 | qApp->style().polish( pal );// NB: non-const reference | ||
10 | +if ( className ) { | ||
11 | + // if we just polished a class specific palette (this normally | ||
12 | + // only called by qt_fix_tooltips - see below), we better re- | ||
13 | + // polish the global palette. Some styles like liquid can get | ||
14 | + // confused, because they can not detect if the polished palette | ||
15 | + // is the global one or only a class specific one. | ||
16 | + // (liquid uses this palette to calculate blending pixmaps) | ||
17 | + QPalette p = qApp-> palette ( ); | ||
18 | + qApp->style().polish ( p ); | ||
19 | +} | ||
20 | + } | ||
21 | #endif | ||
22 | bool all = FALSE; | ||
23 | if ( !className ) { | ||