Added popup spacing by Y coordinate

CURA-5941
This commit is contained in:
Aleksei S 2018-11-27 11:24:09 +01:00
parent ec63e6c130
commit e6c2238fd5
2 changed files with 12 additions and 5 deletions

View file

@ -24,6 +24,9 @@ Item
// How much spacing is needed around the popupItem
property alias popupPadding: popup.padding
// How much spacing is needed for the popupItem by Y coordinate
property var popupSpacingY: 0
// How much padding is needed around the header & button
property alias headerPadding: background.padding
@ -143,7 +146,7 @@ Item
id: popup
// Ensure that the popup is located directly below the headerItem
y: headerItemLoader.height + 2 * background.padding
y: headerItemLoader.height + 2 * background.padding + popupSpacingY
// Make the popup right aligned with the rest. The 3x padding is due to left, right and padding between
// the button & text.

View file

@ -29,6 +29,7 @@ Cura.ExpandableComponent
iconSource: UM.Theme.getIcon("pencil")
popupPadding : 0
popupSpacingY: 10
onCurrentModeIndexChanged: UM.Preferences.setValue("cura/active_mode", currentModeIndex)
@ -150,10 +151,13 @@ Cura.ExpandableComponent
verticalAlignment: Text.AlignVCenter
color: UM.Theme.getColor("text")
height: parent.height
anchors.topMargin: UM.Theme.getSize("sidebar_margin").height
// anchors.bottomMargin: UM.Theme.getSize("sidebar_margin").height
anchors.left: parent.left
anchors.leftMargin: UM.Theme.getSize("print_setup_selector_margin").height
anchors
{
topMargin: UM.Theme.getSize("sidebar_margin").height
left: parent.left
leftMargin: UM.Theme.getSize("print_setup_selector_margin").height
}
}
Rectangle