Changeset View
Changeset View
Standalone View
Standalone View
desktoppackage/contents/configuration/panelconfiguration/ToolBar.qml
| Show All 24 Lines | |||||
| 25 | import org.kde.kirigami 2.0 as Kirigami | 25 | import org.kde.kirigami 2.0 as Kirigami | ||
| 26 | 26 | | |||
| 27 | Item { | 27 | Item { | ||
| 28 | id: root | 28 | id: root | ||
| 29 | state: parent.state | 29 | state: parent.state | ||
| 30 | implicitWidth: Math.max(buttonsLayout_1.width, buttonsLayout_2.width, row.width) + units.smallSpacing * 2 | 30 | implicitWidth: Math.max(buttonsLayout_1.width, buttonsLayout_2.width, row.width) + units.smallSpacing * 2 | ||
| 31 | implicitHeight: row.height + 20 | 31 | implicitHeight: row.height + 20 | ||
| 32 | 32 | | |||
| 33 | readonly property string lockWidgetsButtonText: i18nd("plasma_shell_org.kde.plasma.desktop", "Lock Widgets") | | |||
| 34 | readonly property string removePanelButtonText: i18nd("plasma_shell_org.kde.plasma.desktop", "Remove Panel") | 33 | readonly property string removePanelButtonText: i18nd("plasma_shell_org.kde.plasma.desktop", "Remove Panel") | ||
| 35 | readonly property string addWidgetsButtonText: i18nd("plasma_shell_org.kde.plasma.desktop", "Add Widgets...") | 34 | readonly property string addWidgetsButtonText: i18nd("plasma_shell_org.kde.plasma.desktop", "Add Widgets...") | ||
| 36 | readonly property string addSpacerButtonText: i18nd("plasma_shell_org.kde.plasma.desktop", "Add Spacer") | 35 | readonly property string addSpacerButtonText: i18nd("plasma_shell_org.kde.plasma.desktop", "Add Spacer") | ||
| 37 | readonly property string settingsButtonText: i18nd("plasma_shell_org.kde.plasma.desktop", "More Settings...") | 36 | readonly property string settingsButtonText: i18nd("plasma_shell_org.kde.plasma.desktop", "More Settings...") | ||
| 38 | 37 | | |||
| 39 | QQC2.Action { | 38 | QQC2.Action { | ||
| 40 | shortcut: "Escape" | 39 | shortcut: "Escape" | ||
| 41 | onTriggered: { | 40 | onTriggered: { | ||
| Show All 21 Lines | 55 | GridLayout { | |||
| 63 | anchors.topMargin: plasmoid.formFactor === PlasmaCore.Types.Vertical ? rowSpacing + closeButton.height : rowSpacing | 62 | anchors.topMargin: plasmoid.formFactor === PlasmaCore.Types.Vertical ? rowSpacing + closeButton.height : rowSpacing | ||
| 64 | 63 | | |||
| 65 | property bool showText: plasmoid.formFactor === PlasmaCore.Types.Vertical || (row.x + row.width < root.width - placeHolder.width - units.iconSizes.small*4 - units.largeSpacing*5) | 64 | property bool showText: plasmoid.formFactor === PlasmaCore.Types.Vertical || (row.x + row.width < root.width - placeHolder.width - units.iconSizes.small*4 - units.largeSpacing*5) | ||
| 66 | 65 | | |||
| 67 | rowSpacing: units.smallSpacing | 66 | rowSpacing: units.smallSpacing | ||
| 68 | columnSpacing: units.smallSpacing | 67 | columnSpacing: units.smallSpacing | ||
| 69 | 68 | | |||
| 70 | PlasmaComponents.Button { | 69 | PlasmaComponents.Button { | ||
| 71 | iconSource: "document-encrypt" | | |||
| 72 | text: buttonsLayout_1.showText ? root.lockWidgetsButtonText : "" | | |||
| 73 | tooltip: buttonsLayout_1.showText ? "" : root.lockWidgetsButtonText | | |||
| 74 | Layout.fillWidth: true | | |||
| 75 | onClicked: { | | |||
| 76 | plasmoid.action("lock widgets").trigger(); | | |||
| 77 | configDialog.close(); | | |||
| 78 | } | | |||
| 79 | } | | |||
| 80 | | ||||
| 81 | Item { | | |||
| 82 | width: units.smallSpacing | | |||
| 83 | height: units.smallSpacing | | |||
| 84 | } | | |||
| 85 | | ||||
| 86 | Kirigami.Separator { | | |||
| 87 | Layout.fillWidth: true | | |||
| 88 | Layout.fillHeight: true | | |||
| 89 | } | | |||
| 90 | | ||||
| 91 | Item { | | |||
| 92 | width: units.smallSpacing | | |||
| 93 | height: units.smallSpacing | | |||
| 94 | } | | |||
| 95 | | ||||
| 96 | PlasmaComponents.Button { | | |||
| 97 | iconSource: "delete" | 70 | iconSource: "delete" | ||
| 98 | text: buttonsLayout_1.showText ? root.removePanelButtonText : "" | 71 | text: buttonsLayout_1.showText ? root.removePanelButtonText : "" | ||
| 99 | tooltip: buttonsLayout_1.showText ? "" : root.removePanelButtonText | 72 | tooltip: buttonsLayout_1.showText ? "" : root.removePanelButtonText | ||
| 100 | Layout.fillWidth: true | 73 | Layout.fillWidth: true | ||
| 101 | onClicked: { | 74 | onClicked: { | ||
| 102 | plasmoid.action("remove").trigger(); | 75 | plasmoid.action("remove").trigger(); | ||
| 103 | } | 76 | } | ||
| 104 | } | 77 | } | ||
| ▲ Show 20 Lines • Show All 281 Lines • Show Last 20 Lines | |||||