add Containment.ThemeColorsGroup enum

pull/15/head
Michail Vourlakos 5 years ago
parent 1bc14b5d7a
commit 790e0af406

@ -25,6 +25,7 @@ import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.plasmoid 2.0
import org.kde.latte.core 0.2 as LatteCore
import org.kde.latte.private.containment 0.1 as LatteContainment
Item{
id: manager
@ -340,7 +341,7 @@ Item{
|| ((root.backgroundOnlyOnMaximized /*Dynamic Background */
|| plasmoid.configuration.solidBackgroundForMaximized
|| root.disablePanelShadowMaximized
|| root.windowColors !== LatteCore.Types.NoneWindowColors))
|| root.windowColors !== LatteContainment.Types.NoneWindowColors))
|| (root.screenEdgeMarginsEnabled /*Dynamic Screen Edge Margin*/
&& plasmoid.configuration.hideScreenGapForMaximized)
}

@ -66,9 +66,9 @@ Loader{
readonly property real currentBackgroundBrightness: item ? item.currentBrightness : -1000
readonly property bool applyingWindowColors: (root.windowColors === LatteCore.Types.ActiveWindowColors && latteView && latteView.windowsTracker
readonly property bool applyingWindowColors: (root.windowColors === LatteContainment.Types.ActiveWindowColors && latteView && latteView.windowsTracker
&& selectedWindowsTracker.activeWindowScheme)
|| (root.windowColors === LatteCore.Types.TouchingWindowColors && latteView && latteView.windowsTracker
|| (root.windowColors === LatteContainment.Types.TouchingWindowColors && latteView && latteView.windowsTracker
&& latteView.windowsTracker.currentScreen.touchingWindowScheme)
property QtObject applyTheme: {
@ -77,11 +77,11 @@ Loader{
}
if (latteView && latteView.windowsTracker && !root.hasExpandedApplet) {
if (root.windowColors === LatteCore.Types.ActiveWindowColors && selectedWindowsTracker.activeWindowScheme) {
if (root.windowColors === LatteContainment.Types.ActiveWindowColors && selectedWindowsTracker.activeWindowScheme) {
return selectedWindowsTracker.activeWindowScheme;
}
if (root.windowColors === LatteCore.Types.TouchingWindowColors && latteView.windowsTracker.currentScreen.touchingWindowScheme) {
if (root.windowColors === LatteContainment.Types.TouchingWindowColors && latteView.windowsTracker.currentScreen.touchingWindowScheme) {
//! we must track touching windows and when they are not ative
//! the active window scheme is used for convenience
if (latteView.windowsTracker.currentScreen.existsWindowTouching
@ -98,7 +98,7 @@ Loader{
if (root.userShowPanelBackground && root.plasmaBackgroundForPopups && root.hasExpandedApplet /*for expanded popups when it is enabled*/
|| root.plasmaStyleBusyForTouchingBusyVerticalView
|| (root.themeColors === LatteContainment.Types.SmartThemeColors /*for Smart theming that Windows colors are not used and the user wants solidness at some cases*/
&& root.windowColors === LatteCore.Types.NoneWindowColors
&& root.windowColors === LatteContainment.Types.NoneWindowColors
&& root.forceSolidPanel) ) {
/* plasma style*/
return theme;

@ -158,7 +158,7 @@ Item {
&& !inConfigureAppletsMode
&& !forceSolidPanel
&& !latteView.windowsTracker.currentScreen.existsWindowTouching
&& !(windowColors === LatteCore.Types.ActiveWindowColors && selectedWindowsTracker.existsWindowActive)
&& !(windowColors === LatteContainment.Types.ActiveWindowColors && selectedWindowsTracker.existsWindowActive)
property bool forcePanelForBusyBackground: userShowPanelBackground && (root.themeColors === LatteContainment.Types.SmartThemeColors)
&& ( (root.forceTransparentPanel && colorizerManager.backgroundIsBusy)
@ -203,7 +203,7 @@ Item {
property int themeColors: plasmoid.configuration.themeColors
property int windowColors: plasmoid.configuration.windowColors
property bool colorizerEnabled: themeColors !== LatteContainment.Types.PlasmaThemeColors || windowColors !== LatteCore.Types.NoneWindowColors
property bool colorizerEnabled: themeColors !== LatteContainment.Types.PlasmaThemeColors || windowColors !== LatteContainment.Types.NoneWindowColors
property bool plasmaBackgroundForPopups: plasmoid.configuration.plasmaBackgroundForPopups

@ -62,6 +62,14 @@ public:
};
Q_ENUM(ThemeColorsGroup);
enum WindowColorsGroup
{
NoneWindowColors = 0,
ActiveWindowColors,
TouchingWindowColors
};
Q_ENUM(WindowColorsGroup);
enum ActiveWindowFilterGroup
{
ActiveInCurrentScreen = 0,

@ -796,7 +796,7 @@ PlasmaComponents.Page {
exclusiveGroup: windowColorsGroup
tooltip: i18n("Colors are not going to be based on any window")
readonly property int colors: LatteCore.Types.NoneWindowColors
readonly property int colors: LatteContainment.Types.NoneWindowColors
}
PlasmaComponents.Button {
@ -810,7 +810,7 @@ PlasmaComponents.Page {
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: LatteCore.Types.ActiveWindowColors
readonly property int colors: LatteContainment.Types.ActiveWindowColors
PlasmaCore.IconItem {
anchors.right: parent.right
@ -835,7 +835,7 @@ PlasmaComponents.Page {
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: LatteCore.Types.TouchingWindowColors
readonly property int colors: LatteContainment.Types.TouchingWindowColors
PlasmaCore.IconItem {
anchors.right: parent.right

Loading…
Cancel
Save