Diffstat (limited to 'noncore/styles/liquid/liquid.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/styles/liquid/liquid.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/noncore/styles/liquid/liquid.cpp b/noncore/styles/liquid/liquid.cpp index 22bf8af..0d9d259 100644 --- a/noncore/styles/liquid/liquid.cpp +++ b/noncore/styles/liquid/liquid.cpp | |||
@@ -685,7 +685,6 @@ QPixmap* LiquidStyle::getPixmap(BitmapData item) | |||
685 | 685 | ||
686 | void LiquidStyle::polish(QPalette &appPal) | 686 | void LiquidStyle::polish(QPalette &appPal) |
687 | { | 687 | { |
688 | |||
689 | int i; | 688 | int i; |
690 | for(i=0; i < BITMAP_ITEMS; ++i){ | 689 | for(i=0; i < BITMAP_ITEMS; ++i){ |
691 | if(pixmaps[i]){ | 690 | if(pixmaps[i]){ |
@@ -718,12 +717,15 @@ void LiquidStyle::polish(QPalette &appPal) | |||
718 | else if ( contrast > 10 ) | 717 | else if ( contrast > 10 ) |
719 | contrast = 10; | 718 | contrast = 10; |
720 | 719 | ||
721 | QPalette pal = QApplication::palette(); | 720 | // QPalette pal = QApplication::palette(); |
722 | 721 | ||
723 | // button color stuff | 722 | // button color stuff |
724 | config. setGroup ( "Appearance" ); | 723 | config. setGroup ( "Appearance" ); |
725 | QColor c = QColor ( config. readEntry("Button", ( Qt::lightGray ). name ( ))); | 724 | QColor c = // QColor ( config. readEntry("Button", ( Qt::lightGray ). name ( ))); |
726 | if ( c == QColor ( config. readEntry ( "background", ( Qt::lightGray ). name ( )))) { | 725 | appPal. color ( QPalette::Active, QColorGroup::Button ); |
726 | if ( c == appPal. color ( QPalette::Active, QColorGroup::Background ) | ||
727 | //QColor ( config. readEntry ( "background", ( Qt::lightGray ). name ( ))) | ||
728 | ) { | ||
727 | // force button color to be different from background | 729 | // force button color to be different from background |
728 | QBrush btnBrush(QColor(200, 202, 228)); | 730 | QBrush btnBrush(QColor(200, 202, 228)); |
729 | appPal.setBrush(QColorGroup::Button, btnBrush); | 731 | appPal.setBrush(QColorGroup::Button, btnBrush); |
@@ -774,7 +776,7 @@ void LiquidStyle::polish(QPalette &appPal) | |||
774 | pagerBrush.setPixmap(*pix); | 776 | pagerBrush.setPixmap(*pix); |
775 | 777 | ||
776 | // background color stuff | 778 | // background color stuff |
777 | c = QColor ( config. readEntry ( "Background", ( Qt::lightGray ).name ( ))); | 779 | c = /*QColor ( config. readEntry ( "Background", ( Qt::lightGray ).name ( )));*/ appPal. color ( QPalette::Active, QColorGroup::Background ); |
778 | c.hsv(&bH, &bS, &bV); | 780 | c.hsv(&bH, &bS, &bV); |
779 | c.light(120).hsv(&bHoverH, &bHoverS, &bHoverV); | 781 | c.light(120).hsv(&bHoverH, &bHoverS, &bHoverV); |
780 | 782 | ||
@@ -800,7 +802,7 @@ void LiquidStyle::polish(QPalette &appPal) | |||
800 | appPal.setBrush(QColorGroup::Background, bgBrush); | 802 | appPal.setBrush(QColorGroup::Background, bgBrush); |
801 | 803 | ||
802 | // lineedits | 804 | // lineedits |
803 | c = QColor ( config. readEntry("Base", ( Qt::white). name ( ))); | 805 | c = /*QColor ( config. readEntry("Base", ( Qt::white). name ( )));*/ appPal. color ( QPalette::Active, QColorGroup::Base ); |
804 | QPixmap basePix; | 806 | QPixmap basePix; |
805 | basePix.resize(32, 32); | 807 | basePix.resize(32, 32); |
806 | basePix.fill(c.rgb()); | 808 | basePix.fill(c.rgb()); |
@@ -825,7 +827,6 @@ void LiquidStyle::polish(QPalette &appPal) | |||
825 | applyCustomAttributes((QPushButton *)w); | 827 | applyCustomAttributes((QPushButton *)w); |
826 | } | 828 | } |
827 | } | 829 | } |
828 | |||
829 | } | 830 | } |
830 | 831 | ||
831 | void LiquidStyle::polish(QWidget *w) | 832 | void LiquidStyle::polish(QWidget *w) |
@@ -948,7 +949,7 @@ void LiquidStyle::unPolish(QWidget *w) | |||
948 | ((qstrcmp(w->parent()->name(), "qt_viewport") == 0) || | 949 | ((qstrcmp(w->parent()->name(), "qt_viewport") == 0) || |
949 | (qstrcmp(w->parent()->name(), "qt_clipped_viewport") == 0)); | 950 | (qstrcmp(w->parent()->name(), "qt_clipped_viewport") == 0)); |
950 | 951 | ||
951 | w->setPalette(QApplication::palette()); | 952 | w->unsetPalette(); |
952 | if(w->backgroundMode() == QWidget::X11ParentRelative || isViewportChild){ | 953 | if(w->backgroundMode() == QWidget::X11ParentRelative || isViewportChild){ |
953 | if(w->inherits("QPushButton")) | 954 | if(w->inherits("QPushButton")) |
954 | w->setBackgroundMode(QWidget::PaletteButton); | 955 | w->setBackgroundMode(QWidget::PaletteButton); |
@@ -1005,8 +1006,8 @@ void LiquidStyle::polish(QApplication *app) | |||
1005 | Config config ( "qpe" ); | 1006 | Config config ( "qpe" ); |
1006 | config. setGroup ( "Liquid-Style" ); | 1007 | config. setGroup ( "Liquid-Style" ); |
1007 | 1008 | ||
1008 | if ( config. readBoolEntry ( "WinDecoration", true )) | 1009 | // if ( config. readBoolEntry ( "WinDecoration", true )) |
1009 | QApplication::qwsSetDecoration ( new LiquidDecoration ( )); | 1010 | // QApplication::qwsSetDecoration ( new LiquidDecoration ( )); |
1010 | 1011 | ||
1011 | flatTBButtons = config. readBoolEntry ( "FlatToolButtons", false ); | 1012 | flatTBButtons = config. readBoolEntry ( "FlatToolButtons", false ); |
1012 | } | 1013 | } |
@@ -1019,7 +1020,7 @@ void LiquidStyle::unPolish(QApplication *app) | |||
1019 | 1020 | ||
1020 | qt_set_draw_menu_bar_impl ( 0 ); | 1021 | qt_set_draw_menu_bar_impl ( 0 ); |
1021 | 1022 | ||
1022 | QApplication::qwsSetDecoration ( new QPEDecoration ( )); | 1023 | // QApplication::qwsSetDecoration ( new QPEDecoration ( )); |
1023 | } | 1024 | } |
1024 | 1025 | ||
1025 | /* | 1026 | /* |