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:
authorGhostkeeper <rubend@tutanota.com>2018-11-27 17:11:13 +0300
committerGhostkeeper <rubend@tutanota.com>2018-11-27 17:11:13 +0300
commit55dd9be0629b5ac091628ea9184416da7edae972 (patch)
tree6693377b879800ad831e014872f1d1de7eadd914 /resources/qml/PrinterTypeLabel.qml
parent289399825b1b2b07312008b1a87747d110195bd8 (diff)
Move PrinterTypeLabel to a more central location
So that we can re-use it in other places too. Contributes to issue CURA-5876.
Diffstat (limited to 'resources/qml/PrinterTypeLabel.qml')
-rw-r--r--resources/qml/PrinterTypeLabel.qml34
1 files changed, 34 insertions, 0 deletions
diff --git a/resources/qml/PrinterTypeLabel.qml b/resources/qml/PrinterTypeLabel.qml
new file mode 100644
index 0000000000..cd9f3b9743
--- /dev/null
+++ b/resources/qml/PrinterTypeLabel.qml
@@ -0,0 +1,34 @@
+// Copyright (c) 2018 Ultimaker B.V.
+// Cura is released under the terms of the LGPLv3 or higher.
+
+import QtQuick 2.7
+import QtQuick.Controls 2.1
+
+import UM 1.1 as UM
+
+// This component creates a label with the abbreviated name of a printer, with a rectangle surrounding the label.
+// It is created in a separated place in order to be reused whenever needed.
+Item
+{
+ property alias text: printerTypeLabel.text
+
+ width: UM.Theme.getSize("printer_type_label").width
+ height: UM.Theme.getSize("printer_type_label").height
+
+ Rectangle
+ {
+ anchors.fill: parent
+ color: UM.Theme.getColor("printer_type_label_background")
+ }
+
+ Label
+ {
+ id: printerTypeLabel
+ text: "CFFFP" // As an abbreviated name of the Custom FFF Printer
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.horizontalCenter: parent.horizontalCenter
+ renderType: Text.NativeRendering
+ font: UM.Theme.getFont("very_small")
+ color: UM.Theme.getColor("text")
+ }
+} \ No newline at end of file