diff --git a/options.cpp b/options.cpp index 9065704baf..cbe10ca567 100644 --- a/options.cpp +++ b/options.cpp @@ -1,5 +1,6 @@ #include "options.h" #include +#include #include #include #include @@ -40,7 +41,7 @@ const QColorGroup& Options::colorGroup(ColorType type, bool active) cg[idx] = new QColorGroup(Qt::black, colors[idx], colors[idx].light(150), colors[idx].dark(), colors[idx].dark(120), Qt::black, QApplication::palette().normal(). - base()); + base()); return(*cg[idx]); } @@ -59,47 +60,64 @@ void Options::reload() colors[Frame] = config->readColorEntry("frame", &colors[Frame]); colors[Handle] = QColor( 140, 140, 140 ); colors[Handle] = config->readColorEntry("handle", &colors[Handle]); - colors[ButtonBg] = QColor(163,163,163 ); + colors[ButtonBg] = colors[Frame]; colors[ButtonBg] = config->readColorEntry("buttonBackgroundDown", &colors[Frame]); - colors[ButtonBlend] = QColor(0,0,0); + if(QPixmap::defaultDepth() < 15) + colors[ButtonBlend] = colors[ ButtonBg ]; + else + colors[ButtonBlend] = colors[ ButtonBg ].dark(150); colors[ButtonBlend] = config->readColorEntry("buttonBlendDown", &colors[ButtonBlend]); colors[TitleBar] = Qt::darkBlue; colors[TitleBar] = config->readColorEntry("activeBackground", &colors[TitleBar]); - colors[TitleBlend] = colors[ TitleBar ]; + if(QPixmap::defaultDepth() < 15) + colors[TitleBlend] = colors[ TitleBar ]; + else + colors[TitleBlend] = colors[ TitleBar ].dark(150); colors[TitleBlend] = config->readColorEntry("activeBlend", &colors[TitleBlend]); colors[Font] = Qt::white; colors[Font] = config->readColorEntry("activeForeground", &colors[Font]); - colors[ButtonFg] = QColor(144,170,191); + colors[ButtonFg] = Qt::darkGray; colors[ButtonFg] = config->readColorEntry("buttonForegroundDown", &colors[ButtonFg]); // inactive - colors[Frame+KWINCOLORS] = - config->readColorEntry("inactiveFrame", &colors[Frame]); - colors[TitleBar+KWINCOLORS] = Qt::darkGray; + colors[Frame+KWINCOLORS] = config->readColorEntry("inactiveFrame", + &colors[Frame]); + colors[TitleBar+KWINCOLORS] = colors[TitleBar]; colors[TitleBar+KWINCOLORS] = config-> readColorEntry("inactiveBackground", &colors[TitleBar+KWINCOLORS]); + + if(QPixmap::defaultDepth() < 15) + colors[TitleBlend+KWINCOLORS] = colors[ TitleBar+KWINCOLORS ]; + else + colors[TitleBlend+KWINCOLORS] = colors[ TitleBar+KWINCOLORS ].dark(150); colors[TitleBlend+KWINCOLORS] = - config->readColorEntry("inactiveBlend", &colors[TitleBar+KWINCOLORS]); - colors[ButtonBg+KWINCOLORS] = QColor(163,163,163); + config->readColorEntry("inactiveBlend", &colors[TitleBlend+KWINCOLORS]); + + colors[ButtonBg+KWINCOLORS] = colors[Frame+KWINCOLORS]; colors[ButtonBg+KWINCOLORS] = config->readColorEntry("buttonBackground", &colors[ButtonBg]); + + if(QPixmap::defaultDepth() < 15) + colors[ButtonBlend+KWINCOLORS] = colors[ ButtonBg+KWINCOLORS ]; + else + colors[ButtonBlend+KWINCOLORS] = colors[ ButtonBg+KWINCOLORS ].dark(150); colors[ButtonBlend+KWINCOLORS] = - config->readColorEntry("buttonBlend", - &colors[ButtonBlend]); + config->readColorEntry("buttonBlend", &colors[ButtonBlend+KWINCOLORS]); + colors[ButtonFg+KWINCOLORS] = config-> readColorEntry("buttonForeground", &colors[ButtonFg]); colors[Handle+KWINCOLORS] = config->readColorEntry("inactiveHandle", &colors[Handle]); - colors[Font+KWINCOLORS] = Qt::lightGray; + colors[Font+KWINCOLORS] = Qt::darkGray; colors[Font+KWINCOLORS] = config->readColorEntry("inactiveForeground", &colors[Font+KWINCOLORS]); diff --git a/systemclient.cpp b/systemclient.cpp index 05a5c77cd7..0aa445407e 100644 --- a/systemclient.cpp +++ b/systemclient.cpp @@ -237,15 +237,7 @@ void SystemClient::paintEvent( QPaintEvent* ) rect().height()-2, options->colorGroup(Options::Frame, isActive()), false); - //qDrawShadePanel(&p, rect().x()+1, rect().y()+1, rect().width()-2, - // 21, options->colorGroup(Options::Frame, isActive()), - // false); - - p.setPen(options->colorGroup(Options::Frame, isActive()).dark()); - p.drawLine(rect().x()+1, 20, rect().right()-1, 20); - p.setPen(options->colorGroup(Options::Frame, isActive()).light()); - p.drawLine(rect().x()+1, 21, rect().right()-1, 21); - + QRegion r = rect(); r = r.subtract( t ); p.setClipRegion( r );