mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 10:17:52 -06:00
Modify small UI things in the Add Printer dialog
This commit is contained in:
parent
8d6136bcf3
commit
32c8bbfb3c
4 changed files with 7 additions and 11 deletions
|
@ -41,10 +41,7 @@ Item
|
||||||
|
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
if (contentShown)
|
addLocalPrinterDropDown.contentShown = !contentShown
|
||||||
{
|
|
||||||
addLocalPrinterDropDown.contentShown = false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
contentComponent: networkPrinterListComponent
|
contentComponent: networkPrinterListComponent
|
||||||
|
@ -79,16 +76,13 @@ Item
|
||||||
anchors.top: addNetworkPrinterDropDown.bottom
|
anchors.top: addNetworkPrinterDropDown.bottom
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.topMargin: UM.Theme.getSize("wide_margin").height
|
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||||
|
|
||||||
title: catalog.i18nc("@label", "Add a non-networked printer")
|
title: catalog.i18nc("@label", "Add a non-networked printer")
|
||||||
|
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
if (contentShown)
|
addNetworkPrinterDropDown.contentShown = !contentShown
|
||||||
{
|
|
||||||
addNetworkPrinterDropDown.contentShown = false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
contentComponent: localPrinterListComponent
|
contentComponent: localPrinterListComponent
|
||||||
|
|
|
@ -56,7 +56,7 @@ Item
|
||||||
ScrollBar.vertical.policy: ScrollBar.AsNeeded
|
ScrollBar.vertical.policy: ScrollBar.AsNeeded
|
||||||
|
|
||||||
property int maxItemCountAtOnce: 8 // show at max 8 items at once, otherwise you need to scroll.
|
property int maxItemCountAtOnce: 8 // show at max 8 items at once, otherwise you need to scroll.
|
||||||
height: maxItemCountAtOnce * UM.Theme.getSize("action_button").height
|
height: Math.min(contentHeight, maxItemCountAtOnce * UM.Theme.getSize("action_button").height)
|
||||||
|
|
||||||
visible: networkPrinterListView.count > 0
|
visible: networkPrinterListView.count > 0
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,8 @@ Item
|
||||||
Cura.RoundedRectangle
|
Cura.RoundedRectangle
|
||||||
{
|
{
|
||||||
id: contentRectangle
|
id: contentRectangle
|
||||||
anchors.top: header.bottom
|
// Move up a bit (exaclty the width of the border) to avoid double line
|
||||||
|
y: header.height - UM.Theme.getSize("default_lining").width
|
||||||
anchors.left: header.left
|
anchors.left: header.left
|
||||||
anchors.right: header.right
|
anchors.right: header.right
|
||||||
// Add 2x lining, because it needs a bit of space on the top and the bottom.
|
// Add 2x lining, because it needs a bit of space on the top and the bottom.
|
||||||
|
|
|
@ -66,6 +66,7 @@ Window
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.margins: UM.Theme.getSize("default_margin").width
|
anchors.margins: UM.Theme.getSize("default_margin").width
|
||||||
|
anchors.leftMargin: UM.Theme.getSize("wide_margin").width
|
||||||
|
|
||||||
enabled: true
|
enabled: true
|
||||||
onClicked: dialog.visible = false
|
onClicked: dialog.visible = false
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue