forked from blue/squawk
color theme setting is now working
This commit is contained in:
parent
0ff9f12157
commit
da19eb86bb
13 changed files with 142 additions and 33 deletions
|
@ -1,7 +1,9 @@
|
|||
#include <QIcon>
|
||||
#include <QPainter>
|
||||
#include <QFileInfo>
|
||||
|
||||
#include <KConfigCore/KSharedConfig>
|
||||
#include <KConfigCore/KConfigGroup>
|
||||
#include <KConfigWidgets/KColorScheme>
|
||||
|
||||
QPixmap createPixmap(int size, const QBrush& window, const QBrush& button, const QBrush& view, const QBrush& selection);
|
||||
|
@ -24,6 +26,17 @@ extern "C" void deletePreview(QIcon* icon) {
|
|||
delete icon;
|
||||
}
|
||||
|
||||
extern "C" void colorSchemeName(const QString& path, QString& answer) {
|
||||
KSharedConfigPtr config = KSharedConfig::openConfig(path);
|
||||
KConfigGroup group(config, QStringLiteral("General"));
|
||||
answer = group.readEntry("Name", QFileInfo(path).baseName());
|
||||
}
|
||||
|
||||
extern "C" void createPalette(const QString& path, QPalette& answer) {
|
||||
KSharedConfigPtr config = KSharedConfig::openConfig(path);
|
||||
answer = KColorScheme::createApplicationPalette(config);
|
||||
}
|
||||
|
||||
QPixmap createPixmap(int size, const QBrush& window, const QBrush& button, const QBrush& view, const QBrush& selection) {
|
||||
QPixmap pix(size, size);
|
||||
pix.fill(Qt::black);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue