Fix size problem for open project dialog

CURA-3642
This commit is contained in:
Lipu Fei 2017-04-06 14:28:42 +02:00
parent cebe52b1fe
commit 1965b02fdf

View file

@ -6,6 +6,7 @@ import QtQuick.Controls 1.1
import QtQuick.Controls.Styles 1.1 import QtQuick.Controls.Styles 1.1
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import QtQuick.Dialogs 1.1 import QtQuick.Dialogs 1.1
import QtQuick.Window 2.1
import UM 1.3 as UM import UM 1.3 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
@ -17,13 +18,13 @@ UM.Dialog
id: base id: base
title: catalog.i18nc("@title:window", "Open project file") title: catalog.i18nc("@title:window", "Open project file")
width: 420 width: 420 * Screen.devicePixelRatio
height: 140 height: 140 * Screen.devicePixelRatio
maximumHeight: height maximumHeight: height
maximumWidth: width maximumWidth: width
minimumHeight: height minimumHeight: maximumHeight
minimumWidth: width minimumWidth: maximumWidth
modality: UM.Application.platform == "linux" ? Qt.NonModal : Qt.WindowModal; modality: UM.Application.platform == "linux" ? Qt.NonModal : Qt.WindowModal;
@ -60,10 +61,8 @@ UM.Dialog
Column Column
{ {
anchors.fill: parent anchors.fill: parent
anchors.margins: UM.Theme.getSize("default_margin").width anchors.margins: 20 * Screen.devicePixelRatio
anchors.left: parent.left spacing: 10 * Screen.devicePixelRatio
anchors.right: parent.right
spacing: UM.Theme.getSize("default_margin").width
Label Label
{ {
@ -93,7 +92,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 anchors.rightMargin: UM.Theme.getSize("default_margin").width * Screen.devicePixelRatio
isDefault: true isDefault: true
onClicked: onClicked:
{ {