This commit is contained in:
Jaime van Kessel 2015-08-19 16:51:47 +02:00
commit 5cab8b9467
27 changed files with 47 additions and 64 deletions

View File

@ -43,7 +43,7 @@ Item {
Action { Action {
id: undoAction; id: undoAction;
//: Undo action //: Undo action
text: qsTr("&Undo"); text: qsTr("Undo");
iconName: "edit-undo"; iconName: "edit-undo";
shortcut: StandardKey.Undo; shortcut: StandardKey.Undo;
} }
@ -51,7 +51,7 @@ Item {
Action { Action {
id: redoAction; id: redoAction;
//: Redo action //: Redo action
text: qsTr("&Redo"); text: qsTr("Redo");
iconName: "edit-redo"; iconName: "edit-redo";
shortcut: StandardKey.Redo; shortcut: StandardKey.Redo;
} }
@ -59,7 +59,7 @@ Item {
Action { Action {
id: quitAction; id: quitAction;
//: Quit action //: Quit action
text: qsTr("&Quit"); text: qsTr("Quit");
iconName: "application-exit"; iconName: "application-exit";
shortcut: StandardKey.Quit; shortcut: StandardKey.Quit;
} }
@ -67,20 +67,20 @@ Item {
Action { Action {
id: preferencesAction; id: preferencesAction;
//: Preferences action //: Preferences action
text: qsTr("&Preferences..."); text: qsTr("Preferences...");
iconName: "configure"; iconName: "configure";
} }
Action { Action {
id: addMachineAction; id: addMachineAction;
//: Add Printer action //: Add Printer action
text: qsTr("&Add Printer..."); text: qsTr("Add Printer...");
} }
Action { Action {
id: settingsAction; id: settingsAction;
//: Configure Printers action //: Configure Printers action
text: qsTr("&Configure Printers"); text: qsTr("Configure Printers");
iconName: "configure"; iconName: "configure";
} }
@ -102,7 +102,7 @@ Item {
Action { Action {
id: aboutAction; id: aboutAction;
//: About action //: About action
text: qsTr("&About..."); text: qsTr("About...");
iconName: "help-about"; iconName: "help-about";
} }
@ -190,7 +190,7 @@ Item {
Action { Action {
id: openAction; id: openAction;
//: Open file action //: Open file action
text: qsTr("&Open..."); text: qsTr("Load file");
iconName: "document-open"; iconName: "document-open";
shortcut: StandardKey.Open; shortcut: StandardKey.Open;
} }
@ -198,7 +198,7 @@ Item {
Action { Action {
id: saveAction; id: saveAction;
//: Save file action //: Save file action
text: qsTr("&Save..."); text: qsTr("Save...");
iconName: "document-save"; iconName: "document-save";
shortcut: StandardKey.Save; shortcut: StandardKey.Save;
} }

View File

@ -239,17 +239,15 @@ UM.MainWindow {
Button { Button {
id: openFileButton; id: openFileButton;
//style: UM.Backend.progress < 0 ? UM.Theme.styles.open_file_button : UM.Theme.styles.tool_button;
iconSource: UM.Theme.icons.open; style: UM.Theme.styles.open_file_button
style: UM.Backend.progress < 0 ? UM.Theme.styles.open_file_button : UM.Theme.styles.tool_button;
tooltip: ''; tooltip: '';
anchors { anchors {
top: parent.top; top: parent.top;
topMargin: UM.Theme.sizes.window_margin.height; topMargin: UM.Theme.sizes.loadfile_margin.height
left: parent.left; left: parent.left;
leftMargin: UM.Theme.sizes.window_margin.width; leftMargin: UM.Theme.sizes.loadfile_margin.width
} }
action: actions.open; action: actions.open;
} }

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -35,54 +35,32 @@ QtObject {
} }
} }
property Component open_file_button: Component { property Component open_file_button: Component {
ButtonStyle { ButtonStyle {
background: Item { background: Item{
implicitWidth: UM.Theme.sizes.button.width; implicitWidth: UM.Theme.sizes.loadfile_button.width
implicitHeight: UM.Theme.sizes.button.height; implicitHeight: UM.Theme.sizes.loadfile_button.height
Rectangle { Rectangle {
anchors.bottom: parent.verticalCenter; width: parent.width
width: parent.width; height: parent.height
height: control.hovered ? parent.height / 2 + label.height : 0;
Behavior on height { NumberAnimation { duration: 100; } }
opacity: control.hovered ? 1.0 : 0.0;
Behavior on opacity { NumberAnimation { duration: 100; } }
Label {
id: label;
anchors.horizontalCenter: parent.horizontalCenter;
text: control.text.replace("&", "");
font: UM.Theme.fonts.button_tooltip;
color: UM.Theme.colors.button_tooltip_text;
}
}
UM.AngledCornerRectangle {
anchors.fill: parent;
color: { color: {
if(control.hovered) { if(control.hovered) {
return UM.Theme.colors.button_active_hover; return UM.Theme.colors.open_file_button_hover
} else { } else {
return UM.Theme.colors.button_active; return UM.Theme.colors.open_file_button
} }
} }
Behavior on color { ColorAnimation { duration: 50; } } Behavior on color { ColorAnimation { duration: 50; } }
cornerSize: UM.Theme.sizes.default_margin.width; }
Label {
anchors.centerIn: parent
text: control.text
color: UM.Theme.colors.open_file_button_text
font: UM.Theme.fonts.default
} }
} }
label: Label{
label: Item { visible: false
Image {
anchors.centerIn: parent;
source: control.iconSource;
width: UM.Theme.sizes.button_icon.width;
height: UM.Theme.sizes.button_icon.height;
sourceSize: UM.Theme.sizes.button_icon;
}
} }
} }
} }

View File

@ -3,52 +3,52 @@
"large": { "large": {
"size": 1.5, "size": 1.5,
"bold": true, "bold": true,
"family": "Roboto" "family": "ProximaNova"
}, },
"default": { "default": {
"size": 1, "size": 1,
"family": "Roboto" "family": "ProximaNova"
}, },
"default_allcaps": { "default_allcaps": {
"size": 1, "size": 1,
"capitalize": true, "capitalize": true,
"family": "Roboto" "family": "ProximaNova"
}, },
"small": { "small": {
"size": 0.75, "size": 0.75,
"family": "Roboto" "family": "ProximaNova"
}, },
"tiny": { "tiny": {
"size": 0.5, "size": 0.5,
"family": "Roboto" "family": "ProximaNova"
}, },
"caption": { "caption": {
"size": 0.75, "size": 0.75,
"italic": true, "italic": true,
"family": "Roboto" "family": "ProximaNova"
}, },
"sidebar_header": { "sidebar_header": {
"size": 0.75, "size": 0.75,
"capitalize": true, "capitalize": true,
"family": "Roboto" "family": "ProximaNova"
}, },
"sidebar_save_to": { "sidebar_save_to": {
"size": 1.0, "size": 1.0,
"family": "Roboto" "family": "ProximaNova"
}, },
"timeslider_time": { "timeslider_time": {
"size": 1.0, "size": 1.0,
"bold": true, "bold": true,
"family": "Roboto" "family": "ProximaNova"
}, },
"button_tooltip": { "button_tooltip": {
"size": 0.75, "size": 0.75,
"capitalize": true, "capitalize": true,
"family": "Roboto" "family": "ProximaNova"
}, },
"setting_category": { "setting_category": {
"size": 1.5, "size": 1.5,
"family": "Roboto" "family": "ProximaNova"
} }
}, },
@ -75,6 +75,10 @@
"button_disabled": [245, 245, 245, 255], "button_disabled": [245, 245, 245, 255],
"button_tooltip_text": [35, 35, 35, 255], "button_tooltip_text": [35, 35, 35, 255],
"open_file_button": [0, 0, 0, 255],
"open_file_button_text": [255, 255, 255, 255],
"open_file_button_hover": [43, 45, 46, 255],
"scrollbar_background": [245, 245, 245, 255], "scrollbar_background": [245, 245, 245, 255],
"scrollbar_handle": [205, 202, 201, 255], "scrollbar_handle": [205, 202, 201, 255],
"scrollbar_handle_hover": [174, 174, 174, 255], "scrollbar_handle_hover": [174, 174, 174, 255],
@ -140,6 +144,9 @@
"toolbar_button": [2.0, 2.0], "toolbar_button": [2.0, 2.0],
"toolbar_spacing": [1.0, 1.0], "toolbar_spacing": [1.0, 1.0],
"loadfile_button": [11.0, 2.4],
"loadfile_margin": [0.8, 0.4],
"section": [22.0, 3.0], "section": [22.0, 3.0],
"section_icon": [2.14, 2.14], "section_icon": [2.14, 2.14],
"section_text_margin": [0.33, 0.33], "section_text_margin": [0.33, 0.33],