mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 00:58:58 +08:00
Make the default size of the expandableComponent icon depend on the height of the element
This is a way more sensible default. CURA-5785
This commit is contained in:
parent
7ca3490097
commit
429a49aa2e
@ -9,6 +9,7 @@ import UM 1.2 as UM
|
|||||||
// * The Icon; An icon that is displayed on the right of the drawer.
|
// * The Icon; An icon that is displayed on the right of the drawer.
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
|
id: base
|
||||||
// The headerItem holds the QML item that is always displayed.
|
// The headerItem holds the QML item that is always displayed.
|
||||||
property alias headerItem: headerItemLoader.sourceComponent
|
property alias headerItem: headerItemLoader.sourceComponent
|
||||||
|
|
||||||
@ -33,7 +34,7 @@ Item
|
|||||||
property alias iconColor: collapseButton.color
|
property alias iconColor: collapseButton.color
|
||||||
|
|
||||||
// The icon size (it's always drawn as a square)
|
// The icon size (it's always drawn as a square)
|
||||||
property alias iconSize: collapseButton.width
|
property alias iconSize: collapseButton.height
|
||||||
|
|
||||||
// Is the "drawer" open?
|
// Is the "drawer" open?
|
||||||
readonly property alias expanded: popup.visible
|
readonly property alias expanded: popup.visible
|
||||||
@ -89,8 +90,8 @@ Item
|
|||||||
sourceSize.width: width
|
sourceSize.width: width
|
||||||
sourceSize.height: height
|
sourceSize.height: height
|
||||||
visible: source != ""
|
visible: source != ""
|
||||||
width: UM.Theme.getSize("section_icon").width
|
width: height
|
||||||
height: width
|
height: 0.2 * base.height
|
||||||
color: "black"
|
color: "black"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,7 +28,6 @@ Cura.ExpandableComponent
|
|||||||
}
|
}
|
||||||
|
|
||||||
iconSource: expanded ? UM.Theme.getIcon("arrow_bottom") : UM.Theme.getIcon("arrow_left")
|
iconSource: expanded ? UM.Theme.getIcon("arrow_bottom") : UM.Theme.getIcon("arrow_left")
|
||||||
|
|
||||||
headerItem: Item
|
headerItem: Item
|
||||||
{
|
{
|
||||||
// Horizontal list that shows the extruders
|
// Horizontal list that shows the extruders
|
||||||
|
Loading…
x
Reference in New Issue
Block a user