mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-10 08:17:49 -06:00
Make add printer dialog resize-aware
This commit is contained in:
parent
7c8c1838e0
commit
cb73cfb0f3
3 changed files with 9 additions and 2 deletions
|
@ -87,7 +87,7 @@ Item
|
||||||
{
|
{
|
||||||
id: scrollView
|
id: scrollView
|
||||||
|
|
||||||
height: (maxItemCountAtOnce * UM.Theme.getSize("action_button").height) - UM.Theme.getSize("default_margin").height
|
height: childrenHeight
|
||||||
width: Math.floor(parent.width * 0.4)
|
width: Math.floor(parent.width * 0.4)
|
||||||
|
|
||||||
ListView
|
ListView
|
||||||
|
@ -197,7 +197,7 @@ Item
|
||||||
{
|
{
|
||||||
id: verticalLine
|
id: verticalLine
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.bottom: parent.bottom
|
height: childrenHeight - UM.Theme.getSize("default_lining").height
|
||||||
width: UM.Theme.getSize("default_lining").height
|
width: UM.Theme.getSize("default_lining").height
|
||||||
color: UM.Theme.getColor("lining")
|
color: UM.Theme.getColor("lining")
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,6 +108,12 @@ Item
|
||||||
AddLocalPrinterScrollView
|
AddLocalPrinterScrollView
|
||||||
{
|
{
|
||||||
id: localPrinterView
|
id: localPrinterView
|
||||||
|
property int childrenHeight: backButton.y - addLocalPrinterDropDown.y - UM.Theme.getSize("expandable_component_content_header").height - UM.Theme.getSize("default_margin").height
|
||||||
|
|
||||||
|
onChildrenHeightChanged:
|
||||||
|
{
|
||||||
|
addLocalPrinterDropDown.children[1].height = childrenHeight
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@ import UM 1.1 as UM
|
||||||
ScrollView
|
ScrollView
|
||||||
{
|
{
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
// Setting this property to false hides the scrollbar both when the scrollbar is not needed (child height < height)
|
// Setting this property to false hides the scrollbar both when the scrollbar is not needed (child height < height)
|
||||||
// and when the scrollbar is not actively being hovered or pressed
|
// and when the scrollbar is not actively being hovered or pressed
|
||||||
property bool scrollAlwaysVisible: true
|
property bool scrollAlwaysVisible: true
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue