Working on the new color scheme, little hacks to systemclient.
svn path=/trunk/kdebase/kwin/; revision=33124
This commit is contained in:
parent
3a9281209d
commit
3f5e6194c6
2 changed files with 31 additions and 21 deletions
44
options.cpp
44
options.cpp
|
@ -1,5 +1,6 @@
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
#include <qpalette.h>
|
#include <qpalette.h>
|
||||||
|
#include <qpixmap.h>
|
||||||
#include <qapplication.h>
|
#include <qapplication.h>
|
||||||
#include <kconfig.h>
|
#include <kconfig.h>
|
||||||
#include <kglobal.h>
|
#include <kglobal.h>
|
||||||
|
@ -40,7 +41,7 @@ const QColorGroup& Options::colorGroup(ColorType type, bool active)
|
||||||
cg[idx] = new QColorGroup(Qt::black, colors[idx], colors[idx].light(150),
|
cg[idx] = new QColorGroup(Qt::black, colors[idx], colors[idx].light(150),
|
||||||
colors[idx].dark(), colors[idx].dark(120),
|
colors[idx].dark(), colors[idx].dark(120),
|
||||||
Qt::black, QApplication::palette().normal().
|
Qt::black, QApplication::palette().normal().
|
||||||
base());
|
base());
|
||||||
return(*cg[idx]);
|
return(*cg[idx]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,47 +60,64 @@ void Options::reload()
|
||||||
colors[Frame] = config->readColorEntry("frame", &colors[Frame]);
|
colors[Frame] = config->readColorEntry("frame", &colors[Frame]);
|
||||||
colors[Handle] = QColor( 140, 140, 140 );
|
colors[Handle] = QColor( 140, 140, 140 );
|
||||||
colors[Handle] = config->readColorEntry("handle", &colors[Handle]);
|
colors[Handle] = config->readColorEntry("handle", &colors[Handle]);
|
||||||
colors[ButtonBg] = QColor(163,163,163 );
|
colors[ButtonBg] = colors[Frame];
|
||||||
colors[ButtonBg] = config->readColorEntry("buttonBackgroundDown",
|
colors[ButtonBg] = config->readColorEntry("buttonBackgroundDown",
|
||||||
&colors[Frame]);
|
&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] = config->readColorEntry("buttonBlendDown",
|
||||||
&colors[ButtonBlend]);
|
&colors[ButtonBlend]);
|
||||||
colors[TitleBar] = Qt::darkBlue;
|
colors[TitleBar] = Qt::darkBlue;
|
||||||
colors[TitleBar] = config->readColorEntry("activeBackground",
|
colors[TitleBar] = config->readColorEntry("activeBackground",
|
||||||
&colors[TitleBar]);
|
&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] = config->readColorEntry("activeBlend",
|
||||||
&colors[TitleBlend]);
|
&colors[TitleBlend]);
|
||||||
|
|
||||||
colors[Font] = Qt::white;
|
colors[Font] = Qt::white;
|
||||||
colors[Font] = config->readColorEntry("activeForeground", &colors[Font]);
|
colors[Font] = config->readColorEntry("activeForeground", &colors[Font]);
|
||||||
colors[ButtonFg] = QColor(144,170,191);
|
colors[ButtonFg] = Qt::darkGray;
|
||||||
colors[ButtonFg] = config->readColorEntry("buttonForegroundDown",
|
colors[ButtonFg] = config->readColorEntry("buttonForegroundDown",
|
||||||
&colors[ButtonFg]);
|
&colors[ButtonFg]);
|
||||||
|
|
||||||
// inactive
|
// inactive
|
||||||
colors[Frame+KWINCOLORS] =
|
colors[Frame+KWINCOLORS] = config->readColorEntry("inactiveFrame",
|
||||||
config->readColorEntry("inactiveFrame", &colors[Frame]);
|
&colors[Frame]);
|
||||||
colors[TitleBar+KWINCOLORS] = Qt::darkGray;
|
colors[TitleBar+KWINCOLORS] = colors[TitleBar];
|
||||||
colors[TitleBar+KWINCOLORS] = config->
|
colors[TitleBar+KWINCOLORS] = config->
|
||||||
readColorEntry("inactiveBackground", &colors[TitleBar+KWINCOLORS]);
|
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] =
|
colors[TitleBlend+KWINCOLORS] =
|
||||||
config->readColorEntry("inactiveBlend", &colors[TitleBar+KWINCOLORS]);
|
config->readColorEntry("inactiveBlend", &colors[TitleBlend+KWINCOLORS]);
|
||||||
colors[ButtonBg+KWINCOLORS] = QColor(163,163,163);
|
|
||||||
|
colors[ButtonBg+KWINCOLORS] = colors[Frame+KWINCOLORS];
|
||||||
colors[ButtonBg+KWINCOLORS] =
|
colors[ButtonBg+KWINCOLORS] =
|
||||||
config->readColorEntry("buttonBackground",
|
config->readColorEntry("buttonBackground",
|
||||||
&colors[ButtonBg]);
|
&colors[ButtonBg]);
|
||||||
|
|
||||||
|
if(QPixmap::defaultDepth() < 15)
|
||||||
|
colors[ButtonBlend+KWINCOLORS] = colors[ ButtonBg+KWINCOLORS ];
|
||||||
|
else
|
||||||
|
colors[ButtonBlend+KWINCOLORS] = colors[ ButtonBg+KWINCOLORS ].dark(150);
|
||||||
colors[ButtonBlend+KWINCOLORS] =
|
colors[ButtonBlend+KWINCOLORS] =
|
||||||
config->readColorEntry("buttonBlend",
|
config->readColorEntry("buttonBlend", &colors[ButtonBlend+KWINCOLORS]);
|
||||||
&colors[ButtonBlend]);
|
|
||||||
colors[ButtonFg+KWINCOLORS] = config->
|
colors[ButtonFg+KWINCOLORS] = config->
|
||||||
readColorEntry("buttonForeground", &colors[ButtonFg]);
|
readColorEntry("buttonForeground", &colors[ButtonFg]);
|
||||||
|
|
||||||
colors[Handle+KWINCOLORS] =
|
colors[Handle+KWINCOLORS] =
|
||||||
config->readColorEntry("inactiveHandle", &colors[Handle]);
|
config->readColorEntry("inactiveHandle", &colors[Handle]);
|
||||||
|
|
||||||
colors[Font+KWINCOLORS] = Qt::lightGray;
|
colors[Font+KWINCOLORS] = Qt::darkGray;
|
||||||
colors[Font+KWINCOLORS] = config->readColorEntry("inactiveForeground",
|
colors[Font+KWINCOLORS] = config->readColorEntry("inactiveForeground",
|
||||||
&colors[Font+KWINCOLORS]);
|
&colors[Font+KWINCOLORS]);
|
||||||
|
|
||||||
|
|
|
@ -237,14 +237,6 @@ void SystemClient::paintEvent( QPaintEvent* )
|
||||||
rect().height()-2,
|
rect().height()-2,
|
||||||
options->colorGroup(Options::Frame, isActive()), false);
|
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();
|
QRegion r = rect();
|
||||||
r = r.subtract( t );
|
r = r.subtract( t );
|
||||||
|
|
Loading…
Reference in a new issue