From 429a49aa2eddc2c42c0f592181f6f77e880954c7 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 14 Nov 2018 14:06:55 +0100 Subject: [PATCH] Make the default size of the expandableComponent icon depend on the height of the element This is a way more sensible default. CURA-5785 --- resources/qml/ExpandableComponent.qml | 7 ++++--- .../Menus/ConfigurationMenu/QuickConfigurationSelector.qml | 1 - 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/qml/ExpandableComponent.qml b/resources/qml/ExpandableComponent.qml index bfafa9b29e..c098443cd7 100644 --- a/resources/qml/ExpandableComponent.qml +++ b/resources/qml/ExpandableComponent.qml @@ -9,6 +9,7 @@ import UM 1.2 as UM // * The Icon; An icon that is displayed on the right of the drawer. Item { + id: base // The headerItem holds the QML item that is always displayed. property alias headerItem: headerItemLoader.sourceComponent @@ -33,7 +34,7 @@ Item property alias iconColor: collapseButton.color // The icon size (it's always drawn as a square) - property alias iconSize: collapseButton.width + property alias iconSize: collapseButton.height // Is the "drawer" open? readonly property alias expanded: popup.visible @@ -89,8 +90,8 @@ Item sourceSize.width: width sourceSize.height: height visible: source != "" - width: UM.Theme.getSize("section_icon").width - height: width + width: height + height: 0.2 * base.height color: "black" } diff --git a/resources/qml/Menus/ConfigurationMenu/QuickConfigurationSelector.qml b/resources/qml/Menus/ConfigurationMenu/QuickConfigurationSelector.qml index b2213918dd..e77f949661 100644 --- a/resources/qml/Menus/ConfigurationMenu/QuickConfigurationSelector.qml +++ b/resources/qml/Menus/ConfigurationMenu/QuickConfigurationSelector.qml @@ -28,7 +28,6 @@ Cura.ExpandableComponent } iconSource: expanded ? UM.Theme.getIcon("arrow_bottom") : UM.Theme.getIcon("arrow_left") - headerItem: Item { // Horizontal list that shows the extruders