[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Standard KDE style fixes
From: Rik Hemsley <rik () kde ! org>
Date: 2001-07-29 19:15:28
[Download RAW message or body]
* Don't mess with background origin.
* Draw combo button properly.
Please review.
Rik
["kdestyle.diff" (text/plain)]
Index: kdestyle.cpp
===================================================================
RCS file: /home/kde/kdelibs/kdecore/kdestyle.cpp,v
retrieving revision 1.30
diff -u -3 -p -r1.30 kdestyle.cpp
--- kdestyle.cpp 2001/04/08 16:43:25 1.30
+++ kdestyle.cpp 2001/07/29 19:14:49
@@ -184,10 +184,10 @@ void KDEStyle::polish(QWidget *w)
{
if (w->isTopLevel())
return;
- if(w->inherits("QButton") ) {
- if(!w->parent() || ( !w->parent()->inherits("KToolBar")))
- w->setBackgroundOrigin(QWidget::ParentOrigin);
- }
+// if(w->inherits("QButton") ) {
+// if(!w->parent() || ( !w->parent()->inherits("KToolBar")))
+// w->setBackgroundOrigin(QWidget::ParentOrigin);
+// }
// this needs updated draw routine that doesn't depend on being masked
if(w->inherits("QComboBox"))
@@ -203,10 +203,10 @@ void KDEStyle::unPolish(QWidget *w)
if (w->isTopLevel())
return;
- if(w->inherits("QButton")){
- if(!w->parent() || (!w->parent()->inherits("KToolBar")))
- w->setBackgroundOrigin(QWidget::WidgetOrigin);
- }
+// if(w->inherits("QButton")){
+// if(!w->parent() || (!w->parent()->inherits("KToolBar")))
+// w->setBackgroundOrigin(QWidget::WidgetOrigin);
+// }
if(w->inherits("QComboBox"))
w->setAutoMask(false);
@@ -409,12 +409,12 @@ void KDEStyle::drawComboButton(QPainter
const QColorGroup &g, bool sunken,
bool edit, bool, const QBrush *fill)
{
+
int x2 = x+w-1;
int y2 = y+h-1;
p->setPen(g.dark());
+ p->setBrush(g.brush(QColorGroup::Background));
p->drawRect(x, y, w, h);
- p->fillRect(x+2, y+2, w-4, h-4, fill ? *fill :
- g.brush(QColorGroup::Background));
p->setPen(sunken? g.light() : g.mid());
p->drawLine(x2-1, y+2, x2-1, y2-1);
@@ -424,7 +424,7 @@ void KDEStyle::drawComboButton(QPainter
p->drawLine(x+1, y+1, x2-1, y+1);
p->drawLine(x+1, y+2, x+1, y2-2);
- p->setPen(g.dark());
+ p->setPen(g.light());
p->drawPoint(x+1, y+1);
if(edit){
@@ -450,8 +450,6 @@ void KDEStyle::drawComboButtonMask(QPain
p->fillRect(x, y, w, h, QBrush(color1, SolidPattern));
p->setPen(color0);
p->drawPoint(x, y);
- p->drawPoint(x, y+1);
- p->drawPoint(x+1, y);
p->drawPoint(x2, y);
p->drawPoint(x, y2);
p->drawPoint(x2, y2);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic