From 096065a441f3eead35b30c4c38ebb51c1bb2a8bf Mon Sep 17 00:00:00 2001 From: Tamara Hogenhout Date: Thu, 10 Sep 2015 14:23:47 +0200 Subject: [PATCH 1/2] changes some word-usage and the use of capital letters Contributes to: issue CURA-129 --- resources/qml/Actions.qml | 12 ++++++------ resources/qml/Cura.qml | 7 +++++-- resources/qml/SaveButton.qml | 2 +- resources/qml/SidebarHeader.qml | 2 +- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/resources/qml/Actions.qml b/resources/qml/Actions.qml index 1f9a4dca5c..af202c6116 100644 --- a/resources/qml/Actions.qml +++ b/resources/qml/Actions.qml @@ -93,7 +93,7 @@ Item Action { id: settingsAction; - text: catalog.i18nc("@action","Configure Printers"); + text: catalog.i18nc("@action","Manage Printers"); iconName: "configure"; } @@ -149,21 +149,21 @@ Item Action { id: groupObjectsAction - text: catalog.i18nc("@action","Group objects"); + text: catalog.i18nc("@action","Group Objects"); enabled: UM.Scene.numObjectsSelected > 1 ? true: false } Action { id: unGroupObjectsAction - text: catalog.i18nc("@action","Ungroup objects"); + text: catalog.i18nc("@action","Ungroup Objects"); enabled: UM.Scene.isGroupSelected } Action { id: mergeObjectsAction - text: catalog.i18nc("@action","Merge objects"); + text: catalog.i18nc("@action","Merge Objects"); enabled: UM.Scene.numObjectsSelected > 1 ? true: false } @@ -208,7 +208,7 @@ Item Action { id: openAction; - text: catalog.i18nc("@action","Load file"); + text: catalog.i18nc("@action","Open File"); iconName: "document-open"; shortcut: StandardKey.Open; } @@ -224,7 +224,7 @@ Item Action { id: showEngineLogAction; - text: catalog.i18nc("@action","Show engine &log..."); + text: catalog.i18nc("@action","Show Engine &Log..."); iconName: "view-list-text"; } } diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index bf2718a6fa..0ee68973f9 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -112,6 +112,7 @@ UM.MainWindow MenuItem { action: actions.deleteSelection; } MenuItem { action: actions.deleteAll; } } + Menu { title: catalog.i18nc("@title:menu","&View"); @@ -297,7 +298,10 @@ UM.MainWindow { id: openFileButton; //style: UM.Backend.progress < 0 ? UM.Theme.styles.open_file_button : UM.Theme.styles.tool_button; - style: UM.Theme.styles.open_file_button + //style: UM.Theme.styles.open_file_button + text: catalog.i18nc("@action:button","Open File"); + iconSource: UM.Theme.icons.open + style: UM.Theme.styles.tool_button; tooltip: ''; anchors { @@ -337,7 +341,6 @@ UM.MainWindow right: sidebar.left; rightMargin: UM.Theme.sizes.window_margin.width; } - //: View Mode toolbar button text: catalog.i18nc("@action:button","View Mode"); iconSource: UM.Theme.icons.viewmode; diff --git a/resources/qml/SaveButton.qml b/resources/qml/SaveButton.qml index dc8131ce42..4939937976 100644 --- a/resources/qml/SaveButton.qml +++ b/resources/qml/SaveButton.qml @@ -67,7 +67,7 @@ Rectangle { color: UM.Theme.colors.sidebar_header_bar Label{ id: printJobTextfieldLabel - text: catalog.i18nc("@label:textbox", "Printjob name"); + text: catalog.i18nc("@label:textbox", "Printjob Name"); anchors.left: parent.left anchors.leftMargin: UM.Theme.sizes.default_margin.width; anchors.verticalCenter: parent.verticalCenter diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index 7cfdb4f692..0904258d94 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -27,7 +27,7 @@ Item Label{ id: settingsModeLabel - text: catalog.i18nc("@label:listbox","Print setup: "); + text: catalog.i18nc("@label:listbox","Print Setup: "); anchors.left: parent.left anchors.leftMargin: UM.Theme.sizes.default_margin.width; anchors.verticalCenter: parent.verticalCenter From 7ef41d155661cf12abacf8e2fc93ad0ff6e76ecc Mon Sep 17 00:00:00 2001 From: Tamara Hogenhout Date: Thu, 10 Sep 2015 14:57:55 +0200 Subject: [PATCH 2/2] implements the new load file button styling (so that the mouse-over label can be translated..). The final icon will be added later. Contributes to: issue CURA-129 --- resources/qml/Cura.qml | 2 +- resources/themes/cura/styles.qml | 40 ++++++++++++++++++++++---------- 2 files changed, 29 insertions(+), 13 deletions(-) diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 0ee68973f9..cea32b2abf 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -301,7 +301,7 @@ UM.MainWindow //style: UM.Theme.styles.open_file_button text: catalog.i18nc("@action:button","Open File"); iconSource: UM.Theme.icons.open - style: UM.Theme.styles.tool_button; + style: UM.Theme.styles.open_file_button tooltip: ''; anchors { diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index 3bb1b98c56..0c368ecb00 100644 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -56,23 +56,39 @@ QtObject { property Component open_file_button: Component { ButtonStyle { background: Item{ - implicitWidth: UM.Theme.sizes.loadfile_button.width - implicitHeight: UM.Theme.sizes.loadfile_button.height + implicitWidth: UM.Theme.sizes.button.width; + implicitHeight: UM.Theme.sizes.button.width; Rectangle { - width: parent.width - height: parent.height + anchors.left: parent.right + anchors.verticalCenter: parent.verticalCenter + color: "white" + width: control.hovered ? openFileLabel.width : 0; + height: openFileLabel.height + Behavior on width { NumberAnimation { duration: 100; } } + opacity: control.hovered ? 1.0 : 0.0; + Behavior on opacity { NumberAnimation { duration: 100; } } + Label { + id: openFileLabel + anchors.bottom: parent.bottom + text: control.text + font: UM.Theme.fonts.button_tooltip; + color: UM.Theme.colors.button_tooltip_text; + } + } + Rectangle { + anchors.fill: parent; color: control.hovered ? UM.Theme.colors.load_save_button_hover : UM.Theme.colors.load_save_button Behavior on color { ColorAnimation { duration: 50; } } } - Label { - anchors.centerIn: parent - text: control.text - color: UM.Theme.colors.load_save_button_text - font: UM.Theme.fonts.default - } } - label: Label{ - visible: false + label: Item { + 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; + } } } }