mirror of
https://abf.rosa.ru/djam/kdebase4-workspace.git
synced 2025-02-24 02:02:50 +00:00
447 lines
24 KiB
Diff
447 lines
24 KiB
Diff
![]() |
diff -urN kde-workspace-4.11.22/kcontrol/colors/colorscm.cpp kde-workspace-4.11.22-patched/kcontrol/colors/colorscm.cpp
|
||
|
--- kde-workspace-4.11.22/kcontrol/colors/colorscm.cpp 2015-08-12 17:03:15.134742955 +1000
|
||
|
+++ kde-workspace-4.11.22-patched/kcontrol/colors/colorscm.cpp 2017-03-14 20:34:18.216378638 +1000
|
||
|
@@ -90,6 +90,13 @@
|
||
|
|
||
|
m_config = KSharedConfig::openConfig("kdeglobals");
|
||
|
|
||
|
+ QString kf5path = KGlobal::dirs()->localxdgconfdir();
|
||
|
+ if(kf5path.isEmpty())
|
||
|
+ kf5path = QFileInfo(QDir::home(), ".config").absoluteFilePath();
|
||
|
+ kf5path += "kdeglobals";
|
||
|
+
|
||
|
+ m_kf5config = KSharedConfig::openConfig(kf5path);
|
||
|
+
|
||
|
setupUi(this);
|
||
|
schemeKnsButton->setIcon( KIcon("get-hot-new-stuff") );
|
||
|
schemeKnsUploadButton->setIcon( KIcon("get-hot-new-stuff") );
|
||
|
@@ -105,6 +112,7 @@
|
||
|
KColorCm::~KColorCm()
|
||
|
{
|
||
|
m_config->markAsClean();
|
||
|
+ m_kf5config->markAsClean();
|
||
|
}
|
||
|
|
||
|
void KColorCm::populateSchemeList()
|
||
|
@@ -647,6 +655,37 @@
|
||
|
WMGroup.writeEntry("inactiveForeground", m_wmColors.color(WindecoColors::InactiveForeground));
|
||
|
WMGroup.writeEntry("activeBlend", m_wmColors.color(WindecoColors::ActiveBlend));
|
||
|
WMGroup.writeEntry("inactiveBlend", m_wmColors.color(WindecoColors::InactiveBlend));
|
||
|
+
|
||
|
+ // update colors for KF5 applications
|
||
|
+ group = KConfigGroup(m_kf5config, "General");
|
||
|
+ group.writeEntry("ColorScheme", m_currentColorScheme);
|
||
|
+
|
||
|
+ for (int i = KColorScheme::View; i <= KColorScheme::Tooltip; ++i)
|
||
|
+ {
|
||
|
+ KConfigGroup group(m_kf5config, colorSetGroupKey(i));
|
||
|
+ group.writeEntry("BackgroundNormal", m_colorSchemes[i].background(KColorScheme::NormalBackground).color());
|
||
|
+ group.writeEntry("BackgroundAlternate", m_colorSchemes[i].background(KColorScheme::AlternateBackground).color());
|
||
|
+ group.writeEntry("ForegroundNormal", m_colorSchemes[i].foreground(KColorScheme::NormalText).color());
|
||
|
+ group.writeEntry("ForegroundInactive", m_colorSchemes[i].foreground(KColorScheme::InactiveText).color());
|
||
|
+ group.writeEntry("ForegroundActive", m_colorSchemes[i].foreground(KColorScheme::ActiveText).color());
|
||
|
+ group.writeEntry("ForegroundLink", m_colorSchemes[i].foreground(KColorScheme::LinkText).color());
|
||
|
+ group.writeEntry("ForegroundVisited", m_colorSchemes[i].foreground(KColorScheme::VisitedText).color());
|
||
|
+ group.writeEntry("ForegroundNegative", m_colorSchemes[i].foreground(KColorScheme::NegativeText).color());
|
||
|
+ group.writeEntry("ForegroundNeutral", m_colorSchemes[i].foreground(KColorScheme::NeutralText).color());
|
||
|
+ group.writeEntry("ForegroundPositive", m_colorSchemes[i].foreground(KColorScheme::PositiveText).color());
|
||
|
+ group.writeEntry("DecorationFocus", m_colorSchemes[i].decoration(KColorScheme::FocusColor).color());
|
||
|
+ group.writeEntry("DecorationHover", m_colorSchemes[i].decoration(KColorScheme::HoverColor).color());
|
||
|
+ }
|
||
|
+
|
||
|
+ WMGroup = KConfigGroup(m_kf5config, "WM");
|
||
|
+ WMGroup.writeEntry("activeBackground", m_wmColors.color(WindecoColors::ActiveBackground));
|
||
|
+ WMGroup.writeEntry("activeForeground", m_wmColors.color(WindecoColors::ActiveForeground));
|
||
|
+ WMGroup.writeEntry("inactiveBackground", m_wmColors.color(WindecoColors::InactiveBackground));
|
||
|
+ WMGroup.writeEntry("inactiveForeground", m_wmColors.color(WindecoColors::InactiveForeground));
|
||
|
+ WMGroup.writeEntry("activeBlend", m_wmColors.color(WindecoColors::ActiveBlend));
|
||
|
+ WMGroup.writeEntry("inactiveBlend", m_wmColors.color(WindecoColors::InactiveBlend));
|
||
|
+ // sync it
|
||
|
+ m_kf5config->sync();
|
||
|
}
|
||
|
|
||
|
void KColorCm::updateFromOptions()
|
||
|
@@ -654,9 +693,15 @@
|
||
|
KConfigGroup groupK(m_config, "KDE");
|
||
|
groupK.writeEntry("contrast", contrastSlider->value());
|
||
|
|
||
|
+ groupK = KConfigGroup(m_kf5config, "KDE");
|
||
|
+ groupK.writeEntry("contrast", contrastSlider->value());
|
||
|
+
|
||
|
KConfigGroup groupG(m_config, "General");
|
||
|
groupG.writeEntry("shadeSortColumn", shadeSortedColumn->isChecked());
|
||
|
|
||
|
+ groupG = KConfigGroup(m_kf5config, "General");
|
||
|
+ groupG.writeEntry("shadeSortColumn", shadeSortedColumn->isChecked());
|
||
|
+
|
||
|
KConfigGroup groupI(m_config, "ColorEffects:Inactive");
|
||
|
groupI.writeEntry("Enable", useInactiveEffects->isChecked());
|
||
|
// only write this setting if it is not the default; this way we can change the default more easily in later KDE
|
||
|
@@ -669,6 +714,21 @@
|
||
|
{
|
||
|
groupI.deleteEntry("ChangeSelectionColor");
|
||
|
}
|
||
|
+
|
||
|
+ groupI = KConfigGroup(m_kf5config, "ColorEffects:Inactive");
|
||
|
+ groupI.writeEntry("Enable", useInactiveEffects->isChecked());
|
||
|
+ // only write this setting if it is not the default; this way we can change the default more easily in later KDE
|
||
|
+ // the setting will still written by explicitly checking/unchecking the box
|
||
|
+ if (inactiveSelectionEffect->isChecked())
|
||
|
+ {
|
||
|
+ groupI.writeEntry("ChangeSelectionColor", true);
|
||
|
+ }
|
||
|
+ else
|
||
|
+ {
|
||
|
+ groupI.deleteEntry("ChangeSelectionColor");
|
||
|
+ }
|
||
|
+ // sync it
|
||
|
+ m_kf5config->sync();
|
||
|
}
|
||
|
|
||
|
void KColorCm::updateFromEffectsPage()
|
||
|
@@ -682,39 +742,61 @@
|
||
|
KConfigGroup groupI(m_config, "ColorEffects:Inactive");
|
||
|
KConfigGroup groupD(m_config, "ColorEffects:Disabled");
|
||
|
|
||
|
+ KConfigGroup groupIkf5(m_kf5config, "ColorEffects:Inactive");
|
||
|
+ KConfigGroup groupDkf5(m_kf5config, "ColorEffects:Disabled");
|
||
|
+
|
||
|
// intensity
|
||
|
groupI.writeEntry("IntensityEffect", inactiveIntensityBox->currentIndex());
|
||
|
groupD.writeEntry("IntensityEffect", disabledIntensityBox->currentIndex());
|
||
|
groupI.writeEntry("IntensityAmount", qreal(inactiveIntensitySlider->value() - 20) * 0.05);
|
||
|
groupD.writeEntry("IntensityAmount", qreal(disabledIntensitySlider->value() - 20) * 0.05);
|
||
|
+ groupIkf5.writeEntry("IntensityEffect", inactiveIntensityBox->currentIndex());
|
||
|
+ groupDkf5.writeEntry("IntensityEffect", disabledIntensityBox->currentIndex());
|
||
|
+ groupIkf5.writeEntry("IntensityAmount", qreal(inactiveIntensitySlider->value() - 20) * 0.05);
|
||
|
+ groupDkf5.writeEntry("IntensityAmount", qreal(disabledIntensitySlider->value() - 20) * 0.05);
|
||
|
|
||
|
// color
|
||
|
groupI.writeEntry("ColorEffect", inactiveColorBox->currentIndex());
|
||
|
groupD.writeEntry("ColorEffect", disabledColorBox->currentIndex());
|
||
|
+ groupIkf5.writeEntry("ColorEffect", inactiveColorBox->currentIndex());
|
||
|
+ groupDkf5.writeEntry("ColorEffect", disabledColorBox->currentIndex());
|
||
|
if (inactiveColorBox->currentIndex() > 1)
|
||
|
{
|
||
|
groupI.writeEntry("ColorAmount", qreal(inactiveColorSlider->value()) * 0.025);
|
||
|
+ groupIkf5.writeEntry("ColorAmount", qreal(inactiveColorSlider->value()) * 0.025);
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
groupI.writeEntry("ColorAmount", qreal(inactiveColorSlider->value() - 20) * 0.05);
|
||
|
+ groupIkf5.writeEntry("ColorAmount", qreal(inactiveColorSlider->value() - 20) * 0.05);
|
||
|
}
|
||
|
if (disabledColorBox->currentIndex() > 1)
|
||
|
{
|
||
|
groupD.writeEntry("ColorAmount", qreal(disabledColorSlider->value()) * 0.025);
|
||
|
+ groupDkf5.writeEntry("ColorAmount", qreal(disabledColorSlider->value()) * 0.025);
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
groupD.writeEntry("ColorAmount", qreal(disabledColorSlider->value() - 20) * 0.05);
|
||
|
+ groupDkf5.writeEntry("ColorAmount", qreal(disabledColorSlider->value() - 20) * 0.05);
|
||
|
}
|
||
|
groupI.writeEntry("Color", inactiveColorButton->color());
|
||
|
groupD.writeEntry("Color", disabledColorButton->color());
|
||
|
+ groupIkf5.writeEntry("Color", inactiveColorButton->color());
|
||
|
+ groupDkf5.writeEntry("Color", disabledColorButton->color());
|
||
|
|
||
|
// contrast
|
||
|
groupI.writeEntry("ContrastEffect", inactiveContrastBox->currentIndex());
|
||
|
groupD.writeEntry("ContrastEffect", disabledContrastBox->currentIndex());
|
||
|
groupI.writeEntry("ContrastAmount", qreal(inactiveContrastSlider->value()) * 0.05);
|
||
|
groupD.writeEntry("ContrastAmount", qreal(disabledContrastSlider->value()) * 0.05);
|
||
|
+ groupIkf5.writeEntry("ContrastEffect", inactiveContrastBox->currentIndex());
|
||
|
+ groupDkf5.writeEntry("ContrastEffect", disabledContrastBox->currentIndex());
|
||
|
+ groupIkf5.writeEntry("ContrastAmount", qreal(inactiveContrastSlider->value()) * 0.05);
|
||
|
+ groupDkf5.writeEntry("ContrastAmount", qreal(disabledContrastSlider->value()) * 0.05);
|
||
|
+
|
||
|
+ // sync it
|
||
|
+ m_kf5config->sync();
|
||
|
|
||
|
// enable/disable controls
|
||
|
inactiveIntensitySlider->setDisabled(inactiveIntensityBox->currentIndex() == 0);
|
||
|
@@ -937,38 +1019,47 @@
|
||
|
case 0:
|
||
|
// View Background button
|
||
|
KConfigGroup(m_config, "Colors:View").writeEntry("BackgroundNormal", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:View").writeEntry("BackgroundNormal", newColor);
|
||
|
break;
|
||
|
case 1:
|
||
|
// View Text button
|
||
|
KConfigGroup(m_config, "Colors:View").writeEntry("ForegroundNormal", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:View").writeEntry("ForegroundNormal", newColor);
|
||
|
break;
|
||
|
case 2:
|
||
|
// Window Background Button
|
||
|
KConfigGroup(m_config, "Colors:Window").writeEntry("BackgroundNormal", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Window").writeEntry("BackgroundNormal", newColor);
|
||
|
break;
|
||
|
case 3:
|
||
|
// Window Text Button
|
||
|
KConfigGroup(m_config, "Colors:Window").writeEntry("ForegroundNormal", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Window").writeEntry("ForegroundNormal", newColor);
|
||
|
break;
|
||
|
case 4:
|
||
|
// Button Background button
|
||
|
KConfigGroup(m_config, "Colors:Button").writeEntry("BackgroundNormal", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Button").writeEntry("BackgroundNormal", newColor);
|
||
|
break;
|
||
|
case 5:
|
||
|
// Button Text button
|
||
|
KConfigGroup(m_config, "Colors:Button").writeEntry("ForegroundNormal", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Button").writeEntry("ForegroundNormal", newColor);
|
||
|
break;
|
||
|
case 6:
|
||
|
// Selection Background Button
|
||
|
KConfigGroup(m_config, "Colors:Selection").writeEntry("BackgroundNormal", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Selection").writeEntry("BackgroundNormal", newColor);
|
||
|
break;
|
||
|
case 7:
|
||
|
// Selection Text Button
|
||
|
KConfigGroup(m_config, "Colors:Selection").writeEntry("ForegroundNormal", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Selection").writeEntry("ForegroundNormal", newColor);
|
||
|
break;
|
||
|
case 8:
|
||
|
// Selection Inactive Text Button
|
||
|
KConfigGroup(m_config, "Colors:Selection").writeEntry("ForegroundInactive", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Selection").writeEntry("ForegroundInactive", newColor);
|
||
|
break;
|
||
|
|
||
|
// buttons that could have varies in their place
|
||
|
@@ -978,6 +1069,10 @@
|
||
|
KConfigGroup(m_config, "Colors:Window").writeEntry("ForegroundInactive", newColor);
|
||
|
KConfigGroup(m_config, "Colors:Button").writeEntry("ForegroundInactive", newColor);
|
||
|
KConfigGroup(m_config, "Colors:Tooltip").writeEntry("ForegroundInactive", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:View").writeEntry("ForegroundInactive", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Window").writeEntry("ForegroundInactive", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Button").writeEntry("ForegroundInactive", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Tooltip").writeEntry("ForegroundInactive", newColor);
|
||
|
break;
|
||
|
case 10:
|
||
|
// Active Text Button (set all active text colors)
|
||
|
@@ -986,6 +1081,11 @@
|
||
|
KConfigGroup(m_config, "Colors:Selection").writeEntry("ForegroundActive", newColor);
|
||
|
KConfigGroup(m_config, "Colors:Button").writeEntry("ForegroundActive", newColor);
|
||
|
KConfigGroup(m_config, "Colors:Tooltip").writeEntry("ForegroundActive", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:View").writeEntry("ForegroundActive", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Window").writeEntry("ForegroundActive", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Selection").writeEntry("ForegroundActive", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Button").writeEntry("ForegroundActive", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Tooltip").writeEntry("ForegroundActive", newColor);
|
||
|
break;
|
||
|
case 11:
|
||
|
// Link Text Button (set all link text colors)
|
||
|
@@ -994,6 +1094,11 @@
|
||
|
KConfigGroup(m_config, "Colors:Selection").writeEntry("ForegroundLink", newColor);
|
||
|
KConfigGroup(m_config, "Colors:Button").writeEntry("ForegroundLink", newColor);
|
||
|
KConfigGroup(m_config, "Colors:Tooltip").writeEntry("ForegroundLink", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:View").writeEntry("ForegroundLink", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Window").writeEntry("ForegroundLink", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Selection").writeEntry("ForegroundLink", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Button").writeEntry("ForegroundLink", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Tooltip").writeEntry("ForegroundLink", newColor);
|
||
|
break;
|
||
|
case 12:
|
||
|
// Visited Text Button (set all visited text colors)
|
||
|
@@ -1002,6 +1107,11 @@
|
||
|
KConfigGroup(m_config, "Colors:Selection").writeEntry("ForegroundVisited", newColor);
|
||
|
KConfigGroup(m_config, "Colors:Button").writeEntry("ForegroundVisited", newColor);
|
||
|
KConfigGroup(m_config, "Colors:Tooltip").writeEntry("ForegroundVisited", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:View").writeEntry("ForegroundVisited", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Window").writeEntry("ForegroundVisited", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Selection").writeEntry("ForegroundVisited", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Button").writeEntry("ForegroundVisited", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Tooltip").writeEntry("ForegroundVisited", newColor);
|
||
|
break;
|
||
|
case 13:
|
||
|
// Negative Text Button (set all negative text colors)
|
||
|
@@ -1010,6 +1120,11 @@
|
||
|
KConfigGroup(m_config, "Colors:Selection").writeEntry("ForegroundNegative", newColor);
|
||
|
KConfigGroup(m_config, "Colors:Button").writeEntry("ForegroundNegative", newColor);
|
||
|
KConfigGroup(m_config, "Colors:Tooltip").writeEntry("ForegroundNegative", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:View").writeEntry("ForegroundNegative", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Window").writeEntry("ForegroundNegative", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Selection").writeEntry("ForegroundNegative", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Button").writeEntry("ForegroundNegative", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Tooltip").writeEntry("ForegroundNegative", newColor);
|
||
|
break;
|
||
|
case 14:
|
||
|
// Neutral Text Button (set all neutral text colors)
|
||
|
@@ -1018,6 +1133,11 @@
|
||
|
KConfigGroup(m_config, "Colors:Selection").writeEntry("ForegroundNeutral", newColor);
|
||
|
KConfigGroup(m_config, "Colors:Button").writeEntry("ForegroundNeutral", newColor);
|
||
|
KConfigGroup(m_config, "Colors:Tooltip").writeEntry("ForegroundNeutral", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:View").writeEntry("ForegroundNeutral", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Window").writeEntry("ForegroundNeutral", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Selection").writeEntry("ForegroundNeutral", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Button").writeEntry("ForegroundNeutral", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Tooltip").writeEntry("ForegroundNeutral", newColor);
|
||
|
break;
|
||
|
case 15:
|
||
|
// Positive Text Button (set all positive text colors)
|
||
|
@@ -1026,6 +1146,11 @@
|
||
|
KConfigGroup(m_config, "Colors:Selection").writeEntry("ForegroundPositive", newColor);
|
||
|
KConfigGroup(m_config, "Colors:Button").writeEntry("ForegroundPositive", newColor);
|
||
|
KConfigGroup(m_config, "Colors:Tooltip").writeEntry("ForegroundPositive", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:View").writeEntry("ForegroundPositive", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Window").writeEntry("ForegroundPositive", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Selection").writeEntry("ForegroundPositive", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Button").writeEntry("ForegroundPositive", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Tooltip").writeEntry("ForegroundPositive", newColor);
|
||
|
break;
|
||
|
|
||
|
case 16:
|
||
|
@@ -1035,6 +1160,11 @@
|
||
|
KConfigGroup(m_config, "Colors:Selection").writeEntry("DecorationFocus", newColor);
|
||
|
KConfigGroup(m_config, "Colors:Button").writeEntry("DecorationFocus", newColor);
|
||
|
KConfigGroup(m_config, "Colors:Tooltip").writeEntry("DecorationFocus", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:View").writeEntry("DecorationFocus", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Window").writeEntry("DecorationFocus", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Selection").writeEntry("DecorationFocus", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Button").writeEntry("DecorationFocus", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Tooltip").writeEntry("DecorationFocus", newColor);
|
||
|
break;
|
||
|
case 17:
|
||
|
// Hover Decoration Button (set all hover decoration colors)
|
||
|
@@ -1043,39 +1173,52 @@
|
||
|
KConfigGroup(m_config, "Colors:Selection").writeEntry("DecorationHover", newColor);
|
||
|
KConfigGroup(m_config, "Colors:Button").writeEntry("DecorationHover", newColor);
|
||
|
KConfigGroup(m_config, "Colors:Tooltip").writeEntry("DecorationHover", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:View").writeEntry("DecorationHover", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Window").writeEntry("DecorationHover", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Selection").writeEntry("DecorationHover", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Button").writeEntry("DecorationHover", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Tooltip").writeEntry("DecorationHover", newColor);
|
||
|
break;
|
||
|
|
||
|
case 18:
|
||
|
// Tooltip Background button
|
||
|
KConfigGroup(m_config, "Colors:Tooltip").writeEntry("BackgroundNormal", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Tooltip").writeEntry("BackgroundNormal", newColor);
|
||
|
break;
|
||
|
case 19:
|
||
|
// Tooltip Text button
|
||
|
KConfigGroup(m_config, "Colors:Tooltip").writeEntry("ForegroundNormal", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "Colors:Tooltip").writeEntry("ForegroundNormal", newColor);
|
||
|
break;
|
||
|
case 20:
|
||
|
// Active Title Background
|
||
|
KConfigGroup(m_config, "WM").writeEntry("activeBackground", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "WM").writeEntry("activeBackground", newColor);
|
||
|
break;
|
||
|
case 21:
|
||
|
// Active Title Text
|
||
|
KConfigGroup(m_config, "WM").writeEntry("activeForeground", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "WM").writeEntry("activeForeground", newColor);
|
||
|
break;
|
||
|
case 22:
|
||
|
// Active Title Secondary
|
||
|
KConfigGroup(m_config, "WM").writeEntry("activeBlend", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "WM").writeEntry("activeBlend", newColor);
|
||
|
break;
|
||
|
case 23:
|
||
|
// Inactive Title Background
|
||
|
KConfigGroup(m_config, "WM").writeEntry("inactiveBackground", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "WM").writeEntry("inactiveBackground", newColor);
|
||
|
break;
|
||
|
case 24:
|
||
|
// Inactive Title Text
|
||
|
KConfigGroup(m_config, "WM").writeEntry("inactiveForeground", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "WM").writeEntry("inactiveForeground", newColor);
|
||
|
break;
|
||
|
case 25:
|
||
|
// Inactive Title Secondary
|
||
|
KConfigGroup(m_config, "WM").writeEntry("inactiveBlend", newColor);
|
||
|
+ KConfigGroup(m_kf5config, "WM").writeEntry("inactiveBlend", newColor);
|
||
|
break;
|
||
|
}
|
||
|
m_commonColorButtons[row]->blockSignals(true);
|
||
|
@@ -1086,6 +1229,7 @@
|
||
|
{
|
||
|
QString group = colorSetGroupKey(currentSet);
|
||
|
KConfigGroup(m_config, group).writeEntry(m_colorKeys[row], newColor);
|
||
|
+ KConfigGroup(m_kf5config, group).writeEntry(m_colorKeys[row], newColor);
|
||
|
}
|
||
|
|
||
|
QIcon icon = createSchemePreviewIcon(m_config);
|
||
|
@@ -1097,6 +1241,9 @@
|
||
|
m_currentColorScheme = i18nc("Current color scheme", "Current");
|
||
|
KConfigGroup group(m_config, "General");
|
||
|
group.writeEntry("ColorScheme", m_currentColorScheme);
|
||
|
+ group = KConfigGroup(m_kf5config, "General");
|
||
|
+ group.writeEntry("ColorScheme", m_currentColorScheme);
|
||
|
+ m_kf5config->sync();
|
||
|
schemeRemoveButton->setEnabled(false);
|
||
|
schemeKnsUploadButton->setEnabled(false);
|
||
|
schemeList->blockSignals(true); // don't emit changed signals
|
||
|
@@ -1133,6 +1280,9 @@
|
||
|
KConfigGroup group(m_config, "KDE");
|
||
|
group.writeEntry("contrast", value);
|
||
|
|
||
|
+ group = KConfigGroup(m_kf5config, "KDE");
|
||
|
+ group.writeEntry("contrast", value);
|
||
|
+
|
||
|
updatePreviews();
|
||
|
|
||
|
emit changed(true);
|
||
|
@@ -1143,6 +1293,9 @@
|
||
|
KConfigGroup group(m_config, "General");
|
||
|
group.writeEntry("shadeSortColumn", bool(state != Qt::Unchecked));
|
||
|
|
||
|
+ group = KConfigGroup(m_kf5config, "General");
|
||
|
+ group.writeEntry("shadeSortColumn", bool(state != Qt::Unchecked));
|
||
|
+
|
||
|
emit changed(true);
|
||
|
}
|
||
|
|
||
|
@@ -1151,6 +1304,9 @@
|
||
|
KConfigGroup group(m_config, "ColorEffects:Inactive");
|
||
|
group.writeEntry("Enable", bool(state != Qt::Unchecked));
|
||
|
|
||
|
+ group = KConfigGroup(m_kf5config, "ColorEffects:Inactive");
|
||
|
+ group.writeEntry("Enable", bool(state != Qt::Unchecked));
|
||
|
+
|
||
|
m_disableUpdates = true;
|
||
|
printf("re-init\n");
|
||
|
inactiveSelectionEffect->setChecked(group.readEntry("ChangeSelectionColor", bool(state != Qt::Unchecked)));
|
||
|
@@ -1170,6 +1326,10 @@
|
||
|
KConfigGroup group(m_config, "ColorEffects:Inactive");
|
||
|
group.writeEntry("ChangeSelectionColor", bool(state != Qt::Unchecked));
|
||
|
|
||
|
+ group = KConfigGroup(m_kf5config, "ColorEffects:Inactive");
|
||
|
+ group.writeEntry("ChangeSelectionColor", bool(state != Qt::Unchecked));
|
||
|
+ m_kf5config->sync();
|
||
|
+
|
||
|
emit changed(true);
|
||
|
}
|
||
|
|
||
|
@@ -1246,6 +1406,16 @@
|
||
|
groupI.writeEntry("ContrastEffect", inactiveContrastBox->currentIndex());
|
||
|
|
||
|
m_config->sync();
|
||
|
+
|
||
|
+ groupI = KConfigGroup(m_kf5config, "ColorEffects:Inactive");
|
||
|
+
|
||
|
+ groupI.writeEntry("Enable", useInactiveEffects->isChecked());
|
||
|
+ groupI.writeEntry("IntensityEffect", inactiveIntensityBox->currentIndex());
|
||
|
+ groupI.writeEntry("ColorEffect", inactiveColorBox->currentIndex());
|
||
|
+ groupI.writeEntry("ContrastEffect", inactiveContrastBox->currentIndex());
|
||
|
+
|
||
|
+ m_kf5config->sync();
|
||
|
+
|
||
|
KGlobalSettings::self()->emitChange(KGlobalSettings::PaletteChanged);
|
||
|
#ifdef Q_WS_X11
|
||
|
// Send signal to all kwin instances
|
||
|
diff -urN kde-workspace-4.11.22/kcontrol/colors/colorscm.h kde-workspace-4.11.22-patched/kcontrol/colors/colorscm.h
|
||
|
--- kde-workspace-4.11.22/kcontrol/colors/colorscm.h 2015-08-12 17:03:15.134742955 +1000
|
||
|
+++ kde-workspace-4.11.22-patched/kcontrol/colors/colorscm.h 2017-03-14 20:15:16.291279756 +1000
|
||
|
@@ -203,6 +203,7 @@
|
||
|
QString m_currentColorScheme;
|
||
|
|
||
|
KSharedConfigPtr m_config;
|
||
|
+ KSharedConfigPtr m_kf5config;
|
||
|
|
||
|
bool m_disableUpdates;
|
||
|
bool m_loadedSchemeHasUnsavedChanges;
|