Changeset View
Changeset View
Standalone View
Standalone View
toolboxes/paneltoolbox/contents/ui/main.qml
Show All 23 Lines | |||||
24 | import org.kde.plasma.plasmoid 2.0 | 24 | import org.kde.plasma.plasmoid 2.0 | ||
25 | 25 | | |||
26 | Item { | 26 | Item { | ||
27 | id: main | 27 | id: main | ||
28 | 28 | | |||
29 | width: isVertical ? units.iconSizes.medium : units.iconSizes.smallMedium + units.smallSpacing * 2 | 29 | width: isVertical ? units.iconSizes.medium : units.iconSizes.smallMedium + units.smallSpacing * 2 | ||
30 | height: isVertical ? units.iconSizes.smallMedium + units.smallSpacing * 2 : units.iconSizes.medium | 30 | height: isVertical ? units.iconSizes.smallMedium + units.smallSpacing * 2 : units.iconSizes.medium | ||
31 | property bool isVertical: plasmoid.formFactor === 3 | 31 | property bool isVertical: plasmoid.formFactor === 3 | ||
32 | opacity: plasmoid.immutable ? 0 : (mouseArea.containsMouse || plasmoid.userConfiguring ? 1 : 0.5) | 32 | opacity: plasmoid.editMode || plasmoid.userConfiguring ? (mouseArea.containsMouse || plasmoid.userConfiguring ? 1 : 0.5) : 0 | ||
33 | 33 | | |||
34 | z: 999 | 34 | z: 999 | ||
35 | 35 | | |||
36 | Behavior on opacity { | 36 | Behavior on opacity { | ||
37 | NumberAnimation { | 37 | NumberAnimation { | ||
38 | duration: units.longDuration; | 38 | duration: units.longDuration; | ||
39 | easing.type: Easing.InOutExpo; | 39 | easing.type: Easing.InOutExpo; | ||
40 | } | 40 | } | ||
Show All 31 Lines | 68 | onUserConfiguringChanged: { | |||
72 | } | 72 | } | ||
73 | } | 73 | } | ||
74 | } | 74 | } | ||
75 | 75 | | |||
76 | MouseArea { | 76 | MouseArea { | ||
77 | id: mouseArea | 77 | id: mouseArea | ||
78 | anchors.fill: parent | 78 | anchors.fill: parent | ||
79 | hoverEnabled: enabled | 79 | hoverEnabled: enabled | ||
80 | enabled: !plasmoid.immutable | 80 | enabled: plasmoid.editMode || plasmoid.userConfiguring | ||
81 | onClicked: { | 81 | onClicked: { | ||
82 | main.Plasmoid.action("configure").trigger() | 82 | main.Plasmoid.action("configure").trigger() | ||
83 | } | 83 | } | ||
84 | 84 | | |||
85 | PlasmaCore.ToolTipArea { | 85 | PlasmaCore.ToolTipArea { | ||
86 | id: toolTipArea | 86 | id: toolTipArea | ||
87 | anchors.fill: parent | 87 | anchors.fill: parent | ||
88 | mainText: i18nd("plasma_toolbox_org.kde.paneltoolbox", "Configure Panel...") | 88 | mainText: i18nd("plasma_toolbox_org.kde.paneltoolbox", "Configure Panel...") | ||
89 | icon: "configure" | 89 | icon: "configure" | ||
90 | enabled: mouseArea.containsMouse | 90 | enabled: mouseArea.containsMouse | ||
91 | } | 91 | } | ||
92 | } | 92 | } | ||
93 | } | 93 | } |