Differential D17323 Diff 47033 desktoppackage/contents/configuration/panelconfiguration/SizeHandle.qml
Changeset View
Changeset View
Standalone View
Standalone View
desktoppackage/contents/configuration/panelconfiguration/SizeHandle.qml
Context not available. | |||||
17 | */ | 17 | */ | ||
---|---|---|---|---|---|
18 | 18 | | |||
19 | import QtQuick 2.0 | 19 | import QtQuick 2.0 | ||
20 | import QtQuick.Controls 2.0 as QQC2 | ||||
20 | import org.kde.plasma.components 2.0 as PlasmaComponents | 21 | import org.kde.plasma.components 2.0 as PlasmaComponents | ||
21 | import org.kde.plasma.extras 2.0 as PlasmaExtras | 22 | import org.kde.plasma.extras 2.0 as PlasmaExtras | ||
22 | import org.kde.plasma.core 2.0 as PlasmaCore | 23 | import org.kde.plasma.core 2.0 as PlasmaCore | ||
Context not available. | |||||
27 | readonly property string textLabel: panel.location == PlasmaCore.Types.LeftEdge || panel.location == PlasmaCore.Types.RightEdge ? i18nd("plasma_shell_org.kde.plasma.desktop", "Width") : i18nd("plasma_shell_org.kde.plasma.desktop", "Height") | 28 | readonly property string textLabel: panel.location == PlasmaCore.Types.LeftEdge || panel.location == PlasmaCore.Types.RightEdge ? i18nd("plasma_shell_org.kde.plasma.desktop", "Width") : i18nd("plasma_shell_org.kde.plasma.desktop", "Height") | ||
28 | text: panelResizeHintTimer.running ? panel.thickness : textLabel | 29 | text: panelResizeHintTimer.running ? panel.thickness : textLabel | ||
29 | 30 | | |||
31 | readonly property string sizeIcon: panel.location == PlasmaCore.Types.LeftEdge || panel.location == PlasmaCore.Types.RightEdge ? "resizecol" : "resizerow" | ||||
32 | iconSource: sizeIcon | ||||
33 | | ||||
30 | checkable: true | 34 | checkable: true | ||
31 | checked: mel.pressed | 35 | checked: mel.pressed | ||
32 | 36 | | |||
Context not available. | |||||
40 | onThicknessChanged: panelResizeHintTimer.restart() | 44 | onThicknessChanged: panelResizeHintTimer.restart() | ||
41 | } | 45 | } | ||
42 | 46 | | |||
47 | QQC2.ToolTip { | ||||
48 | id: tooltip | ||||
49 | visible: false | ||||
50 | timeout: 10000 | ||||
51 | contentItem: PlasmaComponents.Label { | ||||
52 | anchors.fill: parent | ||||
53 | text: i18nd("plasma_shell_org.kde.plasma.desktop", "Click and drag the button to resize the panel.") | ||||
54 | horizontalAlignment: Text.AlignHCenter | ||||
55 | verticalAlignment: Text.AlignVCenter | ||||
56 | wrapMode: Text.WordWrap | ||||
57 | color: PlasmaCore.ColorScope.highlightedTextColor | ||||
58 | } | ||||
59 | } | ||||
60 | | ||||
43 | KQuickControlsAddons.MouseEventListener { | 61 | KQuickControlsAddons.MouseEventListener { | ||
44 | id: mel | 62 | id: mel | ||
45 | anchors.fill: parent | 63 | anchors.fill: parent | ||
Context not available. | |||||
51 | dialogRoot.closeContextMenu(); | 69 | dialogRoot.closeContextMenu(); | ||
52 | startMouseX = mouse.x | 70 | startMouseX = mouse.x | ||
53 | startMouseY = mouse.y | 71 | startMouseY = mouse.y | ||
72 | tooltip.visible = true | ||||
54 | } | 73 | } | ||
55 | onPositionChanged: { | 74 | onPositionChanged: { | ||
56 | switch (panel.location) { | 75 | switch (panel.location) { | ||
Context not available. |