fix warnings fron new indicators architecture

pull/5/head
Michail Vourlakos 6 years ago
parent 8be388b893
commit b89ef0e50b

@ -25,8 +25,11 @@ Item{
id: indicatorManager id: indicatorManager
anchors.fill: parent anchors.fill: parent
readonly property bool active: (indicators.common.indicatorsEnabled && appletItem.communicatorAlias.activeIndicatorEnabled && indicators.common.indicatorsForApplets) readonly property bool active: appletItem &&
|| (!indicators.common.indicatorsForApplets && appletItem.communicatorAlias.overlayLatteIconIsActive) ((indicators.common.indicatorsEnabled
&& appletItem.communicatorAlias.activeIndicatorEnabled
&& indicators.common.indicatorsForApplets)
|| (!indicators.common.indicatorsForApplets && appletItem.communicatorAlias.overlayLatteIconIsActive))
/* Indicators Properties in order use them*/ /* Indicators Properties in order use them*/
readonly property bool isTask: false readonly property bool isTask: false
@ -36,9 +39,9 @@ Item{
readonly property bool isStartup: false readonly property bool isStartup: false
readonly property bool isWindow: false readonly property bool isWindow: false
readonly property bool isActive: appletItem.isActive readonly property bool isActive: appletItem ? appletItem.isActive : false
readonly property bool isGroup: false readonly property bool isGroup: false
readonly property bool isHovered: appletMouseArea.containsMouse readonly property bool isHovered: appletItem ? appletMouseArea.containsMouse : false
readonly property bool isMinimized: false readonly property bool isMinimized: false
readonly property bool inAttention: false readonly property bool inAttention: false
readonly property bool inRemoving: false readonly property bool inRemoving: false
@ -52,12 +55,12 @@ Item{
readonly property int currentIconSize: root.iconSize readonly property int currentIconSize: root.iconSize
readonly property int maxIconSize: root.maxIconSize readonly property int maxIconSize: root.maxIconSize
readonly property int durationTime: root.durationTime readonly property int durationTime: root.durationTime
readonly property real scaleFactor: appletItem.wrapperAlias.zoomScale readonly property real scaleFactor: appletItem ? appletItem.wrapperAlias.zoomScale : 1
readonly property color shadowColor: root.appShadowColorSolid readonly property color shadowColor: root.appShadowColorSolid
//!icon colors //!icon colors
property color backgroundColor: appletItem.wrapperAlias.overlayIconLoader.backgroundColor property color backgroundColor: appletItem ? appletItem.wrapperAlias.overlayIconLoader.backgroundColor : "black"
property color glowColor: appletItem.wrapperAlias.overlayIconLoader.glowColor property color glowColor: appletItem ? appletItem.wrapperAlias.overlayIconLoader.glowColor : "white"
//! grouped options //! grouped options
readonly property Item common: indicators.common readonly property Item common: indicators.common

@ -25,6 +25,7 @@ import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.latte 0.2 as Latte import org.kde.latte 0.2 as Latte
import "options" as Options import "options" as Options
import "../applet/indicator" as AppletIndicator
Item{ Item{
id: managerIndicator id: managerIndicator
@ -103,7 +104,7 @@ Item{
opacity: 0 opacity: 0
readonly property bool isBackLayer: true readonly property bool isBackLayer: true
readonly property Item manager: managerIndicator readonly property Item manager: AppletIndicator.Manager{}
sourceComponent: managerIndicator.indicatorComponent sourceComponent: managerIndicator.indicatorComponent
} }

@ -51,7 +51,8 @@ Item{
property color notActiveColor: options.isMinimized ? minimizedColor : isActiveColor property color notActiveColor: options.isMinimized ? minimizedColor : isActiveColor
//! Common Options //! Common Options
readonly property bool reversedEnabled: options.common ? options.common.reversedEnabled : false readonly property bool reversedEnabled: options && options.common && options.common.hasOwnProperty("reversedEnabled") ?
options.common.reversedEnabled : false
//! Explicit Options //! Explicit Options
readonly property bool explicitOptionsEnabled: options.explicit readonly property bool explicitOptionsEnabled: options.explicit

@ -25,6 +25,7 @@ import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.latte 0.2 as Latte import org.kde.latte 0.2 as Latte
import "options" as Options import "options" as Options
import "../task/indicator" as TaskIndicator
Item{ Item{
id: managerIndicator id: managerIndicator
@ -69,7 +70,9 @@ Item{
opacity: 0 opacity: 0
readonly property bool isBackLayer: true readonly property bool isBackLayer: true
readonly property Item manager: managerIndicator readonly property Item manager: TaskIndicator.Manager{
taskIsValid: false
}
sourceComponent: managerIndicator.indicatorComponent sourceComponent: managerIndicator.indicatorComponent
} }

@ -23,44 +23,53 @@ import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.latte 0.2 as Latte import org.kde.latte 0.2 as Latte
import "../../indicators/options" as TaskIndicator
Item { Item {
id: indicatorManager id: indicatorManager
readonly property bool active: indicators.common.indicatorsEnabled property bool taskIsValid: true
readonly property bool locked: inAttentionAnimation || inNewWindowAnimation
readonly property bool active: indicators && indicators.common ? indicators.common.indicatorsEnabled : true
readonly property bool locked: taskIsValid ? (inAttentionAnimation || inNewWindowAnimation) : false
/* Indicators Properties in order for indicators to use them*/ /* Indicators Properties in order for indicators to use them*/
readonly property bool isTask: true readonly property bool isTask: true
readonly property bool isApplet: false readonly property bool isApplet: false
readonly property bool isLauncher: taskItem.isLauncher readonly property bool isLauncher: taskIsValid ? taskItem.isLauncher : true
readonly property bool isStartup: taskItem.isStartup readonly property bool isStartup: taskIsValid ? taskItem.isStartup : false
readonly property bool isWindow: taskItem.isWindow readonly property bool isWindow: taskIsValid ? taskItem.isWindow : false
readonly property bool isActive: taskItem.hasActive || (root.showPreviews && (taskItem.isWindow || taskItem.isGroupParent) readonly property bool isActive: taskIsValid ? (taskItem.hasActive || (root.showPreviews
&& windowsPreviewDlg.activeItem && (windowsPreviewDlg.activeItem === taskItem)) && (taskItem.isWindow || taskItem.isGroupParent)
readonly property bool isGroup: taskItem.isGroupParent && windowsPreviewDlg.activeItem
readonly property bool isHovered: taskItem.containsMouse && (windowsPreviewDlg.activeItem === taskItem)) ) : false
readonly property bool isMinimized: taskItem.isMinimized
readonly property bool inAttention: taskItem.inAttention
readonly property bool inRemoving: taskItem.inRemoveStage
readonly property bool hasActive: taskItem.hasActive readonly property bool isGroup: taskIsValid ? taskItem.isGroupParent : false
readonly property bool hasMinimized: taskItem.hasMinimized readonly property bool isHovered: taskIsValid ? taskItem.containsMouse : false
readonly property bool hasShown: taskItem.hasShown readonly property bool isMinimized: taskIsValid ? taskItem.isMinimized : false
readonly property int windowsCount: taskItem.windowsCount readonly property bool inAttention: taskIsValid ? taskItem.inAttention : false
readonly property int windowsMinimizedCount: taskItem.windowsMinimizedCount readonly property bool inRemoving: taskIsValid ? taskItem.inRemoveStage : false
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 currentIconSize: root.iconSize
readonly property int maxIconSize: root.maxIconSize readonly property int maxIconSize: root.maxIconSize
readonly property int durationTime: root.durationTime readonly property int durationTime: root.durationTime
readonly property real scaleFactor: taskItem.wrapperAlias.mScale readonly property real scaleFactor: taskIsValid ? taskItem.wrapperAlias.mScale : 1
readonly property color shadowColor: root.appShadowColorSolid readonly property color shadowColor: root.appShadowColorSolid
//!icon colors //!icon colors
property color backgroundColor: taskItem.wrapperAlias.backgroundColor property color backgroundColor: taskIsValid ? taskItem.wrapperAlias.backgroundColor : "black"
property color glowColor: taskItem.wrapperAlias.glowColor property color glowColor: taskIsValid ? taskItem.wrapperAlias.glowColor : "white"
//! grouped options //! grouped options
readonly property Item common: indicators.common readonly property Item common: indicators ? indicators.common : emptyOptions
readonly property Item explicit: indicators.explicit readonly property Item explicit: indicators ? indicators.explicit : emptyOptions
Item{id: emptyOptions}
} }

Loading…
Cancel
Save