1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-01-01 01:17:51 +03:00

show to user warning for Colors KWin Script presence

This commit is contained in:
Michail Vourlakos 2019-06-17 17:11:27 +03:00
parent 88ba9f4b75
commit eef791100d
2 changed files with 29 additions and 3 deletions

View File

@ -94,8 +94,8 @@ void UniversalSettings::load()
KDirWatch::self()->addDir(path);
}
connect(KDirWatch::self(), &KDirWatch::dirty, this, &UniversalSettings::colorsScriptChanged);
connect(KDirWatch::self(), &KDirWatch::created, this, &UniversalSettings::colorsScriptChanged);
connect(KDirWatch::self(), &KDirWatch::deleted, this, &UniversalSettings::colorsScriptChanged);
//! this is needed to inform globalshortcuts to update its modifiers tracking
emit metaPressAndHoldEnabledChanged();

View File

@ -697,9 +697,22 @@ PlasmaComponents.Page {
checked: parent.windowColors === colors
checkable: true
exclusiveGroup: windowColorsGroup
tooltip: i18n("Colors are going to be based on the active window")
tooltip: universalSettings.colorsScriptIsPresent ?
i18n("Colors are going to be based on the active window") :
i18n("Colors are going to be based on the active window.\nNotice: For optimal experience you are advised to install Colors KWin Script from KDE Store")
readonly property int colors: Latte.Types.ActiveWindowColors
PlasmaCore.IconItem {
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
width: height
height: parent.height
source: "state-warning"
visible: !universalSettings.colorsScriptIsPresent
}
}
PlasmaComponents.Button {
@ -709,9 +722,22 @@ PlasmaComponents.Page {
checked: parent.windowColors === colors
checkable: true
exclusiveGroup: windowColorsGroup
tooltip: i18n("Colors are going to be based on windows that are touching the view")
tooltip: universalSettings.colorsScriptIsPresent ?
i18n("Colors are going to be based on windows that are touching the view") :
i18n("Colors are going to be based on windows that are touching the view.\nNotice: For optimal experience you are advised to install Colors KWin Script from KDE Store")
readonly property int colors: Latte.Types.TouchingWindowColors
PlasmaCore.IconItem {
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
width: height
height: parent.height
source: "state-warning"
visible: !universalSettings.colorsScriptIsPresent
}
}
}
}