Merge branch 'master' of github.com:Ultimaker/Cura

This commit is contained in:
Ghostkeeper 2017-05-12 16:34:19 +02:00
commit 0cc4f90920
No known key found for this signature in database
GPG key ID: C5F96EE2BC0F7E75
9 changed files with 325 additions and 396 deletions

View file

@ -1,66 +0,0 @@
// Copyright (c) 2015 Ultimaker B.V.
// Cura is released under the terms of the AGPLv3 or higher.
import QtQuick 2.2
import QtQuick.Controls 1.1
import QtQuick.Window 2.1
import UM 1.1 as UM
UM.Dialog
{
id: base
//: Dialog title
title: catalog.i18nc("@title:window", "Multiply Model")
minimumWidth: 400 * Screen.devicePixelRatio
minimumHeight: 80 * Screen.devicePixelRatio
width: minimumWidth
height: minimumHeight
property var objectId: 0;
onAccepted: CuraApplication.multiplyObject(base.objectId, parseInt(copiesField.text))
property variant catalog: UM.I18nCatalog { name: "cura" }
signal reset()
onReset: {
copiesField.text = "1";
copiesField.selectAll();
copiesField.focus = true;
}
Row
{
spacing: UM.Theme.getSize("default_margin").width
Label {
text: "Number of copies:"
anchors.verticalCenter: copiesField.verticalCenter
}
TextField {
id: copiesField
validator: RegExpValidator { regExp: /^\d{0,2}/ }
maximumLength: 2
}
}
rightButtons:
[
Button
{
text: catalog.i18nc("@action:button","OK")
onClicked: base.accept()
enabled: base.objectId != 0 && parseInt(copiesField.text) > 0
},
Button
{
text: catalog.i18nc("@action:button","Cancel")
onClicked: base.reject()
}
]
}

View file

@ -125,7 +125,7 @@ Item
{
id: infillIcon
anchors.fill: parent;
anchors.margins: UM.Theme.getSize("infill_button_margin").width
anchors.margins: 2
sourceSize.width: width
sourceSize.height: width
@ -185,7 +185,7 @@ Item
Component.onCompleted:
{
infillModel.append({
name: catalog.i18nc("@label", "Empty"),
name: catalog.i18nc("@label", "0%"),
percentage: 0,
steps: 0,
percentageMin: -1,
@ -196,7 +196,7 @@ Item
icon: "hollow"
})
infillModel.append({
name: catalog.i18nc("@label", "Light"),
name: catalog.i18nc("@label", "20%"),
percentage: 20,
steps: 0,
percentageMin: 0,
@ -207,7 +207,7 @@ Item
icon: "sparse"
})
infillModel.append({
name: catalog.i18nc("@label", "Dense"),
name: catalog.i18nc("@label", "50%"),
percentage: 50,
steps: 0,
percentageMin: 30,
@ -218,7 +218,7 @@ Item
icon: "dense"
})
infillModel.append({
name: catalog.i18nc("@label", "Solid"),
name: catalog.i18nc("@label", "100%"),
percentage: 100,
steps: 0,
percentageMin: 70,

View file

@ -13,13 +13,10 @@ UM.Dialog
{
title: catalog.i18nc("@title:window", "Save Project")
width: 550 * Screen.devicePixelRatio
minimumWidth: 550 * Screen.devicePixelRatio
width: 500
height: 400
height: 350 * Screen.devicePixelRatio
minimumHeight: 350 * Screen.devicePixelRatio
property int spacerHeight: 10 * Screen.devicePixelRatio
property int spacerHeight: 10
property bool dontShowAgain: true
@ -42,7 +39,6 @@ UM.Dialog
Item
{
anchors.fill: parent
anchors.margins: 20 * Screen.devicePixelRatio
UM.SettingDefinitionsModel
{
@ -232,42 +228,48 @@ UM.Dialog
height: spacerHeight
width: height
}
}
Row
{
id: buttonRow
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.right: parent.right
height: childrenRect.height
CheckBox
{
id: dontShowAgainCheckbox
anchors.left: parent.left
text: catalog.i18nc("@action:label", "Don't show project summary on save again")
checked: dontShowAgain
}
}
Button
{
id: ok_button
anchors.right: parent.right
Button
{
id: ok_button
text: catalog.i18nc("@action:button","Save");
enabled: true
onClicked: {
close()
yes()
text: catalog.i18nc("@action:button","Save");
enabled: true
onClicked: {
close()
yes()
}
}
anchors.bottomMargin: - 0.5 * height
anchors.bottom: parent.bottom
anchors.right: parent.right
}
Button
{
id: cancel_button
text: catalog.i18nc("@action:button","Cancel");
enabled: true
onClicked: close()
anchors.bottom: parent.bottom
anchors.right: ok_button.left
anchors.bottomMargin: - 0.5 * height
anchors.rightMargin:2
Button
{
id: cancel_button
anchors.right: ok_button.left
anchors.rightMargin: 2
text: catalog.i18nc("@action:button","Cancel");
enabled: true
onClicked: close()
}
}
}
}