File thinkeramik-colors.diff of Package thinkeramik
--- widget-engine/thinkeramik.cpp
+++ widget-engine/thinkeramik.cpp 2004/04/26 10:09:12
@@ -221,7 +221,7 @@
a.translate( r.x() + r.width() / 2 - 1, r.y() + r.height() / 2 );
QColor sbacol = sbacolor;
- if (customScrollMode)
+ if (customScrollMode || !sbacol.isValid())
sbacol = cg.button();
QColor sbafgcol = cg.buttonText();
@@ -551,7 +551,7 @@
if (!sbscolstr.isNull()) {
sbscolor = QColor(sbscolstr);
} else {
- sbscolor = QColor(settings.readEntry("/qt/KWinPalette/inactiveBackground", "#d8d8d8"));
+ sbscolor = QColor();
}
QString sbacolstr = settings.readEntry("/qt/ThinKmk/ScrollArrowbtn");
if (!sbacolstr.isNull()) {
@@ -1223,16 +1223,15 @@
loader.size( thinkeramik_scrollbar_vbar+ThinKeramikSlider3 ).height() + 2 ) )
count = 5;
- QColor col = sbscolor;
+ QColor col = cg.highlight();
if (customScrollMode || !highlightScrollBar)
col = cg.button();
- if (!( flags & Style_Enabled ))
- ThinKeramik::ScrollBarPainter( name, count, horizontal ).draw( p, r, sbacolor.dark(135), cg.background(), false, pmode() );
- else if (!active)
+ if (!active) {
ThinKeramik::ScrollBarPainter( name, count, horizontal ).draw( p, r, col, cg.background(), false, pmode() );
- else
+ } else {
ThinKeramik::ScrollBarPainter( name, count, horizontal ).draw( p, r, ThinKeramik::ColorUtil::lighten(col ,110), cg.background(), false, pmode() );
+ }
break;
}
@@ -1242,7 +1241,7 @@
bool down = flags & Style_Down;
QColor sbacol = sbacolor;
- if (customScrollMode)
+ if (customScrollMode || !sbacol.isValid())
sbacol = cg.button();
QColor sbafgcol = cg.buttonText();
@@ -1297,7 +1296,7 @@
bool down = flags & Style_Down;
QColor sbacol = sbacolor;
- if (customScrollMode)
+ if (customScrollMode || !sbacol.isValid())
sbacol = cg.button();
QColor sbafgcol = cg.buttonText();
@@ -1691,8 +1690,11 @@
bool horizontal = slider->orientation() == Horizontal;
QColor hl = sbscolor;
+ if ( !hl.isValid() )
+ hl = cg.highlight();
+
if (!disabled && flags & Style_Active)
- hl = ThinKeramik::ColorUtil::lighten(sbscolor,110);
+ hl = ThinKeramik::ColorUtil::lighten(hl, 110);
if (horizontal)
ThinKeramik::ScaledPainter( thinkeramik_slider ).draw( p, r, disabled ? cg.button() : hl,
@@ -1918,9 +1920,10 @@
// Make the label indicate if the button is a default button or not
if (useshadowtxtB && button->isEnabled()) {
+ QColor t = button->colorGroup().button().dark(130);
drawItem( p, QRect(x+1, y+1, w, h), AlignCenter | ShowPrefix, button->colorGroup(),
button->isEnabled(), button->pixmap(), button->text(), -1,
- &button->colorGroup().button().dark(130) );
+ &t );
}
drawItem( p, QRect(x, y, w, h), AlignCenter | ShowPrefix, button->colorGroup(),
button->isEnabled(), button->pixmap(), button->text(), -1,