|
|
|
@ -24,51 +24,44 @@ import org.kde.plasma.core 2.0 as PlasmaCore
|
|
|
|
|
import org.kde.latte 0.2 as Latte
|
|
|
|
|
|
|
|
|
|
PlasmaCore.FrameSvgItem {
|
|
|
|
|
id: frame
|
|
|
|
|
id: expandedItem
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
|
|
|
|
imagePath: "widgets/tasks"
|
|
|
|
|
|
|
|
|
|
property bool isActive: (appletItem.isExpanded
|
|
|
|
|
&& communicator.overlayLatteIconIsActive
|
|
|
|
|
&& !appletItem.isSystray
|
|
|
|
|
&& applet.pluginName !== root.plasmoidName
|
|
|
|
|
&& applet.pluginName !== "org.kde.activeWindowControl"
|
|
|
|
|
&& applet.pluginName !== "org.kde.plasma.appmenu")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
property string basePrefix: ""
|
|
|
|
|
|
|
|
|
|
prefix: taskPrefix(basePrefix)
|
|
|
|
|
|
|
|
|
|
function taskPrefix(prefix) {
|
|
|
|
|
var effectivePrefix;
|
|
|
|
|
|
|
|
|
|
imagePath: "widgets/tabbar"
|
|
|
|
|
visible: opacity > 0
|
|
|
|
|
prefix: {
|
|
|
|
|
var prefix;
|
|
|
|
|
switch (plasmoid.location) {
|
|
|
|
|
case PlasmaCore.Types.LeftEdge:
|
|
|
|
|
effectivePrefix = "west-" + prefix;
|
|
|
|
|
prefix = "west-active-tab";
|
|
|
|
|
break;
|
|
|
|
|
case PlasmaCore.Types.TopEdge:
|
|
|
|
|
effectivePrefix = "north-" + prefix;
|
|
|
|
|
prefix = "north-active-tab";
|
|
|
|
|
break;
|
|
|
|
|
case PlasmaCore.Types.RightEdge:
|
|
|
|
|
effectivePrefix = "east-" + prefix;
|
|
|
|
|
prefix = "east-active-tab";
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
effectivePrefix = "south-" + prefix;
|
|
|
|
|
prefix = "south-active-tab";
|
|
|
|
|
}
|
|
|
|
|
if (!hasElementPrefix(prefix)) {
|
|
|
|
|
prefix = "active-tab";
|
|
|
|
|
}
|
|
|
|
|
return [effectivePrefix, prefix];
|
|
|
|
|
return prefix;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
states: [
|
|
|
|
|
State {
|
|
|
|
|
name: "active"
|
|
|
|
|
when: frame.isActive
|
|
|
|
|
opacity: isActive ? 1 : 0
|
|
|
|
|
|
|
|
|
|
PropertyChanges {
|
|
|
|
|
target: frame
|
|
|
|
|
basePrefix: "focus"
|
|
|
|
|
}
|
|
|
|
|
property bool isActive: (appletItem.isExpanded
|
|
|
|
|
&& communicator.overlayLatteIconIsActive
|
|
|
|
|
&& !appletItem.isSystray
|
|
|
|
|
&& applet.pluginName !== root.plasmoidName
|
|
|
|
|
&& applet.pluginName !== "org.kde.activeWindowControl"
|
|
|
|
|
&& applet.pluginName !== "org.kde.plasma.appmenu")
|
|
|
|
|
|
|
|
|
|
Behavior on opacity {
|
|
|
|
|
NumberAnimation {
|
|
|
|
|
duration: units.shortDuration
|
|
|
|
|
easing.type: Easing.InOutQuad
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|