[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdebase/kicker/buttons
From: Aaron J. Seigo <aseigo () kde ! org>
Date: 2003-09-03 22:07:36
[Download RAW message or body]
CVS commit by aseigo:
make the custom color tiles look nice by giving them some frames.
make all such frame drawing crazyness use QStyle as well.
M +12 -14 panelbuttonbase.cpp 1.42
--- kdebase/kicker/buttons/panelbuttonbase.cpp #1.41:1.42
@@ -417,5 +417,8 @@ void PanelButtonBase::drawButton(QPainte
p->drawPixmap(0, 0, _bg);
else if (_tileColor.isValid())
+ {
p->fillRect(rect(), _tileColor);
+ style().drawPrimitive(QStyle::PE_Panel, p, rect(), colorGroup());
+ }
const QPixmap& tile = (isDown() || isOn()) ? _down : _up;
@@ -426,10 +429,5 @@ void PanelButtonBase::drawButton(QPainte
else if (isDown() || isOn()) {
// Draw shapes to indicate the down state.
- p->setPen(Qt::black);
- p->drawLine(0, 0, width()-1, 0);
- p->drawLine(0, 0, 0, height()-1);
- p->setPen(colorGroup().light());
- p->drawLine(0, height()-1, width()-1, height()-1);
- p->drawLine(width()-1, 0, width()-1, height()-1);
+ style().drawPrimitive(QStyle::PE_Panel, p, rect(), colorGroup(), QStyle::Style_Sunken);
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic