Revert "Add theme colors"

This reverts commit 2e5eb61144.
This commit is contained in:
Ian Paschal 2019-01-21 14:05:24 +01:00
parent 2e5eb61144
commit 406ef20802
14 changed files with 63 additions and 70 deletions

View file

@ -9,35 +9,30 @@ import Cura 1.0 as Cura
Rectangle { Rectangle {
id: base id: base
property var iconSource: null;
color: "#0a0850" // TODO: Theme!
height: width;
radius: Math.round(0.5 * width);
width: 24 * screenScaleFactor;
property var enabled: true property var enabled: true
property var iconSource: null
color: UM.Theme.getColor("small_button_active") UM.RecolorImage {
height: UM.Theme.getSize("small_button").height id: icon;
radius: Math.round(0.5 * width) anchors {
width: UM.Theme.getSize("small_button").width horizontalCenter: parent.horizontalCenter;
verticalCenter: parent.verticalCenter;
UM.RecolorImage
{
id: icon
anchors
{
horizontalCenter: parent.horizontalCenter
verticalCenter: parent.verticalCenter
} }
color: UM.Theme.getColor("small_button_text_active") color: UM.Theme.getColor("primary_text");
height: Math.round(parent.height / 2) height: width;
source: iconSource source: iconSource;
width: Math.round(parent.width / 2) width: Math.round(parent.width / 2);
} }
MouseArea MouseArea {
{ id: clickArea;
id: clickArea anchors.fill: parent;
anchors.fill: parent
hoverEnabled: base.enabled hoverEnabled: base.enabled
onClicked: onClicked: {
{
if (base.enabled) if (base.enabled)
{ {
if (OutputDevice.activeCameraUrl != "") if (OutputDevice.activeCameraUrl != "")

View file

@ -6,22 +6,21 @@ import QtQuick.Controls 2.0
import UM 1.3 as UM import UM 1.3 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
/** // TODO: Theme & documentation!
* The expandable component has 3 major sub components: // The expandable component has 3 major sub components:
* - The headerItem Always visible and should hold some info about what happens if the component is expanded // * The headerItem Always visible and should hold some info about what happens if the component is expanded
* - The popupItem The content that needs to be shown if the component is expanded. // * The popupItem The content that needs to be shown if the component is expanded.
*/
Item Item
{ {
id: base id: base
property bool expanded: false property bool expanded: false
property bool enabled: true property bool enabled: true
property var borderWidth: UM.Theme.getSize("default_lining") property var borderWidth: 1
property color borderColor: UM.Theme.getColor("wide_lining") property color borderColor: "#CCCCCC"
property color headerBackgroundColor: UM.Theme.getColor("main_background") property color headerBackgroundColor: "white"
property color headerHoverColor: UM.Theme.getColor("action_button_hovered") property color headerHoverColor: "#e8f2fc"
property color drawerBackgroundColor: UM.Theme.getColor("main_background") property color drawerBackgroundColor: "white"
property alias headerItem: header.children property alias headerItem: header.children
property alias drawerItem: drawer.children property alias drawerItem: drawer.children
@ -66,7 +65,7 @@ Item
anchors anchors
{ {
top: header.bottom top: header.bottom
topMargin: UM.Theme.getSize("default_lining") * -1 topMargin: -1
} }
border border
{ {

View file

@ -49,7 +49,7 @@ Item
{ {
id: buildplateIcon id: buildplateIcon
anchors.centerIn: parent anchors.centerIn: parent
color: UM.Theme.getColor("small_button_active") color: "#0a0850" // TODO: Theme! (Standard purple)
height: parent.height height: parent.height
source: "../svg/icons/buildplate.svg" source: "../svg/icons/buildplate.svg"
width: height width: height
@ -60,7 +60,7 @@ Item
Label Label
{ {
id: buildplateLabel id: buildplateLabel
color: UM.Theme.getColor("text") color: "#191919" // TODO: Theme!
elide: Text.ElideRight elide: Text.ElideRight
font: UM.Theme.getFont("default") // 12pt, regular font: UM.Theme.getFont("default") // 12pt, regular
text: buildplate ? buildplate : "" text: buildplate ? buildplate : ""

View file

@ -82,9 +82,9 @@ Item
onClicked: navigateTo(currentIndex - 1) onClicked: navigateTo(currentIndex - 1)
background: Rectangle background: Rectangle
{ {
color: leftButton.hovered ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("action_button") color: leftButton.hovered ? "#e8f2fc" : "#ffffff" // TODO: Theme!
border.width: 1 * screenScaleFactor // TODO: Theme! border.width: 1 * screenScaleFactor // TODO: Theme!
border.color: UM.Theme.getColor("wide_lining") border.color: "#cccccc" // TODO: Theme!
radius: 2 * screenScaleFactor // TODO: Theme! radius: 2 * screenScaleFactor // TODO: Theme!
} }
contentItem: Item contentItem: Item
@ -94,10 +94,10 @@ Item
{ {
anchors.centerIn: parent anchors.centerIn: parent
width: 18 // TODO: Theme! width: 18 // TODO: Theme!
height: width height: width // TODO: Theme!
sourceSize.width: width sourceSize.width: width // TODO: Theme!
sourceSize.height: width sourceSize.height: width // TODO: Theme!
color: UM.Theme.getColor("text") color: "#152950" // TODO: Theme!
source: UM.Theme.getIcon("arrow_left") source: UM.Theme.getIcon("arrow_left")
} }
} }

View file

@ -36,7 +36,7 @@ Item
MonitorIconExtruder MonitorIconExtruder
{ {
id: extruderIcon id: extruderIcon
color: UM.Theme.getColor("secondary") color: "#eeeeee" // TODO: Theme!
position: 0 position: 0
} }
@ -48,8 +48,8 @@ Item
left: extruderIcon.right left: extruderIcon.right
leftMargin: 12 * screenScaleFactor // TODO: Theme! leftMargin: 12 * screenScaleFactor // TODO: Theme!
} }
color: materialLabel.visible > 0 ? "transparent" : "#eeeeee" // TODO: Theme!
height: 18 * screenScaleFactor // TODO: Theme! height: 18 * screenScaleFactor // TODO: Theme!
color: materialLabel.visible > 0 ? "transparent" : UM.Theme.getColor("secondary")
width: Math.max(materialLabel.contentWidth, 60 * screenScaleFactor) // TODO: Theme! width: Math.max(materialLabel.contentWidth, 60 * screenScaleFactor) // TODO: Theme!
radius: 2 * screenScaleFactor // TODO: Theme! radius: 2 * screenScaleFactor // TODO: Theme!
@ -57,7 +57,7 @@ Item
{ {
id: materialLabel id: materialLabel
color: UM.Theme.getColor("text") color: "#191919" // TODO: Theme!
elide: Text.ElideRight elide: Text.ElideRight
font: UM.Theme.getFont("default") // 12pt, regular font: UM.Theme.getFont("default") // 12pt, regular
text: "" text: ""
@ -77,8 +77,8 @@ Item
left: materialLabelWrapper.left left: materialLabelWrapper.left
bottom: parent.bottom bottom: parent.bottom
} }
color: printCoreLabel.visible > 0 ? "transparent" : "#eeeeee" // TODO: Theme!
height: 18 * screenScaleFactor // TODO: Theme! height: 18 * screenScaleFactor // TODO: Theme!
color: printCoreLabel.visible > 0 ? "transparent" : UM.Theme.getColor("secondary")
width: Math.max(printCoreLabel.contentWidth, 36 * screenScaleFactor) // TODO: Theme! width: Math.max(printCoreLabel.contentWidth, 36 * screenScaleFactor) // TODO: Theme!
radius: 2 * screenScaleFactor // TODO: Theme! radius: 2 * screenScaleFactor // TODO: Theme!
@ -86,7 +86,7 @@ Item
{ {
id: printCoreLabel id: printCoreLabel
color: UM.Theme.getColor("text") color: "#191919" // TODO: Theme!
elide: Text.ElideRight elide: Text.ElideRight
font: UM.Theme.getFont("default_bold") // 12pt, bold font: UM.Theme.getFont("default_bold") // 12pt, bold
text: "" text: ""

View file

@ -49,7 +49,7 @@ Item
width: 216 * screenScaleFactor // TODO: Theme! (Should match column size) width: 216 * screenScaleFactor // TODO: Theme! (Should match column size)
Rectangle Rectangle
{ {
color: UM.Theme.getColor("secondary") color: "#eeeeee"
width: Math.round(parent.width / 2) width: Math.round(parent.width / 2)
height: parent.height height: parent.height
visible: !printJob visible: !printJob
@ -57,7 +57,7 @@ Item
Label Label
{ {
text: printJob && printJob.name ? printJob.name : "" text: printJob && printJob.name ? printJob.name : ""
color: UM.Theme.getColor("text") color: "#374355"
elide: Text.ElideRight elide: Text.ElideRight
font: UM.Theme.getFont("medium") // 14pt, regular font: UM.Theme.getFont("medium") // 14pt, regular
visible: printJob visible: printJob
@ -75,7 +75,7 @@ Item
width: 216 * screenScaleFactor // TODO: Theme! (Should match column size) width: 216 * screenScaleFactor // TODO: Theme! (Should match column size)
Rectangle Rectangle
{ {
color: UM.Theme.getColor("secondary") color: "#eeeeee"
width: Math.round(parent.width / 3) width: Math.round(parent.width / 3)
height: parent.height height: parent.height
visible: !printJob visible: !printJob
@ -83,7 +83,7 @@ Item
Label Label
{ {
text: printJob ? OutputDevice.formatDuration(printJob.timeTotal) : "" text: printJob ? OutputDevice.formatDuration(printJob.timeTotal) : ""
color: UM.Theme.getColor("text") color: "#374355"
elide: Text.ElideRight elide: Text.ElideRight
font: UM.Theme.getFont("medium") // 14pt, regular font: UM.Theme.getFont("medium") // 14pt, regular
visible: printJob visible: printJob
@ -102,7 +102,7 @@ Item
Rectangle Rectangle
{ {
color: UM.Theme.getColor("secondary") color: "#eeeeee"
width: 72 * screenScaleFactor // TODO: Theme! width: 72 * screenScaleFactor // TODO: Theme!
height: parent.height height: parent.height
visible: !printJob visible: !printJob
@ -112,7 +112,7 @@ Item
{ {
id: printerAssignmentLabel id: printerAssignmentLabel
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
color: UM.Theme.getColor("text") color: "#374355"
elide: Text.ElideRight elide: Text.ElideRight
font: UM.Theme.getFont("medium") // 14pt, regular font: UM.Theme.getFont("medium") // 14pt, regular
text: { text: {
@ -186,7 +186,7 @@ Item
} }
Label { Label {
text: printJob && printJob.owner ? printJob.owner : "" text: printJob && printJob.owner ? printJob.owner : ""
color: UM.Theme.getColor("text") color: "#374355" // TODO: Theme!
elide: Text.ElideRight elide: Text.ElideRight
font: UM.Theme.getFont("medium") // 14pt, regular font: UM.Theme.getFont("medium") // 14pt, regular
anchors.top: printerConfiguration.top anchors.top: printerConfiguration.top

View file

@ -19,7 +19,7 @@ Item
Rectangle Rectangle
{ {
anchors.fill: parent anchors.fill: parent
color: printJob ? "transparent" : UM.Theme.getColor("secondary") color: printJob ? "transparent" : "#eeeeee" // TODO: Theme!
radius: 8 // TODO: Theme! radius: 8 // TODO: Theme!
Image Image
{ {

View file

@ -34,16 +34,16 @@ Item
{ {
background: Rectangle background: Rectangle
{ {
color: "#f5f5f5" // TODO: Theme!
implicitHeight: visible ? 8 * screenScaleFactor : 0 // TODO: Theme! implicitHeight: visible ? 8 * screenScaleFactor : 0 // TODO: Theme!
color: UM.Theme.getColor("progressbar_background")
implicitWidth: 180 * screenScaleFactor // TODO: Theme! implicitWidth: 180 * screenScaleFactor // TODO: Theme!
radius: 2 * screenScaleFactor // TODO: Theme! radius: 2 * screenScaleFactor // TODO: Theme!
} }
progress: Rectangle progress: Rectangle
{ {
id: progressItem; id: progressItem;
color: printJob && printJob.isActive ? "#3282ff" : "#CCCCCC" // TODO: Theme!
radius: 2 * screenScaleFactor // TODO: Theme! radius: 2 * screenScaleFactor // TODO: Theme!
color: printJob && printJob.isActive ? UM.Theme.getColor("progressbar_control") : UM.Theme.getColor("progressbar_disabled")
} }
} }
} }
@ -56,7 +56,7 @@ Item
leftMargin: 18 * screenScaleFactor // TODO: Theme! leftMargin: 18 * screenScaleFactor // TODO: Theme!
} }
text: printJob ? Math.round(printJob.progress * 100) + "%" : "0%" text: printJob ? Math.round(printJob.progress * 100) + "%" : "0%"
color: printJob && printJob.isActive ? UM.Theme.getColor("text") : UM.Theme.getColor("text_inactive") color: printJob && printJob.isActive ? "#374355" : "#babac1" // TODO: Theme!
width: contentWidth width: contentWidth
font: UM.Theme.getFont("medium") // 14pt, regular font: UM.Theme.getFont("medium") // 14pt, regular
@ -72,7 +72,7 @@ Item
left: percentLabel.right left: percentLabel.right
leftMargin: 18 * screenScaleFactor // TODO: Theme! leftMargin: 18 * screenScaleFactor // TODO: Theme!
} }
color: UM.Theme.getColor("text") color: "#374355" // TODO: Theme!
font: UM.Theme.getFont("medium") // 14pt, regular font: UM.Theme.getFont("medium") // 14pt, regular
text: text:
{ {

View file

@ -69,7 +69,7 @@ Item
id: printerImage id: printerImage
width: 108 * screenScaleFactor // TODO: Theme! width: 108 * screenScaleFactor // TODO: Theme!
height: 108 * screenScaleFactor // TODO: Theme! height: 108 * screenScaleFactor // TODO: Theme!
color: printer ? "transparent" : UM.Theme.getColor("secondary") color: printer ? "transparent" : "#eeeeee" // TODO: Theme!
radius: 8 // TODO: Theme! radius: 8 // TODO: Theme!
Image Image
{ {
@ -94,8 +94,8 @@ Item
{ {
id: printerNameLabel id: printerNameLabel
// color: "#414054" // TODO: Theme! // color: "#414054" // TODO: Theme!
color: printer ? "transparent" : "#eeeeee" // TODO: Theme!
height: 18 * screenScaleFactor // TODO: Theme! height: 18 * screenScaleFactor // TODO: Theme!
color: printer ? "transparent" : UM.Theme.getColor("secondary")
width: parent.width width: parent.width
radius: 2 * screenScaleFactor // TODO: Theme! radius: 2 * screenScaleFactor // TODO: Theme!
@ -116,8 +116,8 @@ Item
Rectangle Rectangle
{ {
color: "#eeeeee" // TODO: Theme!
height: 18 * screenScaleFactor // TODO: Theme! height: 18 * screenScaleFactor // TODO: Theme!
color: UM.Theme.getColor("secondary")
radius: 2 * screenScaleFactor // TODO: Theme! radius: 2 * screenScaleFactor // TODO: Theme!
visible: !printer visible: !printer
width: 48 * screenScaleFactor // TODO: Theme! width: 48 * screenScaleFactor // TODO: Theme!

View file

@ -37,7 +37,7 @@ Item
MonitorExtruderConfiguration MonitorExtruderConfiguration
{ {
color: modelData && modelData.activeMaterial ? modelData.activeMaterial.color : UM.Theme.getColor("secondary") color: modelData && modelData.activeMaterial ? modelData.activeMaterial.color : "#eeeeee" // TODO: Theme!
material: modelData && modelData.activeMaterial ? modelData.activeMaterial.name : "" material: modelData && modelData.activeMaterial ? modelData.activeMaterial.name : ""
position: modelData && typeof(modelData.position) === "number" ? modelData.position : -1 // Use negative one to create empty extruder number position: modelData && typeof(modelData.position) === "number" ? modelData.position : -1 // Use negative one to create empty extruder number
printCore: modelData ? modelData.hotendID : "" printCore: modelData ? modelData.hotendID : ""

View file

@ -32,14 +32,14 @@ Item
Rectangle { Rectangle {
id: background id: background
anchors.fill: parent anchors.fill: parent
color: printerNameLabel.visible ? UM.Theme.getColor("printer_type_label_background") : UM.Theme.getColor("secondary") color: printerNameLabel.visible ? "#e4e4f2" : "#eeeeee"// TODO: Theme!
radius: 2 * screenScaleFactor // TODO: Theme! radius: 2 * screenScaleFactor // TODO: Theme!
} }
Label { Label {
id: printerNameLabel id: printerNameLabel
anchors.centerIn: parent anchors.centerIn: parent
color: UM.Theme.getColor("text") color: "#535369" // TODO: Theme!
text: tagText text: tagText
font.pointSize: 10 // TODO: Theme! font.pointSize: 10 // TODO: Theme!
visible: text !== "" visible: text !== ""

View file

@ -94,7 +94,7 @@ Item
Label Label
{ {
text: catalog.i18nc("@label", "Print jobs") text: catalog.i18nc("@label", "Print jobs")
color: UM.Theme.getColor("text_scene") color: "#666666"
elide: Text.ElideRight elide: Text.ElideRight
font: UM.Theme.getFont("medium") // 14pt, regular font: UM.Theme.getFont("medium") // 14pt, regular
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
@ -108,7 +108,7 @@ Item
Label Label
{ {
text: catalog.i18nc("@label", "Total print time") text: catalog.i18nc("@label", "Total print time")
color: UM.Theme.getColor("text_scene") color: "#666666"
elide: Text.ElideRight elide: Text.ElideRight
font: UM.Theme.getFont("medium") // 14pt, regular font: UM.Theme.getFont("medium") // 14pt, regular
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
@ -122,7 +122,7 @@ Item
Label Label
{ {
text: catalog.i18nc("@label", "Waiting for") text: catalog.i18nc("@label", "Waiting for")
color: UM.Theme.getColor("text_scene") color: "#666666"
elide: Text.ElideRight elide: Text.ElideRight
font: UM.Theme.getFont("medium") // 14pt, regular font: UM.Theme.getFont("medium") // 14pt, regular
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter

View file

@ -18,7 +18,7 @@ Item {
Button { Button {
id: button; id: button;
background: Rectangle { background: Rectangle {
color: UM.Theme.getColor("viewport_background") color: UM.Theme.getColor("viewport_background"); // TODO: Theme!
height: button.height; height: button.height;
opacity: button.down || button.hovered ? 1 : 0; opacity: button.down || button.hovered ? 1 : 0;
radius: Math.round(0.5 * width); radius: Math.round(0.5 * width);

View file

@ -298,7 +298,6 @@
"progressbar_background": [245, 245, 245, 255], "progressbar_background": [245, 245, 245, 255],
"progressbar_control": [50, 130, 255, 255], "progressbar_control": [50, 130, 255, 255],
"progressbar_disabled": [204, 204, 204, 255],
"slider_groove": [223, 223, 223, 255], "slider_groove": [223, 223, 223, 255],
"slider_groove_fill": [8, 7, 63, 255], "slider_groove_fill": [8, 7, 63, 255],