author | sandman <sandman> | 2002-12-08 23:12:16 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-12-08 23:12:16 (UTC) |
commit | 5f4bc1a6f31d713c97b8382b6e2acd12a7f9bfd6 (patch) (unidiff) | |
tree | 52c1fcf139914d41b8dfb03fc4e954f95e5e7aef | |
parent | 7b38c0424eca2f49a0c9a931766c816e21f1d86b (diff) | |
download | opie-5f4bc1a6f31d713c97b8382b6e2acd12a7f9bfd6.zip opie-5f4bc1a6f31d713c97b8382b6e2acd12a7f9bfd6.tar.gz opie-5f4bc1a6f31d713c97b8382b6e2acd12a7f9bfd6.tar.bz2 |
removed some clumsy workarounds for old (unpatched) libqte's
-rw-r--r-- | noncore/styles/liquid/liquid.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/noncore/styles/liquid/liquid.cpp b/noncore/styles/liquid/liquid.cpp index 4a65952..bac882c 100644 --- a/noncore/styles/liquid/liquid.cpp +++ b/noncore/styles/liquid/liquid.cpp | |||
@@ -165,25 +165,19 @@ bool TransMenuHandler::eventFilter(QObject *obj, QEvent *ev) | |||
165 | } | 165 | } |
166 | } | 166 | } |
167 | return(false); | 167 | return(false); |
168 | } | 168 | } |
169 | 169 | ||
170 | 170 | ||
171 | static int qt_version ( ) | ||
172 | { | ||
173 | const char *qver = qVersion ( ); | ||
174 | return ( qver [0] - '0' ) * 100 + ( qver [2] - '0' ) * 10 + ( qver [4] - '0' ); | ||
175 | } | ||
176 | 171 | ||
177 | 172 | ||
178 | LiquidStyle::LiquidStyle() | 173 | LiquidStyle::LiquidStyle() |
179 | :QWindowsStyle() | 174 | :QWindowsStyle() |
180 | { | 175 | { |
181 | setName ( "LiquidStyle" ); | 176 | setName ( "LiquidStyle" ); |
182 | 177 | ||
183 | oldqte = ( qt_version ( ) < 234 ); | ||
184 | flatTBButtons = false; | 178 | flatTBButtons = false; |
185 | currentHeader = 0; | 179 | currentHeader = 0; |
186 | 180 | ||
187 | btnMaskBmp = QBitmap(37, 26, buttonmask_bits, true); | 181 | btnMaskBmp = QBitmap(37, 26, buttonmask_bits, true); |
188 | btnMaskBmp.setMask(btnMaskBmp); | 182 | btnMaskBmp.setMask(btnMaskBmp); |
189 | htmlBtnMaskBmp = QBitmap(37, 26, htmlbuttonmask_bits, true); | 183 | htmlBtnMaskBmp = QBitmap(37, 26, htmlbuttonmask_bits, true); |
@@ -704,16 +698,14 @@ void LiquidStyle::polish(QPalette &appPal) | |||
704 | contrast = 10; | 698 | contrast = 10; |
705 | 699 | ||
706 | // QPalette pal = QApplication::palette(); | 700 | // QPalette pal = QApplication::palette(); |
707 | 701 | ||
708 | // button color stuff | 702 | // button color stuff |
709 | config. setGroup ( "Appearance" ); | 703 | config. setGroup ( "Appearance" ); |
710 | QColor c = oldqte ? QColor ( config. readEntry("Button", ( Qt::lightGray ). name ( ))) | 704 | QColor c = appPal. color ( QPalette::Active, QColorGroup::Button ); |
711 | : appPal. color ( QPalette::Active, QColorGroup::Button ); | 705 | if ( c == appPal. color ( QPalette::Active, QColorGroup::Background )) { |
712 | if ( c == ( oldqte ? QColor ( config. readEntry ( "background", ( Qt::lightGray ). name ( ))) | ||
713 | : appPal. color ( QPalette::Active, QColorGroup::Background ))) { | ||
714 | // force button color to be different from background | 706 | // force button color to be different from background |
715 | QBrush btnBrush(QColor(200, 202, 228)); | 707 | QBrush btnBrush(QColor(200, 202, 228)); |
716 | appPal.setBrush(QColorGroup::Button, btnBrush); | 708 | appPal.setBrush(QColorGroup::Button, btnBrush); |
717 | } | 709 | } |
718 | c.hsv(&btnH, &btnS, &btnV); | 710 | c.hsv(&btnH, &btnS, &btnV); |
719 | c.light(120).hsv(&btnHoverH, &btnHoverS, &btnHoverV); | 711 | c.light(120).hsv(&btnHoverH, &btnHoverS, &btnHoverV); |
@@ -758,14 +750,13 @@ void LiquidStyle::polish(QPalette &appPal) | |||
758 | smallBevelFillDict.insert(c.rgb(), pix); | 750 | smallBevelFillDict.insert(c.rgb(), pix); |
759 | } | 751 | } |
760 | // pagerBrush.setColor(c); | 752 | // pagerBrush.setColor(c); |
761 | // pagerBrush.setPixmap(*pix); | 753 | // pagerBrush.setPixmap(*pix); |
762 | 754 | ||
763 | // background color stuff | 755 | // background color stuff |
764 | c = oldqte ? QColor ( config. readEntry ( "Background", ( Qt::lightGray ).name ( ))) | 756 | c = appPal. color ( QPalette::Active, QColorGroup::Background ); |
765 | : appPal. color ( QPalette::Active, QColorGroup::Background ); | ||
766 | 757 | ||
767 | c.hsv(&bH, &bS, &bV); | 758 | c.hsv(&bH, &bS, &bV); |
768 | c.light(120).hsv(&bHoverH, &bHoverS, &bHoverV); | 759 | c.light(120).hsv(&bHoverH, &bHoverS, &bHoverV); |
769 | 760 | ||
770 | // FIXME? | 761 | // FIXME? |
771 | if(vsbSliderFillPix) | 762 | if(vsbSliderFillPix) |