diff --git a/containment/package/contents/ui/applet/indicator/Bridge.qml b/containment/package/contents/ui/applet/indicator/Bridge.qml index 8f174b1d..03728fe5 100644 --- a/containment/package/contents/ui/applet/indicator/Bridge.qml +++ b/containment/package/contents/ui/applet/indicator/Bridge.qml @@ -1,91 +1,93 @@ /* * Copyright 2019 Michail Vourlakos * * This file is part of Latte-Dock * * Latte-Dock is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * Latte-Dock is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ import QtQuick 2.7 import org.kde.latte 0.2 as Latte Item{ id: indicatorBridge anchors.fill: parent property bool appletIsValid: true readonly property bool active: appletIsValid && ((indicators.isEnabled && appletItem.communicatorAlias.activeIndicatorEnabled && indicators.enabledForApplets) || (!indicators.enabledForApplets && appletItem.communicatorAlias.overlayLatteIconIsActive)) /* Indicators Properties in order use them*/ readonly property bool isTask: false readonly property bool isApplet: true readonly property bool isLauncher: false readonly property bool isStartup: false readonly property bool isWindow: false readonly property bool isActive: appletIsValid ? appletItem.isActive : false readonly property bool isGroup: false readonly property bool isHovered: appletIsValid ? appletMouseArea.containsMouse : false readonly property bool isMinimized: false readonly property bool isPressed: appletIsValid ? appletMouseArea.pressed : false readonly property bool inAttention: false readonly property bool inRemoving: false readonly property bool isSquare: appletIsValid ? appletItem.isSquare : true readonly property bool hasActive: isActive readonly property bool hasMinimized: false readonly property bool hasShown: false readonly property int windowsCount: 0 readonly property int windowsMinimizedCount: 0 readonly property int currentIconSize: root.iconSize readonly property int maxIconSize: root.maxIconSize - readonly property int durationTime: root.durationTime readonly property real scaleFactor: appletIsValid ? appletItem.wrapperAlias.zoomScale : 1 readonly property real panelOpacity: root.currentPanelOpacity readonly property color shadowColor: root.appShadowColorSolid + readonly property bool animationsEnabled: root.animationsEnabled + readonly property real durationTime: root.durationTime + readonly property bool usePlasmaTabsStyle: !indicators.enabledForApplets readonly property QtObject palette: colorizerManager.applyTheme //!icon colors property color iconBackgroundColor: { if (appletIsValid) { return isSquare ? appletItem.wrapperAlias.overlayIconLoader.backgroundColor : colorizerManager.buttonFocusColor; } return "black"; } property color iconGlowColor:{ if (appletIsValid) { return isSquare ? appletItem.wrapperAlias.overlayIconLoader.glowColor : colorizerManager.focusGlowColor; } return "white"; } //! grouped options readonly property Item shared: indicators readonly property QtObject configuration: indicators.configuration } diff --git a/plasmoid/package/contents/ui/task/indicator/Bridge.qml b/plasmoid/package/contents/ui/task/indicator/Bridge.qml index 8158e6ef..e970e560 100644 --- a/plasmoid/package/contents/ui/task/indicator/Bridge.qml +++ b/plasmoid/package/contents/ui/task/indicator/Bridge.qml @@ -1,83 +1,85 @@ /* * Copyright 2019 Michail Vourlakos * * This file is part of Latte-Dock * * Latte-Dock is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * Latte-Dock is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ import QtQuick 2.7 import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.latte 0.2 as Latte import "../../indicators/options" as TaskIndicator Item { id: indicatorBridge property bool taskIsValid: true readonly property bool active: indicators ? indicators.isEnabled : false readonly property bool locked: taskIsValid ? (inAttentionAnimation || inNewWindowAnimation) : false /* Indicators Properties in order for indicators to use them*/ readonly property bool isTask: true readonly property bool isApplet: false readonly property bool isLauncher: taskIsValid ? taskItem.isLauncher : true readonly property bool isStartup: taskIsValid ? taskItem.isStartup : false readonly property bool isWindow: taskIsValid ? taskItem.isWindow : false readonly property bool isActive: taskIsValid ? (taskItem.hasActive || (root.showPreviews && (taskItem.isWindow || taskItem.isGroupParent) && windowsPreviewDlg.activeItem && (windowsPreviewDlg.activeItem === taskItem)) ) : false readonly property bool isGroup: taskIsValid ? taskItem.isGroupParent : false readonly property bool isHovered: taskIsValid ? taskItem.containsMouse : false readonly property bool isMinimized: taskIsValid ? taskItem.isMinimized : false readonly property bool isPressed: taskIsValid ? taskItem.pressed : false readonly property bool inAttention: taskIsValid ? taskItem.inAttention : false readonly property bool inRemoving: taskIsValid ? taskItem.inRemoveStage : false readonly property bool isSquare: true readonly property bool hasActive: taskIsValid ? taskItem.hasActive : false readonly property bool hasMinimized: taskIsValid? taskItem.hasMinimized : false readonly property bool hasShown: taskIsValid ? taskItem.hasShown : false readonly property int windowsCount: taskIsValid ? taskItem.windowsCount : 0 readonly property int windowsMinimizedCount: taskIsValid ? taskItem.windowsMinimizedCount : 0 readonly property int currentIconSize: root.iconSize readonly property int maxIconSize: root.maxIconSize - readonly property int durationTime: root.durationTime readonly property real scaleFactor: taskIsValid ? taskItem.wrapperAlias.mScale : 1 readonly property real panelOpacity: root.currentPanelOpacity readonly property color shadowColor: root.appShadowColorSolid + readonly property bool animationsEnabled: root.animationsEnabled + readonly property real durationTime: root.durationTime + readonly property bool usePlasmaTabsStyle: false readonly property QtObject palette: enforceLattePalette ? latteBridge.palette.applyTheme : theme //!icon colors property color iconBackgroundColor: taskIsValid ? taskItem.wrapperAlias.backgroundColor : "black" property color iconGlowColor: taskIsValid ? taskItem.wrapperAlias.glowColor : "white" //! grouped options readonly property Item shared: indicators ? indicators : emptyOptions readonly property QtObject configuration: indicators ? indicators.configuration : null Item{id: emptyOptions} }