Remove hardcoded sizes from dialogs & popups

Contributes to #6670
This commit is contained in:
Jaime van Kessel 2019-11-19 12:59:39 +01:00
parent 650377c819
commit c6f42766c7
No known key found for this signature in database
GPG key ID: 3710727397403C91
6 changed files with 11 additions and 10 deletions

View file

@ -13,8 +13,8 @@ UM.Dialog
id: base
title: catalog.i18nc("@title:window", "Open Project")
minimumWidth: 500 * screenScaleFactor
minimumHeight: 450 * screenScaleFactor
minimumWidth: UM.Theme.getSize("popup_dialog").width
minimumHeight: UM.Theme.getSize("popup_dialog").height
width: minimumWidth
height: minimumHeight

View file

@ -20,8 +20,8 @@ Window
modality: Qt.ApplicationModal
flags: Qt.Dialog | Qt.CustomizeWindowHint | Qt.WindowTitleHint | Qt.WindowCloseButtonHint
width: Math.floor(720 * screenScaleFactor)
height: Math.floor(640 * screenScaleFactor)
width: UM.Theme.getSize("large_popup_dialog").width
height: UM.Theme.getSize("large_popup_dialog").height
minimumWidth: width
maximumWidth: minimumWidth
minimumHeight: height

View file

@ -18,8 +18,8 @@ UM.Dialog
id: base
title: catalog.i18nc("@title:window", "Open project file")
width: 450 * screenScaleFactor
height: 150 * screenScaleFactor
width: UM.Theme.getSize("small_popup_dialog").width
height: UM.Theme.getSize("small_popup_dialog").height
maximumHeight: height
maximumWidth: width

View file

@ -14,8 +14,8 @@ UM.Dialog
id: base
title: catalog.i18nc("@title:window", "Discard or Keep changes")
width: 800 * screenScaleFactor
height: 400 * screenScaleFactor
width: UM.Theme.getSize("popup_dialog").width
height: UM.Theme.getSize("popup_dialog").height
property var changesModel: Cura.UserChangesModel{ id: userChangesModel}
onVisibilityChanged:
{

View file

@ -148,8 +148,6 @@ UM.ManagementPage
UM.RenameDialog
{
id: renameDialog;
width: 300 * screenScaleFactor
height: 150 * screenScaleFactor
object: base.currentItem && base.currentItem.name ? base.currentItem.name : "";
property var machine_name_validator: Cura.MachineNameValidator { }
validName: renameDialog.newName.match(renameDialog.machine_name_validator.machineNameRegex) != null;

View file

@ -441,6 +441,9 @@
"sizes": {
"window_minimum_size": [80, 48],
"large_popup_dialog": [48, 40],
"popup_dialog": [40, 36],
"small_popup_dialog": [36, 12],
"main_window_header": [0.0, 4.0],
"main_window_header_button": [8, 2.35],