137 qApp->setPalette(QPalette());
150 QString filename =
d->
themeMap.value(theme);
151 KSharedConfigPtr config = KSharedConfig::openConfig(filename);
153 QPalette
palette = qApp->palette();
154 QPalette::ColorGroup states[3] = { QPalette::Active, QPalette::Inactive, QPalette::Disabled };
158 for (
int i = 0; i < 3 ; ++i ) {
160 QPalette::ColorGroup state = states[i];
173 palette.setBrush(state, QPalette::HighlightedText, schemeSelection.
foreground());
190 qApp->setProperty(
"KDE_COLOR_SCHEME_PATH", filename);
224 QMap<QString, QAction*> actionMap;
225 for (
int i = 0; i < schemeFiles.size(); ++i) {
226 const QString filename = schemeFiles.at(i);
227 const QFileInfo info(filename);
228 KSharedConfigPtr config = KSharedConfig::openConfig(filename);
230 KConfigGroup group(config,
"General");
231 const QString name = group.readEntry(
"Name", info.completeBaseName());
233 action->setIcon(icon);
234 action->setCheckable(
true);
235 actionMap.insert(name, action);
242 action->setCheckable(
true);
243 actionMap.insert(
"System", action);
248 actionMapKeys.sort();
250 Q_FOREACH (
const QString& name, actionMapKeys) {
252 actionMap.value(name)->setChecked(
true);
261 const uchar bits1[] = { 0xff, 0xff, 0xff, 0x2c, 0x16, 0x0b };
262 const uchar bits2[] = { 0x68, 0x34, 0x1a, 0xff, 0xff, 0xff };
263 const QSize bitsSize(24, 2);
264 const QBitmap b1 = QBitmap::fromData(bitsSize, bits1);
265 const QBitmap b2 = QBitmap::fromData(bitsSize, bits2);
267 QPixmap pixmap(23, 16);
268 pixmap.fill(Qt::black);
270 KConfigGroup group(config,
"WM");
274 p.fillRect(2, 2, 5, 2, QBrush(windowScheme.
foreground().color(), b1));
278 p.fillRect(9, 2, 5, 2, QBrush(buttonScheme.
foreground().color(), b1));
280 p.fillRect(15, 1, 7, 7, group.readEntry(
"activeBackground", QColor(96, 148, 207)));
281 p.fillRect(16, 2, 5, 2, QBrush(group.readEntry(
"activeForeground", QColor(255, 255, 255)), b1));
285 p.fillRect(2, 12, 5, 2, QBrush(viewScheme.
foreground().color(), b2));
288 p.fillRect(8, 8, 7, 7, selectionScheme.
background());
289 p.fillRect(9, 12, 5, 2, QBrush(selectionScheme.
foreground().color(), b2));
291 p.fillRect(15, 8, 7, 7, group.readEntry(
"inactiveBackground", QColor(224, 223, 222)));
292 p.fillRect(16, 12, 5, 2, QBrush(group.readEntry(
"inactiveForeground", QColor(20, 19, 18)), b2));