From a9968acd6d424723afca3b05c64560a18f785a97 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Mon, 20 Sep 2021 16:42:22 +0200 Subject: [PATCH] Fix misalignment of images if the displayName spans to next line When the displayname of the app is long and it spans to the next line, it was pushing the icon up in the column, making it seem like it is misaligned. This is now fixed and the icons should be aligned regardless if the display name has one or two lines. CURA-8421 --- resources/qml/ApplicationSwitcher/ApplicationButton.qml | 4 ++-- resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml | 2 +- .../themes/cura-light/icons/default/ApplicationSwitcher.svg | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/qml/ApplicationSwitcher/ApplicationButton.qml b/resources/qml/ApplicationSwitcher/ApplicationButton.qml index bec806eb1c..d1d94eb4a2 100644 --- a/resources/qml/ApplicationSwitcher/ApplicationButton.qml +++ b/resources/qml/ApplicationSwitcher/ApplicationButton.qml @@ -36,7 +36,6 @@ Button { id: applicationButtonContent anchors.centerIn: parent - spacing: UM.Theme.getSize("default_margin").width UM.RecolorImage { @@ -91,8 +90,9 @@ Button anchors.horizontalCenter: parent.horizontalCenter width: base.width - UM.Theme.getSize("default_margin").width + height: base.height - applicationIcon.height - 2 * UM.Theme.getSize("default_margin").width // Account for the top and bottom margins horizontalAlignment: Text.AlignHCenter - maximumLineCount: 2 + verticalAlignment: Text.AlignVCenter wrapMode: Text.Wrap elide: Text.ElideRight } diff --git a/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml b/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml index ea2588cc36..8d4d7306f9 100644 --- a/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml +++ b/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml @@ -26,7 +26,7 @@ Item background: UM.RecolorImage { - width: UM.Theme.getSize("small_button_icon").width + width: parent.width height: width anchors.verticalCenter: appSwitcherButton.verticalCenter anchors.horizontalCenter: appSwitcherButton.horizontalCenter diff --git a/resources/themes/cura-light/icons/default/ApplicationSwitcher.svg b/resources/themes/cura-light/icons/default/ApplicationSwitcher.svg index 966b80d64e..207171b8f7 100644 --- a/resources/themes/cura-light/icons/default/ApplicationSwitcher.svg +++ b/resources/themes/cura-light/icons/default/ApplicationSwitcher.svg @@ -1,3 +1,3 @@ - - + +