mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-07 07:09:00 +08:00
Properly limit width of text in subsubmenu
Getting rid of the layout makes a lot of things simpler here. Contributes to issue CURA-8640.
This commit is contained in:
parent
d46679c19f
commit
af33073b29
@ -254,17 +254,10 @@ Cura.MenuItem
|
||||
|
||||
color: materialColorButton.containsMouse ? UM.Theme.getColor("background_2") : UM.Theme.getColor("background_1")
|
||||
|
||||
RowLayout
|
||||
{
|
||||
spacing: 0
|
||||
opacity: materialBrandMenu.enabled ? 1 : 0.5
|
||||
height: parent.height
|
||||
|
||||
Item
|
||||
{
|
||||
// Spacer
|
||||
width: UM.Theme.getSize("default_margin").width + (model.id === materialMenu.activeMaterialId ? 0 : UM.Theme.getSize("default_arrow").height)
|
||||
}
|
||||
opacity: materialBrandMenu.enabled ? 1 : 0.5
|
||||
anchors.fill: parent
|
||||
|
||||
//Checkmark, if the material is selected.
|
||||
UM.RecolorImage
|
||||
@ -273,6 +266,9 @@ Cura.MenuItem
|
||||
visible: model.id === materialMenu.activeMaterialId
|
||||
height: UM.Theme.getSize("default_arrow").height
|
||||
width: height
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
source: UM.Theme.getIcon("Check", "low")
|
||||
color: UM.Theme.getColor("setting_control_text")
|
||||
}
|
||||
@ -280,22 +276,15 @@ Cura.MenuItem
|
||||
UM.Label
|
||||
{
|
||||
text: model.name
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width + UM.Theme.getSize("default_arrow").height
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||
|
||||
elide: Label.ElideRight
|
||||
wrapMode: Text.NoWrap
|
||||
}
|
||||
|
||||
Item
|
||||
{
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Item
|
||||
{
|
||||
// Right side margin
|
||||
width: UM.Theme.getSize("default_margin").width
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea
|
||||
|
Loading…
x
Reference in New Issue
Block a user