Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime van Kessel <nallath@gmail.com>2018-11-23 20:07:50 +0300
committerJaime van Kessel <nallath@gmail.com>2018-11-23 20:07:50 +0300
commitb82ea58bc815b28815cd6991230d5a3b4d8ca78d (patch)
tree1c6e58777b1669d7a48b5a9ab52c4a9b96d9abd7 /resources
parentaf1ee535788b4d64945ef578bde3764551297ab4 (diff)
Changed all the action buttons to either use primary or secondary button
CURA-5959
Diffstat (limited to 'resources')
-rw-r--r--resources/qml/Account/GeneralOperations.qml8
-rw-r--r--resources/qml/Account/UserOperations.qml8
-rw-r--r--resources/qml/ActionPanel/OutputDevicesActionButton.qml5
-rw-r--r--resources/qml/ActionPanel/OutputProcessWidget.qml9
-rw-r--r--resources/qml/ActionPanel/SliceProcessWidget.qml49
-rw-r--r--resources/qml/PrimaryButton.qml18
-rw-r--r--resources/qml/SecondaryButton.qml18
-rw-r--r--resources/themes/cura-light/theme.json10
8 files changed, 81 insertions, 44 deletions
diff --git a/resources/qml/Account/GeneralOperations.qml b/resources/qml/Account/GeneralOperations.qml
index 4614c4ba88..b9f1025d5e 100644
--- a/resources/qml/Account/GeneralOperations.qml
+++ b/resources/qml/Account/GeneralOperations.qml
@@ -11,20 +11,16 @@ Row
{
spacing: UM.Theme.getSize("default_margin").width
- Cura.ActionButton
+ Cura.SecondaryButton
{
width: UM.Theme.getSize("account_button").width
height: UM.Theme.getSize("account_button").height
text: catalog.i18nc("@button", "Create account")
- color: UM.Theme.getColor("secondary")
- hoverColor: UM.Theme.getColor("secondary")
- textColor: UM.Theme.getColor("main_window_header_button_text_active")
- textHoverColor: UM.Theme.getColor("main_window_header_button_text_active")
onClicked: Qt.openUrlExternally("https://account.ultimaker.com/app/create")
fixedWidthMode: true
}
- Cura.ActionButton
+ Cura.PrimaryButton
{
width: UM.Theme.getSize("account_button").width
height: UM.Theme.getSize("account_button").height
diff --git a/resources/qml/Account/UserOperations.qml b/resources/qml/Account/UserOperations.qml
index c167813425..b9ffa395d6 100644
--- a/resources/qml/Account/UserOperations.qml
+++ b/resources/qml/Account/UserOperations.qml
@@ -11,20 +11,16 @@ Row
{
spacing: UM.Theme.getSize("default_margin").width
- Cura.ActionButton
+ Cura.SecondaryButton
{
width: UM.Theme.getSize("account_button").width
height: UM.Theme.getSize("account_button").height
text: catalog.i18nc("@button", "Manage account")
- color: UM.Theme.getColor("secondary")
- hoverColor: UM.Theme.getColor("secondary")
- textColor: UM.Theme.getColor("main_window_header_button_text_active")
- textHoverColor: UM.Theme.getColor("main_window_header_button_text_active")
onClicked: Qt.openUrlExternally("https://account.ultimaker.com")
fixedWidthMode: true
}
- Cura.ActionButton
+ Cura.PrimaryButton
{
width: UM.Theme.getSize("account_button").width
height: UM.Theme.getSize("account_button").height
diff --git a/resources/qml/ActionPanel/OutputDevicesActionButton.qml b/resources/qml/ActionPanel/OutputDevicesActionButton.qml
index 9682dddf14..d24d440241 100644
--- a/resources/qml/ActionPanel/OutputDevicesActionButton.qml
+++ b/resources/qml/ActionPanel/OutputDevicesActionButton.qml
@@ -12,13 +12,12 @@ Item
{
id: widget
- Cura.ActionButton
+ Cura.PrimaryButton
{
id: saveToButton
height: parent.height
fixedWidthMode: true
- shadowEnabled: true
- shadowColor: UM.Theme.getColor("primary_shadow")
+
anchors
{
top: parent.top
diff --git a/resources/qml/ActionPanel/OutputProcessWidget.qml b/resources/qml/ActionPanel/OutputProcessWidget.qml
index 79b9898e49..ddbe709a84 100644
--- a/resources/qml/ActionPanel/OutputProcessWidget.qml
+++ b/resources/qml/ActionPanel/OutputProcessWidget.qml
@@ -101,18 +101,13 @@ Column
spacing: UM.Theme.getSize("default_margin").width
width: parent.width
- Cura.ActionButton
+ Cura.SecondaryButton
{
id: previewStageShortcut
- leftPadding: UM.Theme.getSize("default_margin").width
- rightPadding: UM.Theme.getSize("default_margin").width
height: UM.Theme.getSize("action_panel_button").height
text: catalog.i18nc("@button", "Preview")
- color: UM.Theme.getColor("secondary")
- hoverColor: UM.Theme.getColor("secondary")
- textColor: UM.Theme.getColor("primary")
- textHoverColor: UM.Theme.getColor("text")
+
onClicked: UM.Controller.setActiveStage("PreviewStage")
visible: UM.Controller.activeStage != null && UM.Controller.activeStage.stageId != "PreviewStage"
diff --git a/resources/qml/ActionPanel/SliceProcessWidget.qml b/resources/qml/ActionPanel/SliceProcessWidget.qml
index 9a9f40ffac..199b94ab33 100644
--- a/resources/qml/ActionPanel/SliceProcessWidget.qml
+++ b/resources/qml/ActionPanel/SliceProcessWidget.qml
@@ -81,36 +81,41 @@ Column
}
}
- Cura.ActionButton
- {
- id: prepareButton
- width: parent.width
- height: UM.Theme.getSize("action_panel_button").height
- fixedWidthMode: true
+ Item
+ {
+ id: prepareButtons
// Get the current value from the preferences
property bool autoSlice: UM.Preferences.getValue("general/auto_slice")
// Disable the slice process when
- property bool disabledSlice: [UM.Backend.Done, UM.Backend.Error].indexOf(widget.backendState) != -1
- property bool isSlicing: [UM.Backend.NotStarted, UM.Backend.Error].indexOf(widget.backendState) == -1
-
- text: isSlicing ? catalog.i18nc("@button", "Cancel") : catalog.i18nc("@button", "Slice")
-
- enabled: !autoSlice && !disabledSlice
+ width: parent.width
+ height: UM.Theme.getSize("action_panel_button").height
visible: !autoSlice
+ Cura.PrimaryButton
+ {
+ id: sliceButton
+ fixedWidthMode: true
+ anchors.fill: parent
+ text: catalog.i18nc("@button", "Slice")
+ enabled: !autoSlice && widget.backendState != UM.Backend.Error
+ visible: widget.backendState == UM.Backend.NotStarted || widget.backendState == UM.Backend.Error
+ onClicked: sliceOrStopSlicing()
+ }
- color: isSlicing ? UM.Theme.getColor("secondary"): UM.Theme.getColor("primary")
- textColor: isSlicing ? UM.Theme.getColor("primary"): UM.Theme.getColor("button_text")
- outlineColor: "transparent"
- disabledColor: UM.Theme.getColor("action_button_disabled")
- textDisabledColor: UM.Theme.getColor("action_button_disabled_text")
- shadowEnabled: true
- shadowColor: isSlicing ? UM.Theme.getColor("secondary_shadow") : enabled ? UM.Theme.getColor("action_button_shadow"): UM.Theme.getColor("action_button_disabled_shadow")
-
- onClicked: sliceOrStopSlicing()
+ Cura.SecondaryButton
+ {
+ id: cancelButton
+ fixedWidthMode: true
+ anchors.fill: parent
+ text: catalog.i18nc("@button", "Cancel")
+ enabled: sliceButton.enabled
+ visible: !sliceButton.visible
+ onClicked: sliceOrStopSlicing()
+ }
}
+
// React when the user changes the preference of having the auto slice enabled
Connections
{
@@ -118,7 +123,7 @@ Column
onPreferenceChanged:
{
var autoSlice = UM.Preferences.getValue("general/auto_slice")
- prepareButton.autoSlice = autoSlice
+ prepareButtons.autoSlice = autoSlice
}
}
diff --git a/resources/qml/PrimaryButton.qml b/resources/qml/PrimaryButton.qml
new file mode 100644
index 0000000000..8450e524e2
--- /dev/null
+++ b/resources/qml/PrimaryButton.qml
@@ -0,0 +1,18 @@
+import QtQuick 2.2
+import QtQuick.Controls 1.1
+
+import UM 1.4 as UM
+import Cura 1.1 as Cura
+
+
+Cura.ActionButton
+{
+ shadowEnabled: true
+ shadowColor: enabled ? UM.Theme.getColor("primary_button_shadow"): UM.Theme.getColor("action_button_disabled_shadow")
+ color: UM.Theme.getColor("primary_button")
+ textColor: UM.Theme.getColor("primary_button_text")
+ outlineColor: "transparent"
+ disabledColor: UM.Theme.getColor("action_button_disabled")
+ textDisabledColor: UM.Theme.getColor("action_button_disabled_text")
+ hoverColor: UM.Theme.getColor("primary_button_hover")
+} \ No newline at end of file
diff --git a/resources/qml/SecondaryButton.qml b/resources/qml/SecondaryButton.qml
new file mode 100644
index 0000000000..0e6b79b3a7
--- /dev/null
+++ b/resources/qml/SecondaryButton.qml
@@ -0,0 +1,18 @@
+import QtQuick 2.2
+import QtQuick.Controls 1.1
+
+import UM 1.4 as UM
+import Cura 1.1 as Cura
+
+
+Cura.ActionButton
+{
+ shadowEnabled: true
+ shadowColor: enabled ? UM.Theme.getColor("secondary_button_shadow"): UM.Theme.getColor("action_button_disabled_shadow")
+ color: UM.Theme.getColor("secondary_button")
+ textColor: UM.Theme.getColor("secondary_button_text")
+ outlineColor: "transparent"
+ disabledColor: UM.Theme.getColor("action_button_disabled")
+ textDisabledColor: UM.Theme.getColor("action_button_disabled_text")
+ hoverColor: UM.Theme.getColor("secondary_button_hover")
+} \ No newline at end of file
diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json
index 888bc9bfa6..cbdc37caa1 100644
--- a/resources/themes/cura-light/theme.json
+++ b/resources/themes/cura-light/theme.json
@@ -90,6 +90,16 @@
"secondary": [245, 245, 245, 255],
"secondary_shadow": [228, 228, 228, 255],
+ "primary_button": [38,113,231,255],
+ "primary_button_shadow": [27,95,202, 255],
+ "primary_button_hover": [81,145,247, 255],
+ "primary_button_text": [255, 255, 255, 255],
+
+ "secondary_button": [240,240,240, 255],
+ "secondary_button_shadow": [228, 228, 228, 255],
+ "secondary_button_hover": [228,228,228, 255],
+ "secondary_button_text": [30,102,215, 255],
+
"main_window_header_background": [10, 8, 80, 255],
"main_window_header_button_text_active": [10, 8, 80, 255],
"main_window_header_button_text_inactive": [255, 255, 255, 255],