From f0eb84153b77b7c033d694ace79408fa1480245a Mon Sep 17 00:00:00 2001 From: Nate Graham Date: Tue, 3 Aug 2021 23:09:56 -0600 Subject: [PATCH] [containments/desktop] Fix applet overlay icon size with touch interaction Ths intention of this code was to present larger icons when the config overlay was shown via a touch event. However this did not work because the buttons' size was accidentally hardcoded to small, with conflicting size definitions when only one was needed. This commit fixes the issue by removing the width and height properties, using the correct layout properties, and allowing the icon size to scale ccording to the space available, which fixes the problem for touch. There are no visual changes with the mouse-based interaction. --- containments/desktop/package/contents/ui/ActionButton.qml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/containments/desktop/package/contents/ui/ActionButton.qml b/containments/desktop/package/contents/ui/ActionButton.qml index f8878da02..ddb30a0c3 100644 --- a/containments/desktop/package/contents/ui/ActionButton.qml +++ b/containments/desktop/package/contents/ui/ActionButton.qml @@ -50,11 +50,9 @@ PC3.ToolButton { PlasmaCore.SvgItem { id: icon - Layout.preferredWidth: PlasmaCore.Units.iconSizes.small + Layout.preferredWidth: PlasmaCore.Units.roundToIconSize(button.iconSize) Layout.preferredHeight: Layout.preferredWidth Layout.alignment: Qt.AlignHCenter - width: iconSize - height: iconSize svg: button.svg } -- GitLab