summaryrefslogtreecommitdiff
blob: 7d77f73c95c6424134961ac98e0a985aec96cc3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
--- style/config/lipstikconf.cpp	2005-09-09 20:38:17.000000000 +0400
+++ style/config/lipstikconf.cpp	2005-09-09 21:24:52.000000000 +0400
@@ -81,6 +81,7 @@ LipstikStyleConfig::LipstikStyleConfig(Q
 	drawFocusRect = new QCheckBox(i18n("Draw colored focus rectangle"), generalGrp);
 	newKickerButtons = new QCheckBox(i18n("Flat taskbar buttons"), generalGrp);
 	flatHeaders = new QCheckBox(i18n("Flat column headers"), generalGrp);
+	lowerCaseText = new QCheckBox(i18n("Use lowercase text"), generalGrp);
 
 	tabLayout->addWidget(generalGrp,0,0,0);
 
@@ -289,6 +290,9 @@ LipstikStyleConfig::LipstikStyleConfig(Q
  	origFlatHeaders = s.readBoolEntry("/lipstikstyle/Settings/flatHeaders", false);
 	flatHeaders->setChecked(origFlatHeaders);
 
+	origLowerCaseText = s.readBoolEntry("/lipstikstyle/Settings/lowerCaseText", false);
+	lowerCaseText->setChecked(origLowerCaseText);
+
 	origDrawTriangularExpander = s.readBoolEntry("/lipstikstyle/Settings/drawTriangularExpander", true);
 	drawTriangularExpander->setChecked(origDrawTriangularExpander);
 	origInputFocusHighlight = s.readBoolEntry("/lipstikstyle/Settings/inputFocusHighlight", true);
@@ -338,6 +342,7 @@ LipstikStyleConfig::LipstikStyleConfig(Q
 
  	connect(newKickerButtons, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
  	connect(flatHeaders, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
+	connect(lowerCaseText, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
 
 	connect(drawTriangularExpander, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
 	connect(inputFocusHighlight, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
@@ -425,6 +430,7 @@ void LipstikStyleConfig::save()
 
  	s.writeEntry("/lipstikstyle/Settings/newKickerButtons", newKickerButtons->isChecked());
  	s.writeEntry("/lipstikstyle/Settings/flatHeaders", flatHeaders->isChecked());
+	s.writeEntry("/lipstikstyle/Settings/lowerCaseText", lowerCaseText->isChecked());
 
 	s.writeEntry("/lipstikstyle/Settings/drawTriangularExpander", drawTriangularExpander->isChecked());
 	s.writeEntry("/lipstikstyle/Settings/inputFocusHighlight", inputFocusHighlight->isChecked());
@@ -467,6 +473,7 @@ void LipstikStyleConfig::defaults()
 
  	newKickerButtons->setChecked(false);
  	flatHeaders->setChecked(true);
+	lowerCaseText->setChecked(false);
 
 	drawTriangularExpander->setChecked(true);
 	inputFocusHighlight->setChecked(true);
@@ -553,6 +560,7 @@ void LipstikStyleConfig::updateChanged()
 
  	    (newKickerButtons->isChecked() == origNewKickerButtons) &&
  	    (flatHeaders->isChecked() == origFlatHeaders) &&
+	    (lowerCaseText->isChecked() == origLowerCaseText) &&
 
 	    (drawTriangularExpander->isChecked() == origDrawTriangularExpander) &&
 	    (inputFocusHighlight->isChecked() == origInputFocusHighlight) &&
--- style/config/lipstikconf.h	2005-09-09 20:38:17.000000000 +0400
+++ style/config/lipstikconf.h	2005-09-09 20:57:12.000000000 +0400
@@ -83,6 +83,7 @@ protected:
  	QCheckBox*       drawFocusRect;
  	QCheckBox*       newKickerButtons;
  	QCheckBox*       flatHeaders;
+	QCheckBox*       lowerCaseText;
 	QCheckBox*       drawTriangularExpander;
 	QCheckBox*       inputFocusHighlight;
 	QCheckBox*       customOverHighlightColor;
@@ -116,6 +117,7 @@ protected:
  	bool       origDrawFocusRect;
  	bool       origNewKickerButtons;
  	bool       origFlatHeaders;
+	bool       origLowerCaseText;
 	bool       origDrawTriangularExpander;
 	bool       origInputFocusHighlight;
 	bool       origCustomOverHighlightColor;
--- style/lipstik.cpp	2005-09-09 20:38:17.000000000 +0400
+++ style/lipstik.cpp	2005-09-09 21:22:25.000000000 +0400
@@ -208,6 +208,8 @@ LipstikStyle::LipstikStyle() : KStyle( A
     //
     settings.beginGroup("/lipstikstyle/Settings");
 
+    _lowerCaseText = settings.readBoolEntry("/lowerCaseText", false);
+
     _reverseGradients = settings.readBoolEntry("/reverseGradients", false);
 
     _paintGroove = settings.readBoolEntry("/paintGroove", true);
@@ -2938,7 +2940,8 @@ void LipstikStyle::drawControl(ControlEl
 
             // Make the label indicate if the button is a default button or not
             drawItem(p, QRect(x, y, w, h), AlignCenter|ShowPrefix, button->colorGroup(),
-                     button->isEnabled(), button->pixmap(), button->text(), -1,
+                     button->isEnabled(), button->pixmap(),
+                     _lowerCaseText ? button->text().lower() : button->text(), -1,
                      &button->colorGroup().buttonText());
 
 
@@ -2970,7 +2973,7 @@ void LipstikStyle::drawControl(ControlEl
 	    {
         	p->setPen(cg.foreground() );
 	    }
-            p->drawText(r, text_flags, mi->text());
+            p->drawText(r, text_flags, _lowerCaseText ? mi->text().lower() : mi->text());
             break;
         }
 
@@ -3153,7 +3156,7 @@ void LipstikStyle::drawControl(ControlEl
             else 
 	    {
                 // The menu item doesn't draw it's own label
-                QString s = mi->text();
+                QString s = _lowerCaseText ? mi->text().lower() : mi->text();
                 // Does the menu item have a text label?
                 if ( !s.isNull() ) 
 		{
@@ -3194,7 +3197,7 @@ void LipstikStyle::drawControl(ControlEl
                         p->setPen( discol );
                     }
                     p->drawText( xp, r.y()+m, tw, r.height()-2*m, text_flags, s, t );
-                    p->setPen(cg.text());
+                    p->setPen( cg.text() );
                 }
 
                 // The menu item doesn't have a text label
--- style/lipstik.h	2005-09-09 20:38:17.000000000 +0400
+++ style/lipstik.h	2005-09-09 21:01:09.000000000 +0400
@@ -290,6 +290,7 @@ private:
     bool _drawToolBarHandle;
     bool _comboboxColored;
     bool _kickerHighlight;
+    bool _lowerCaseText;
 
     bool _reverseGradients;
     bool _paintGroove;