From 8a50ace0802d77e3865b1f05e2c49784c3562a45 Mon Sep 17 00:00:00 2001 From: Jan Blackquill Date: Wed, 29 Dec 2021 18:58:42 -0500 Subject: [PATCH] Break Toolbox into two rows The current ToolBox has too many items and ends up often overflowing the screen, rendering labels unreadable, and in some cases, items inaccessible. This is a quick-fix commit to ensure that the toolbox doesn't exceed screen bounds for more cases, as a 'proper' fix of wrapping items based on available space is exceedingly difficult to implement with the architecture of the toolbox. --- .../contents/ui/ToolBoxContent.qml | 50 +++++++++++-------- 1 file changed, 29 insertions(+), 21 deletions(-) diff --git a/toolboxes/desktoptoolbox/contents/ui/ToolBoxContent.qml b/toolboxes/desktoptoolbox/contents/ui/ToolBoxContent.qml index f069acbb3..57aac7c14 100644 --- a/toolboxes/desktoptoolbox/contents/ui/ToolBoxContent.qml +++ b/toolboxes/desktoptoolbox/contents/ui/ToolBoxContent.qml @@ -187,32 +187,40 @@ Item { anchors.centerIn: parent spacing: PlasmaCore.Units.smallSpacing - - PlasmaComponents3.ToolButton { - property QtObject qAction: plasmoid.action("add widgets") - text: qAction.text - icon.name: "list-add" - onClicked: qAction.trigger() - } - PlasmaComponents3.ToolButton { - property QtObject qAction: plasmoid.action("configure") - text: qAction.text - icon.name: "preferences-desktop-wallpaper" - onClicked: qAction.trigger() - } - PlasmaComponents3.ToolButton { - text: i18nd("plasma_toolbox_org.kde.desktoptoolbox", "Choose Global Theme…") - icon.name: "preferences-desktop-theme-global" - onClicked: KQuickControlsAddons.KCMShell.openSystemSettings("kcm_lookandfeel") + ColumnLayout { + spacing: PlasmaCore.Units.smallSpacing + + PlasmaComponents3.ToolButton { + property QtObject qAction: plasmoid.action("add widgets") + text: qAction.text + icon.name: "list-add" + onClicked: qAction.trigger() + } + PlasmaComponents3.ToolButton { + property QtObject qAction: plasmoid.action("configure") + text: qAction.text + icon.name: "preferences-desktop-wallpaper" + onClicked: qAction.trigger() + } } - PlasmaComponents3.ToolButton { - text: i18nd("plasma_toolbox_org.kde.desktoptoolbox", "Configure Display Settings…") - icon.name: "preferences-desktop-display" - onClicked: KQuickControlsAddons.KCMShell.openSystemSettings("kcm_kscreen") + ColumnLayout { + spacing: PlasmaCore.Units.smallSpacing + + PlasmaComponents3.ToolButton { + text: i18nd("plasma_toolbox_org.kde.desktoptoolbox", "Choose Global Theme…") + icon.name: "preferences-desktop-theme-global" + onClicked: KQuickControlsAddons.KCMShell.openSystemSettings("kcm_lookandfeel") + } + PlasmaComponents3.ToolButton { + text: i18nd("plasma_toolbox_org.kde.desktoptoolbox", "Configure Display Settings…") + icon.name: "preferences-desktop-display" + onClicked: KQuickControlsAddons.KCMShell.openSystemSettings("kcm_kscreen") + } } PlasmaComponents3.ToolButton { icon.name: "window-close" Layout.preferredWidth: height + Layout.alignment: Qt.AlignVCenter onClicked: plasmoid.editMode = false PlasmaComponents3.ToolTip { text: i18nd("plasma_toolbox_org.kde.desktoptoolbox", "Exit Edit Mode") -- GitLab