summaryrefslogtreecommitdiff
path: root/noncore/styles/liquid/liquid.cpp
authorsandman <sandman>2002-07-01 23:39:51 (UTC)
committer sandman <sandman>2002-07-01 23:39:51 (UTC)
commit329ea43b68180058bcd8e9d2af4d09d9c03c55a3 (patch) (unidiff)
tree8cb75f0d18be170c2def7ce8968fcbddeb004e82 /noncore/styles/liquid/liquid.cpp
parent7191d788415f190680c8a699b2b7bb88ddf28917 (diff)
downloadopie-329ea43b68180058bcd8e9d2af4d09d9c03c55a3.zip
opie-329ea43b68180058bcd8e9d2af4d09d9c03c55a3.tar.gz
opie-329ea43b68180058bcd8e9d2af4d09d9c03c55a3.tar.bz2
Added two new settings to liquid-style / Liquid-Settings:
- en/disable the new window decoration - set the stipple contrast (from no stipple to twice the normal value)
Diffstat (limited to 'noncore/styles/liquid/liquid.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/styles/liquid/liquid.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/noncore/styles/liquid/liquid.cpp b/noncore/styles/liquid/liquid.cpp
index 313d52c..acf0a42 100644
--- a/noncore/styles/liquid/liquid.cpp
+++ b/noncore/styles/liquid/liquid.cpp
@@ -78,7 +78,7 @@ void TransMenuHandler::reloadSettings()
78 pixDict.clear(); 78 pixDict.clear();
79 79
80 Config config ( "qpe" ); 80 Config config ( "qpe" );
81 config. setGroup ( "MosfetMenus" ); 81 config. setGroup ( "Liquid-Style" );
82 82
83 type = config. readNumEntry("Type", TransStippleBg); 83 type = config. readNumEntry("Type", TransStippleBg);
84 color = QColor ( config. readEntry("Color", QApplication::palette().active().button().name())); 84 color = QColor ( config. readEntry("Color", QApplication::palette().active().button().name()));
@@ -710,6 +710,13 @@ void LiquidStyle::polish(QPalette &appPal)
710 smallBevelFillDict.clear(); 710 smallBevelFillDict.clear();
711 711
712 Config config ( "qpe" ); 712 Config config ( "qpe" );
713 config. setGroup ( "Liquid-Style" );
714 int contrast = config. readNumEntry ( "StippleContrast", 5 );
715 if ( contrast < 0 )
716 contrast = 0;
717 else if ( contrast > 10 )
718 contrast = 10;
719
713 QPalette pal = QApplication::palette(); 720 QPalette pal = QApplication::palette();
714 721
715 // button color stuff 722 // button color stuff
@@ -781,9 +788,9 @@ void LiquidStyle::polish(QPalette &appPal)
781 wallPaper.fill(c.rgb()); 788 wallPaper.fill(c.rgb());
782 painter.begin(&wallPaper); 789 painter.begin(&wallPaper);
783 for(i=0; i < 32; i+=4){ 790 for(i=0; i < 32; i+=4){
784 painter.setPen(c.dark(105)); 791 painter.setPen(c.dark(100 + contrast));
785 painter.drawLine(0, i, 32, i); 792 painter.drawLine(0, i, 32, i);
786 painter.setPen(c.dark(103)); 793 painter.setPen(c.dark(100 + 3 * contrast / 5 ) );
787 painter.drawLine(0, i+1, 32, i+1); 794 painter.drawLine(0, i+1, 32, i+1);
788 }; 795 };
789 painter.end(); 796 painter.end();
@@ -989,7 +996,11 @@ void LiquidStyle::polish(QApplication *app)
989 996
990 qt_set_draw_menu_bar_impl((QDrawMenuBarItemImpl) &LiquidStyle::drawMenuBarItem); 997 qt_set_draw_menu_bar_impl((QDrawMenuBarItemImpl) &LiquidStyle::drawMenuBarItem);
991 998
992 QApplication::qwsSetDecoration ( new LiquidDecoration ( )); 999 Config config ( "qpe" );
1000 config. setGroup ( "Liquid-Style" );
1001
1002 if ( config. readBoolEntry ( "WinDecoration", true ))
1003 QApplication::qwsSetDecoration ( new LiquidDecoration ( ));
993} 1004}
994 1005
995void LiquidStyle::unPolish(QApplication *app) 1006void LiquidStyle::unPolish(QApplication *app)