Update styling of gcode save button

This commit is contained in:
Arjen Hiemstra 2015-03-30 10:58:16 +02:00
parent 55a7c9022a
commit 411a2f2d7d

View File

@ -5,28 +5,42 @@ 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;
width: UM.Theme.sizes.button_icon.width;
height: UM.Theme.sizes.button_icon.height;
sourceSize.width: width; sourceSize.width: width;
sourceSize.height: height; sourceSize.height: height;
source: UM.Theme.icons.save; source: UM.Theme.icons.save;
} }
}
Label { Label {
id: label; id: 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 {
} }
} }
} }
] ]*/
} }