mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-26 12:21:26 -07:00
Getting setting section sized properly
CURA-9793
This commit is contained in:
parent
ac2e733ea6
commit
eb13ac7f6b
4 changed files with 41 additions and 19 deletions
|
|
@ -11,26 +11,30 @@ import Cura 1.7 as Cura
|
|||
|
||||
Item
|
||||
{
|
||||
property Component content: Item { visible: false }
|
||||
width: parent.width
|
||||
height: UM.Theme.getSize("section_header").height
|
||||
|
||||
property alias settingControl: settingContainer.children
|
||||
property alias settingName: settingLabel.text
|
||||
property int leftColumnWidth: width / 2
|
||||
|
||||
UM.Label
|
||||
{
|
||||
id: settingLabel
|
||||
width: leftColumnWidth
|
||||
anchors.left: parent.left
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: "TEST"
|
||||
// These numbers come from the IconWithText in RecommendedSettingSection
|
||||
anchors.leftMargin: UM.Theme.getSize("medium_button_icon").width + UM.Theme.getSize("thick_margin").width - UM.Theme.getSize("thick_lining").width
|
||||
}
|
||||
|
||||
|
||||
Loader
|
||||
{
|
||||
id: settingLoader
|
||||
width: parent.width
|
||||
height: content.height
|
||||
id: settingContainer
|
||||
height: childrenRect.height
|
||||
anchors.left: settingLabel.right
|
||||
anchors.right: parent.right
|
||||
anchers.verticalCenter: parent.verticalCenter
|
||||
sourceComponent: content
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue