mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 02:29:02 +08:00
Update styling of gcode save button
This commit is contained in:
parent
55a7c9022a
commit
411a2f2d7d
@ -5,27 +5,41 @@ import QtQuick.Layouts 1.1
|
|||||||
|
|
||||||
import UM 1.0 as UM
|
import UM 1.0 as UM
|
||||||
|
|
||||||
Rectangle {
|
UM.AngledCornerRectangle {
|
||||||
id: base;
|
id: base;
|
||||||
|
|
||||||
color: UM.Theme.colors.primary;
|
color: UM.Theme.colors.secondary;
|
||||||
|
cornerSize: UM.Theme.sizes.default_margin.width;
|
||||||
|
|
||||||
signal saveRequested();
|
signal saveRequested();
|
||||||
signal saveToSDRequested();
|
signal saveToSDRequested();
|
||||||
|
|
||||||
Image {
|
UM.AngledCornerRectangle {
|
||||||
|
anchors.fill: parent;
|
||||||
|
anchors.margins: 1;
|
||||||
|
cornerSize: UM.Theme.sizes.default_margin.width;
|
||||||
|
}
|
||||||
|
|
||||||
|
UM.AngledCornerRectangle {
|
||||||
id: icon;
|
id: icon;
|
||||||
|
|
||||||
anchors.left: parent.left;
|
anchors.left: parent.left;
|
||||||
anchors.top: parent.top;
|
width: parent.height;
|
||||||
anchors.bottom: parent.bottom;
|
height: parent.height;
|
||||||
|
cornerSize: UM.Theme.sizes.default_margin.width;
|
||||||
|
color: UM.Theme.colors.secondary;
|
||||||
|
|
||||||
width: height;
|
Image {
|
||||||
|
anchors.centerIn: parent;
|
||||||
|
|
||||||
sourceSize.width: width;
|
width: UM.Theme.sizes.button_icon.width;
|
||||||
sourceSize.height: height;
|
height: UM.Theme.sizes.button_icon.height;
|
||||||
|
|
||||||
source: UM.Theme.icons.save;
|
sourceSize.width: width;
|
||||||
|
sourceSize.height: height;
|
||||||
|
|
||||||
|
source: UM.Theme.icons.save;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
@ -35,7 +49,6 @@ Rectangle {
|
|||||||
anchors.right: parent.right;
|
anchors.right: parent.right;
|
||||||
horizontalAlignment: Text.AlignHCenter;
|
horizontalAlignment: Text.AlignHCenter;
|
||||||
font.pointSize: UM.Styles.largeTextSize;
|
font.pointSize: UM.Styles.largeTextSize;
|
||||||
color: "white";
|
|
||||||
|
|
||||||
//: Save file to disk button
|
//: Save file to disk button
|
||||||
text: qsTr("Save");
|
text: qsTr("Save");
|
||||||
@ -56,28 +69,28 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
states: [
|
// states: [
|
||||||
State {
|
// State {
|
||||||
name: 'sdcard';
|
// name: 'sdcard';
|
||||||
when: Printer.removableDrives.length > 0;
|
// when: Printer.removableDrives.length > 0;
|
||||||
PropertyChanges {
|
// PropertyChanges {
|
||||||
target: label;
|
// target: label;
|
||||||
//: Write to SD card button
|
// //: Write to SD card button
|
||||||
text: qsTr("Write to SD");
|
// text: qsTr("Write to SD");
|
||||||
}
|
// }
|
||||||
PropertyChanges { target: iconImage; source: UM.Resources.getIcon('sdcard.png'); }
|
// PropertyChanges { target: iconImage; source: UM.Resources.getIcon('sdcard.png'); }
|
||||||
},
|
// },
|
||||||
State {
|
// State {
|
||||||
name: 'usb';
|
// name: 'usb';
|
||||||
PropertyChanges {
|
// PropertyChanges {
|
||||||
target: label
|
// target: label
|
||||||
//: Send print over USB button
|
// //: Send print over USB button
|
||||||
text: qsTr("Send over USB");
|
// text: qsTr("Send over USB");
|
||||||
}
|
// }
|
||||||
PropertyChanges { target: iconImage; source: UM.Resources.getIcon('usb.png'); }
|
// PropertyChanges { target: iconImage; source: UM.Resources.getIcon('usb.png'); }
|
||||||
}
|
// }
|
||||||
]
|
// ]
|
||||||
|
/*
|
||||||
transitions: [
|
transitions: [
|
||||||
Transition {
|
Transition {
|
||||||
SequentialAnimation {
|
SequentialAnimation {
|
||||||
@ -93,5 +106,5 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]*/
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user