mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-10 08:17:49 -06:00
Monitor tab refactor + skeleton loading
Contributes to CL-1051
This commit is contained in:
parent
7c01e632df
commit
97fa5094ce
9 changed files with 348 additions and 505 deletions
53
plugins/UM3NetworkPrinting/resources/qml/PrintJobTitle.qml
Normal file
53
plugins/UM3NetworkPrinting/resources/qml/PrintJobTitle.qml
Normal file
|
@ -0,0 +1,53 @@
|
|||
// Copyright (c) 2018 Ultimaker B.V.
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.3
|
||||
import QtQuick.Controls 2.0
|
||||
import UM 1.3 as UM
|
||||
|
||||
Column {
|
||||
property var job: null;
|
||||
height: childrenRect.height;
|
||||
spacing: Math.floor( UM.Theme.getSize("default_margin").height / 2); // TODO: Use explicit theme size
|
||||
width: parent.width;
|
||||
|
||||
Item {
|
||||
id: jobName;
|
||||
height: UM.Theme.getSize("monitor_tab_text_line").height;
|
||||
width: parent.width;
|
||||
|
||||
Rectangle {
|
||||
visible: !job;
|
||||
color: UM.Theme.getColor("viewport_background"); // TODO: Use explicit theme color
|
||||
height: parent.height;
|
||||
width: parent.width / 3;
|
||||
}
|
||||
Label {
|
||||
visible: job;
|
||||
text: job ? job.name : "";
|
||||
font: UM.Theme.getFont("default_bold");
|
||||
elide: Text.ElideRight;
|
||||
anchors.fill: parent;
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
id: ownerName;
|
||||
height: UM.Theme.getSize("monitor_tab_text_line").height;
|
||||
width: parent.width;
|
||||
|
||||
Rectangle {
|
||||
visible: !job;
|
||||
color: UM.Theme.getColor("viewport_background"); // TODO: Use explicit theme color
|
||||
height: parent.height;
|
||||
width: parent.width / 2;
|
||||
}
|
||||
Label {
|
||||
visible: job;
|
||||
text: job ? job.owner : "";
|
||||
font: UM.Theme.getFont("default");
|
||||
elide: Text.ElideRight;
|
||||
anchors.fill: parent;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue