mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
Scale instead of center for preview/prepare-menus. [CURA-6478]
This commit is contained in:
parent
bd262ca6c4
commit
c4265c1f67
4 changed files with 26 additions and 25 deletions
|
@ -20,15 +20,24 @@ Item
|
|||
name: "cura"
|
||||
}
|
||||
|
||||
anchors
|
||||
{
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
leftMargin: UM.Theme.getSize("wide_margin").width
|
||||
rightMargin: UM.Theme.getSize("wide_margin").width
|
||||
}
|
||||
|
||||
Row
|
||||
{
|
||||
id: stageMenuRow
|
||||
anchors.centerIn: parent
|
||||
height: parent.height
|
||||
width: childrenRect.width
|
||||
|
||||
// We want this row to have a preferred with equals to the 85% of the parent
|
||||
property int preferredWidth: Math.round(0.85 * previewMenu.width)
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
width: parent.width - 2 * UM.Theme.getSize("wide_margin").width
|
||||
height: parent.height
|
||||
|
||||
// // We want this row to have a preferred with up to the 85% of the parent
|
||||
// property int preferredWidth: Math.round(0.85 * previewMenu.width)
|
||||
|
||||
Cura.ViewsSelector
|
||||
{
|
||||
|
@ -49,12 +58,12 @@ Item
|
|||
color: UM.Theme.getColor("lining")
|
||||
}
|
||||
|
||||
// This component will grow freely up to complete the preferredWidth of the row.
|
||||
// This component will grow freely up to complete the width of the row.
|
||||
Loader
|
||||
{
|
||||
id: viewPanel
|
||||
height: parent.height
|
||||
width: source != "" ? (stageMenuRow.preferredWidth - viewsSelector.width - printSetupSelectorItem.width - 2 * UM.Theme.getSize("default_lining").width) : 0
|
||||
width: source != "" ? (previewMenu.width - viewsSelector.width - printSetupSelectorItem.width - 2 * (UM.Theme.getSize("wide_margin").width + UM.Theme.getSize("default_lining").width)) : 0
|
||||
source: UM.Controller.activeView != null && UM.Controller.activeView.stageMenuComponent != null ? UM.Controller.activeView.stageMenuComponent : ""
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue