SHA256
1
0
forked from pool/breeze
Files
breeze/openSUSE_colorscheme.diff

56 lines
2.1 KiB
Diff

diff --git a/misc/kde4breeze/src/main.cpp b/misc/kde4breeze/src/main.cpp
index 3d08694..0062cda 100644
--- a/misc/kde4breeze/src/main.cpp
+++ b/misc/kde4breeze/src/main.cpp
@@ -32,7 +32,11 @@
void applyColorScheme(KConfig *other)
{
- QString src = QStandardPaths::locate(QStandardPaths::GenericDataLocation, "color-schemes/Breeze.colors");
+ QString src;
+ src = QStandardPaths::locate(QStandardPaths::GenericDataLocation, "kde4/apps/color-schemes/openSUSE.colors");
+ if (src.isEmpty()) {
+ src = QStandardPaths::locate(QStandardPaths::GenericDataLocation, "color-schemes/Breeze.colors");
+ }
KSharedConfigPtr config = KSharedConfig::openConfig(src);
@@ -64,7 +68,12 @@ void updateKdeGlobals()
//use QtCurve only if installed
const bool hasBreeze = QStyleFactory::keys().contains("Breeze");
KConfigGroup group(&config, "General");
+ QString filekde4 = QStandardPaths::locate(QStandardPaths::GenericDataLocation, "kde4/apps/color-schemes/openSUSE.colors");
+ if(!filekde4.isEmpty()){
+ group.writeEntry("ColorScheme", "openSUSE");
+ } else {
group.writeEntry("ColorScheme", "Breeze");
+ }
if (hasBreeze) {
group.writeEntry("widgetStyle", "Breeze");
}
@@ -78,7 +87,12 @@ void updateKdeGlobals()
KSharedConfig::Ptr kf5Config = KSharedConfig::openConfig("kdeglobals");
KConfigGroup kf5Group(kf5Config, "General");
+ QString filekf5 = QStandardPaths::locate(QStandardPaths::GenericDataLocation, "color-schemes/openSUSE.colors");
+ if(!filekf5.isEmpty()){
+ kf5Group.writeEntry("ColorScheme", "openSUSE");
+ } else {
kf5Group.writeEntry("ColorScheme", "Breeze");
+ }
if (hasBreeze) {
kf5Group.writeEntry("widgetStyle", "Breeze");
}
@@ -86,7 +100,11 @@ void updateKdeGlobals()
kf5Group.sync();
KConfigGroup kf52Group(kf5Config, "KDE");
+ if(!filekf5.isEmpty()){
+ kf52Group.writeEntry("ColorScheme", "openSUSE");
+ } else {
kf52Group.writeEntry("ColorScheme", "Breeze");
+ }
if (hasBreeze) {
kf52Group.writeEntry("widgetStyle", "Breeze");
}