Added icons to ExpandableComponent

This also makes the entire header react to mouse events instead of just the icon/button

CURA-5785
This commit is contained in:
Jaime van Kessel 2018-11-12 14:07:45 +01:00
parent 54685c983a
commit 4be33031d7
3 changed files with 33 additions and 8 deletions

View file

@ -14,7 +14,6 @@ Cura.ExpandableComponent
{
id: base
height: childrenRect.height
property int currentModeIndex: -1
property bool hideSettings: PrintInformation.preSliced
@ -25,6 +24,11 @@ Cura.ExpandableComponent
signal showTooltip(Item item, point location, string text)
signal hideTooltip()
height: childrenRect.height
iconSource: UM.Theme.getIcon("pencil")
onCurrentModeIndexChanged: UM.Preferences.setValue("cura/active_mode", currentModeIndex)
UM.I18nCatalog
{
id: catalog
@ -42,8 +46,6 @@ Cura.ExpandableComponent
onTriggered: base.showTooltip(base, {x: 0, y: item.y}, text)
}
onCurrentModeIndexChanged: UM.Preferences.setValue("cura/active_mode", currentModeIndex)
headerItem: RowLayout
{
anchors.fill: parent