mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Fix styling of USB Printing control and firmware window
Contributes to Ultimaker/Uranium#8
This commit is contained in:
parent
4a2c0b2411
commit
17e5d1f835
2 changed files with 54 additions and 46 deletions
|
@ -4,19 +4,22 @@
|
|||
import QtQuick 2.1
|
||||
import QtQuick.Controls 1.1
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Window 2.1
|
||||
|
||||
import UM 1.0 as UM
|
||||
|
||||
UM.Dialog {
|
||||
width: 300; height: 100
|
||||
width: 500 * Screen.devicePixelRatio;
|
||||
height: 100 * Screen.devicePixelRatio;
|
||||
|
||||
Rectangle
|
||||
title: "Print with USB"
|
||||
|
||||
Column
|
||||
{
|
||||
anchors.fill: parent;
|
||||
ColumnLayout
|
||||
{
|
||||
RowLayout
|
||||
Row
|
||||
{
|
||||
spacing: UM.Theme.sizes.default_margin.width;
|
||||
Text
|
||||
{
|
||||
//: USB Printing dialog label, %1 is head temperature
|
||||
|
@ -33,15 +36,26 @@ UM.Dialog {
|
|||
}
|
||||
|
||||
}
|
||||
RowLayout
|
||||
{
|
||||
Button
|
||||
|
||||
ProgressBar
|
||||
{
|
||||
id: prog;
|
||||
anchors.left: parent.left;
|
||||
anchors.right: parent.right;
|
||||
|
||||
minimumValue: 0;
|
||||
maximumValue: 100;
|
||||
value: manager.progress
|
||||
}
|
||||
}
|
||||
|
||||
rightButtons: [
|
||||
Button {
|
||||
//: USB Printing dialog start print button
|
||||
text: qsTr("Print");
|
||||
onClicked: { manager.startPrint() }
|
||||
enabled: manager.progress == 0 ? true : false
|
||||
}
|
||||
},
|
||||
Button
|
||||
{
|
||||
//: USB Printing dialog cancel print button
|
||||
|
@ -49,21 +63,5 @@ UM.Dialog {
|
|||
onClicked: { manager.cancelPrint() }
|
||||
enabled: manager.progress == 0 ? false: true
|
||||
}
|
||||
}
|
||||
ProgressBar
|
||||
{
|
||||
id: prog;
|
||||
value: manager.progress
|
||||
minimumValue: 0;
|
||||
maximumValue: 100;
|
||||
Layout.maximumWidth:parent.width
|
||||
Layout.preferredWidth:230
|
||||
Layout.preferredHeight:25
|
||||
Layout.minimumWidth:230
|
||||
Layout.minimumHeight:25
|
||||
width: 230
|
||||
height: 25
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -17,6 +17,8 @@ UM.Dialog
|
|||
visible: true;
|
||||
modality: Qt.ApplicationModal;
|
||||
|
||||
title: "Firmware Update";
|
||||
|
||||
Column
|
||||
{
|
||||
anchors.fill: parent;
|
||||
|
@ -66,4 +68,12 @@ UM.Dialog
|
|||
id: palette;
|
||||
}
|
||||
}
|
||||
|
||||
rightButtons: [
|
||||
Button {
|
||||
text: "Close";
|
||||
enabled: manager.progress >= 100;
|
||||
onClicked: base.visible = false;
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue