mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 15:44:04 -06:00
Make it possible to disable ExpandableComponent
It won't show the drop-down icon then, won't do hovers and won't allow you to click on it. This will not remove the contents of the ExpandableComponent menu bar item though, so that has to be done in ConfigurationMenu.qml. Contributes to issue CURA-5876.
This commit is contained in:
parent
f1fec2f280
commit
1e69960464
2 changed files with 4 additions and 1 deletions
|
@ -32,6 +32,8 @@ Item
|
||||||
property color headerBackgroundColor: UM.Theme.getColor("action_button")
|
property color headerBackgroundColor: UM.Theme.getColor("action_button")
|
||||||
property color headerHoverColor: UM.Theme.getColor("action_button_hovered")
|
property color headerHoverColor: UM.Theme.getColor("action_button_hovered")
|
||||||
|
|
||||||
|
property alias enabled: mouseArea.enabled
|
||||||
|
|
||||||
// Defines the alignment of the popup with respect of the headerItem, by default to the right
|
// Defines the alignment of the popup with respect of the headerItem, by default to the right
|
||||||
property int popupAlignment: ExpandableComponent.PopupAlignment.AlignRight
|
property int popupAlignment: ExpandableComponent.PopupAlignment.AlignRight
|
||||||
|
|
||||||
|
@ -139,7 +141,7 @@ Item
|
||||||
verticalCenter: parent.verticalCenter
|
verticalCenter: parent.verticalCenter
|
||||||
margins: background.padding
|
margins: background.padding
|
||||||
}
|
}
|
||||||
visible: source != ""
|
visible: source != "" && base.enabled
|
||||||
width: height
|
width: height
|
||||||
height: Math.round(0.2 * base.height)
|
height: Math.round(0.2 * base.height)
|
||||||
color: UM.Theme.getColor("text")
|
color: UM.Theme.getColor("text")
|
||||||
|
|
|
@ -45,6 +45,7 @@ Cura.ExpandableComponent
|
||||||
orientation: ListView.Horizontal
|
orientation: ListView.Horizontal
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
model: extrudersModel
|
model: extrudersModel
|
||||||
|
visible: base.enabled
|
||||||
|
|
||||||
delegate: Item
|
delegate: Item
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue