mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Merge pull request #1910 from Ultimaker/fix_dialog_sizes
Fix dialog sizes. Tested on different OSes and screens, all looked good.
This commit is contained in:
commit
9f66bc8090
7 changed files with 30 additions and 31 deletions
|
@ -12,15 +12,12 @@ UM.Dialog
|
||||||
{
|
{
|
||||||
title: catalog.i18nc("@title:window", "Open Project")
|
title: catalog.i18nc("@title:window", "Open Project")
|
||||||
|
|
||||||
width: 550 * Screen.devicePixelRatio
|
width: 500
|
||||||
minimumWidth: 550 * Screen.devicePixelRatio
|
height: 400
|
||||||
maximumWidth: minimumWidth
|
|
||||||
|
property int comboboxHeight: 15
|
||||||
|
property int spacerHeight: 10
|
||||||
|
|
||||||
height: 400 * Screen.devicePixelRatio
|
|
||||||
minimumHeight: 400 * Screen.devicePixelRatio
|
|
||||||
maximumHeight: minimumHeight
|
|
||||||
property int comboboxHeight: 15 * Screen.devicePixelRatio
|
|
||||||
property int spacerHeight: 10 * Screen.devicePixelRatio
|
|
||||||
onClosing: manager.notifyClosed()
|
onClosing: manager.notifyClosed()
|
||||||
onVisibleChanged:
|
onVisibleChanged:
|
||||||
{
|
{
|
||||||
|
@ -34,7 +31,7 @@ UM.Dialog
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: 20 * Screen.devicePixelRatio
|
anchors.margins: 20
|
||||||
|
|
||||||
UM.I18nCatalog
|
UM.I18nCatalog
|
||||||
{
|
{
|
||||||
|
@ -376,7 +373,6 @@ UM.Dialog
|
||||||
enabled: true
|
enabled: true
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.right: ok_button.left
|
anchors.right: ok_button.left
|
||||||
anchors.bottomMargin: - 0.5 * height
|
|
||||||
anchors.rightMargin:2
|
anchors.rightMargin:2
|
||||||
}
|
}
|
||||||
Button
|
Button
|
||||||
|
@ -384,7 +380,6 @@ UM.Dialog
|
||||||
id: ok_button
|
id: ok_button
|
||||||
text: catalog.i18nc("@action:button","Open");
|
text: catalog.i18nc("@action:button","Open");
|
||||||
onClicked: { manager.closeBackend(); manager.onOkButtonClicked() }
|
onClicked: { manager.closeBackend(); manager.onOkButtonClicked() }
|
||||||
anchors.bottomMargin: - 0.5 * height
|
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,8 +14,8 @@ UM.Dialog
|
||||||
//: About dialog title
|
//: About dialog title
|
||||||
title: catalog.i18nc("@title:window","About Cura")
|
title: catalog.i18nc("@title:window","About Cura")
|
||||||
|
|
||||||
minimumWidth: 450 * Screen.devicePixelRatio
|
minimumWidth: 500
|
||||||
minimumHeight: 550 * Screen.devicePixelRatio
|
minimumHeight: 650
|
||||||
width: minimumWidth
|
width: minimumWidth
|
||||||
height: minimumHeight
|
height: minimumHeight
|
||||||
|
|
||||||
|
|
|
@ -18,8 +18,8 @@ UM.Dialog
|
||||||
id: base
|
id: base
|
||||||
|
|
||||||
title: catalog.i18nc("@title:window", "Open project file")
|
title: catalog.i18nc("@title:window", "Open project file")
|
||||||
width: 450 * Screen.devicePixelRatio
|
width: 450
|
||||||
height: 150 * Screen.devicePixelRatio
|
height: 150
|
||||||
|
|
||||||
maximumHeight: height
|
maximumHeight: height
|
||||||
maximumWidth: width
|
maximumWidth: width
|
||||||
|
@ -61,10 +61,10 @@ UM.Dialog
|
||||||
Column
|
Column
|
||||||
{
|
{
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.leftMargin: 20 * Screen.devicePixelRatio
|
anchors.leftMargin: 20
|
||||||
anchors.rightMargin: 20 * Screen.devicePixelRatio
|
anchors.rightMargin: 20
|
||||||
anchors.bottomMargin: 20 * Screen.devicePixelRatio
|
anchors.bottomMargin: 20
|
||||||
spacing: 10 * Screen.devicePixelRatio
|
spacing: 10
|
||||||
|
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
|
@ -94,7 +94,7 @@ UM.Dialog
|
||||||
id: openAsProjectButton
|
id: openAsProjectButton
|
||||||
text: catalog.i18nc("@action:button", "Open as project");
|
text: catalog.i18nc("@action:button", "Open as project");
|
||||||
anchors.right: importModelsButton.left
|
anchors.right: importModelsButton.left
|
||||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width * Screen.devicePixelRatio
|
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||||
isDefault: true
|
isDefault: true
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
|
|
|
@ -81,8 +81,6 @@ Menu
|
||||||
|
|
||||||
title: catalog.i18ncp("@title:window", "Multiply Selected Model", "Multiply Selected Models", UM.Selection.selectionCount)
|
title: catalog.i18ncp("@title:window", "Multiply Selected Model", "Multiply Selected Models", UM.Selection.selectionCount)
|
||||||
|
|
||||||
width: 400 * Screen.devicePixelRatio
|
|
||||||
height: 80 * Screen.devicePixelRatio
|
|
||||||
|
|
||||||
onAccepted: CuraActions.multiplySelection(copiesField.value)
|
onAccepted: CuraActions.multiplySelection(copiesField.value)
|
||||||
|
|
||||||
|
|
|
@ -17,8 +17,8 @@ UM.Dialog
|
||||||
id: base
|
id: base
|
||||||
|
|
||||||
title: catalog.i18nc("@title:window", "Open file(s)")
|
title: catalog.i18nc("@title:window", "Open file(s)")
|
||||||
width: 420 * Screen.devicePixelRatio
|
width: 420
|
||||||
height: 170 * Screen.devicePixelRatio
|
height: 170
|
||||||
|
|
||||||
maximumHeight: height
|
maximumHeight: height
|
||||||
maximumWidth: width
|
maximumWidth: width
|
||||||
|
@ -52,12 +52,12 @@ UM.Dialog
|
||||||
Column
|
Column
|
||||||
{
|
{
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.leftMargin: 20 * Screen.devicePixelRatio
|
anchors.leftMargin: 20
|
||||||
anchors.rightMargin: 20 * Screen.devicePixelRatio
|
anchors.rightMargin: 20
|
||||||
anchors.bottomMargin: 20 * Screen.devicePixelRatio
|
anchors.bottomMargin: 20
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
spacing: 10 * Screen.devicePixelRatio
|
spacing: 10
|
||||||
|
|
||||||
Text
|
Text
|
||||||
{
|
{
|
||||||
|
|
|
@ -112,8 +112,8 @@ UM.ManagementPage
|
||||||
{
|
{
|
||||||
id: actionDialog
|
id: actionDialog
|
||||||
property var content
|
property var content
|
||||||
minimumWidth: 350 * Screen.devicePixelRatio;
|
minimumWidth: 350
|
||||||
minimumHeight: 350 * Screen.devicePixelRatio;
|
minimumHeight: 350
|
||||||
onContentChanged:
|
onContentChanged:
|
||||||
{
|
{
|
||||||
contents = content;
|
contents = content;
|
||||||
|
@ -257,6 +257,8 @@ UM.ManagementPage
|
||||||
UM.RenameDialog
|
UM.RenameDialog
|
||||||
{
|
{
|
||||||
id: renameDialog;
|
id: renameDialog;
|
||||||
|
width: 300
|
||||||
|
height: 150
|
||||||
object: base.currentItem && base.currentItem.name ? base.currentItem.name : "";
|
object: base.currentItem && base.currentItem.name ? base.currentItem.name : "";
|
||||||
property var machine_name_validator: Cura.MachineNameValidator { }
|
property var machine_name_validator: Cura.MachineNameValidator { }
|
||||||
validName: renameDialog.newName.match(renameDialog.machine_name_validator.machineNameRegex) != null;
|
validName: renameDialog.newName.match(renameDialog.machine_name_validator.machineNameRegex) != null;
|
||||||
|
|
|
@ -53,7 +53,7 @@ Item
|
||||||
id: infillCellRight
|
id: infillCellRight
|
||||||
|
|
||||||
height: childrenRect.height;
|
height: childrenRect.height;
|
||||||
width: base.width * .5
|
width: base.width * .55
|
||||||
|
|
||||||
spacing: UM.Theme.getSize("default_margin").width
|
spacing: UM.Theme.getSize("default_margin").width
|
||||||
|
|
||||||
|
@ -169,6 +169,10 @@ Item
|
||||||
Text
|
Text
|
||||||
{
|
{
|
||||||
id: infillLabel
|
id: infillLabel
|
||||||
|
width: (infillCellRight.width - ((infillModel.count - 1) * UM.Theme.getSize("default_margin").width)) / (infillModel.count);
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
font: UM.Theme.getFont("default")
|
font: UM.Theme.getFont("default")
|
||||||
anchors.top: infillIconLining.bottom
|
anchors.top: infillIconLining.bottom
|
||||||
anchors.horizontalCenter: infillIconLining.horizontalCenter
|
anchors.horizontalCenter: infillIconLining.horizontalCenter
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue