Commit 0a1eb00b authored by Marco Martin's avatar Marco Martin
Browse files

Revert "Make accidental panel and panel widget deletion more difficult"

This reverts commit ba66d2ea.
parent 8e0f525a
......@@ -360,6 +360,7 @@ MouseArea {
currentApplet.applet.prepareContextualActions();
alternativesButton.visible = currentApplet.applet.action("alternatives") && currentApplet.applet.action("alternatives").enabled;
configureButton.visible = currentApplet.applet.action("configure") && currentApplet.applet.action("configure").enabled;
closeButton.visible = currentApplet.applet.action("remove") && currentApplet.applet.action("remove").enabled;
label.text = currentApplet.applet.title;
}
}
......@@ -383,21 +384,6 @@ MouseArea {
Layout.leftMargin: units.smallSpacing * 2
Layout.rightMargin: units.smallSpacing * 2
}
PlasmaComponents.ToolButton {
Layout.fillWidth: true
// we want destructive actions to be far from the initial
// cursor position, so show this on the top unless it's on
// a top panel
visible: tooltip.location !== PlasmaCore.Types.TopEdge
&& currentApplet.applet.action("remove")
&& currentApplet.applet.action("remove").enabled
iconSource: "delete"
text: i18n("Remove")
onClicked: {
tooltip.visible = false;
currentApplet.applet.action("remove").trigger();
}
}
PlasmaComponents.ToolButton {
id: configureButton
Layout.fillWidth: true
......@@ -419,12 +405,8 @@ MouseArea {
}
}
PlasmaComponents.ToolButton {
id: closeButton
Layout.fillWidth: true
// we want destructive actions to be far from the initial
// cursor position, so show this on the bottom for top panels
visible: tooltip.location === PlasmaCore.Types.TopEdge
&& currentApplet.applet.action("remove")
&& currentApplet.applet.action("remove").enabled
iconSource: "delete"
text: i18n("Remove")
onClicked: {
......
......@@ -38,16 +38,6 @@ PlasmaCore.Dialog {
LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft
LayoutMirroring.childrenInherit: true
PlasmaComponents.ToolButton {
Layout.fillWidth: true
// we want destructive actions to be far from the initial cursor
// position, so show this on the top unless it's on a top panel
visible: location !== PlasmaCore.Types.TopEdge
text: i18nd("plasma_shell_org.kde.plasma.desktop", "Remove Panel")
iconSource: "delete"
onClicked: plasmoid.action("remove").trigger();
}
PlasmaExtras.Heading {
level: 3
text: i18nd("plasma_shell_org.kde.plasma.desktop", "Panel Alignment")
......@@ -137,15 +127,6 @@ PlasmaCore.Dialog {
iconSource: panel.formFactor === PlasmaCore.Types.Vertical ? "zoom-fit-height" : "zoom-fit-width"
onClicked: panel.maximize();
}
PlasmaComponents.ToolButton {
Layout.fillWidth: true
// we want destructive actions to be far from the initial cursor
// position, so show this on the bottom for top panels
visible: location === PlasmaCore.Types.TopEdge
text: i18nd("plasma_shell_org.kde.plasma.desktop", "Remove Panel")
iconSource: "delete"
onClicked: plasmoid.action("remove").trigger();
}
}
function hide() {
......
......@@ -30,6 +30,7 @@ Item {
implicitWidth: Math.max(buttonsLayout_1.width, buttonsLayout_2.width, row.width) + units.smallSpacing * 2
implicitHeight: row.height + 20
readonly property string removePanelButtonText: i18nd("plasma_shell_org.kde.plasma.desktop", "Remove Panel")
readonly property string addWidgetsButtonText: i18nd("plasma_shell_org.kde.plasma.desktop", "Add Widgets...")
readonly property string addSpacerButtonText: i18nd("plasma_shell_org.kde.plasma.desktop", "Add Spacer")
readonly property string settingsButtonText: i18nd("plasma_shell_org.kde.plasma.desktop", "More Settings...")
......@@ -66,23 +67,12 @@ Item {
columnSpacing: units.smallSpacing
PlasmaComponents.Button {
text: buttonsLayout_2.showText ? root.addWidgetsButtonText : ""
tooltip: buttonsLayout_2.showText ? "" : root.addWidgetsButtonText
iconSource: "list-add"
Layout.fillWidth: true
onClicked: {
configDialog.close();
configDialog.showAddWidgetDialog();
}
}
PlasmaComponents.Button {
iconSource: "distribute-horizontal-x"
text: buttonsLayout_2.showText ? root.addSpacerButtonText : ""
tooltip: buttonsLayout_2.showText ? "" : root.addSpacerButtonText
iconSource: "delete"
text: buttonsLayout_1.showText ? root.removePanelButtonText : ""
tooltip: buttonsLayout_1.showText ? "" : root.removePanelButtonText
Layout.fillWidth: true
onClicked: {
configDialog.addPanelSpacer();
plasmoid.action("remove").trigger();
}
}
}
......@@ -134,6 +124,27 @@ Item {
rowSpacing: units.smallSpacing
columnSpacing: units.smallSpacing
PlasmaComponents.Button {
text: buttonsLayout_2.showText ? root.addWidgetsButtonText : ""
tooltip: buttonsLayout_2.showText ? "" : root.addWidgetsButtonText
iconSource: "list-add"
Layout.fillWidth: true
onClicked: {
configDialog.close();
configDialog.showAddWidgetDialog();
}
}
PlasmaComponents.Button {
iconSource: "distribute-horizontal-x"
text: buttonsLayout_2.showText ? root.addSpacerButtonText : ""
tooltip: buttonsLayout_2.showText ? "" : root.addSpacerButtonText
Layout.fillWidth: true
onClicked: {
configDialog.addPanelSpacer();
}
}
PlasmaComponents.Button {
id: settingsButton
iconSource: "configure"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment