Remove most of controls 1 references from networking plugin

This commit is contained in:
Jaime van Kessel 2021-11-16 15:26:23 +01:00
parent 439ba6671a
commit cefffe62cd
8 changed files with 18 additions and 46 deletions

View file

@ -3,7 +3,6 @@
import QtQuick 2.3 import QtQuick 2.3
import QtQuick.Controls 2.4 import QtQuick.Controls 2.4
import QtQuick.Controls.Styles 1.3
import UM 1.3 as UM import UM 1.3 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura

View file

@ -3,7 +3,6 @@
import QtQuick 2.2 import QtQuick 2.2
import QtQuick.Controls 2.0 import QtQuick.Controls 2.0
import QtQuick.Controls.Styles 1.4
import QtQuick.Dialogs 1.1 import QtQuick.Dialogs 1.1
import QtGraphicalEffects 1.0 import QtGraphicalEffects 1.0
import UM 1.3 as UM import UM 1.3 as UM

View file

@ -2,7 +2,7 @@
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.3 import QtQuick 2.3
import QtQuick.Controls 1.4 import QtQuick.Controls 2.4
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import QtQuick.Dialogs 1.2 import QtQuick.Dialogs 1.2
import UM 1.5 as UM import UM 1.5 as UM

View file

@ -2,8 +2,6 @@
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.3 import QtQuick 2.3
import QtQuick.Controls.Styles 1.3
import QtQuick.Controls 1.4
import UM 1.5 as UM import UM 1.5 as UM
/** /**

View file

@ -2,8 +2,7 @@
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2 import QtQuick 2.2
import QtQuick.Controls 1.4 import UM 1.5 as UM
import UM 1.2 as UM
/** /**
* A MonitorPrinterPill is a blue-colored tag indicating which printers a print * A MonitorPrinterPill is a blue-colored tag indicating which printers a print
@ -17,20 +16,19 @@ Item
implicitHeight: 18 * screenScaleFactor // TODO: Theme! implicitHeight: 18 * screenScaleFactor // TODO: Theme!
implicitWidth: Math.max(printerNameLabel.contentWidth + 12 * screenScaleFactor, 36 * screenScaleFactor) // TODO: Theme! implicitWidth: Math.max(printerNameLabel.contentWidth + 12 * screenScaleFactor, 36 * screenScaleFactor) // TODO: Theme!
Rectangle { Rectangle
{
id: background id: background
anchors.fill: parent anchors.fill: parent
color: printerNameLabel.visible ? UM.Theme.getColor("monitor_printer_family_tag") : UM.Theme.getColor("monitor_skeleton_loading") color: printerNameLabel.visible ? UM.Theme.getColor("monitor_printer_family_tag") : UM.Theme.getColor("monitor_skeleton_loading")
radius: 2 * screenScaleFactor // TODO: Theme! radius: 2 * screenScaleFactor // TODO: Theme!
} }
Label { UM.Label
{
id: printerNameLabel id: printerNameLabel
anchors.centerIn: parent anchors.centerIn: parent
color: UM.Theme.getColor("text")
text: monitorPrinterPill.text text: monitorPrinterPill.text
font.pointSize: 10 // TODO: Theme!
visible: monitorPrinterPill.text !== "" visible: monitorPrinterPill.text !== ""
renderType: Text.NativeRendering
} }
} }

View file

@ -4,7 +4,7 @@
import QtQuick 2.2 import QtQuick 2.2
import QtQuick.Controls 1.4 import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4 import QtQuick.Controls.Styles 1.4
import UM 1.3 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
/** /**
@ -18,7 +18,7 @@ Item
// they might not need to though. // they might not need to though.
property bool cloudConnection: Cura.MachineManager.activeMachineIsUsingCloudConnection property bool cloudConnection: Cura.MachineManager.activeMachineIsUsingCloudConnection
Label UM.Label
{ {
id: queuedLabel id: queuedLabel
anchors anchors
@ -26,10 +26,8 @@ Item
left: queuedPrintJobs.left left: queuedPrintJobs.left
top: parent.top top: parent.top
} }
color: UM.Theme.getColor("text")
font: UM.Theme.getFont("large") font: UM.Theme.getFont("large")
text: catalog.i18nc("@label", "Queued") text: catalog.i18nc("@label", "Queued")
renderType: Text.NativeRendering
} }
Item Item
@ -52,7 +50,7 @@ Item
width: 16 * screenScaleFactor // TODO: Theme! (Y U NO USE 18 LIKE ALL OTHER ICONS?!) width: 16 * screenScaleFactor // TODO: Theme! (Y U NO USE 18 LIKE ALL OTHER ICONS?!)
height: 16 * screenScaleFactor // TODO: Theme! (Y U NO USE 18 LIKE ALL OTHER ICONS?!) height: 16 * screenScaleFactor // TODO: Theme! (Y U NO USE 18 LIKE ALL OTHER ICONS?!)
} }
Label UM.Label
{ {
id: manageQueueText id: manageQueueText
anchors anchors
@ -64,7 +62,6 @@ Item
color: UM.Theme.getColor("text_link") color: UM.Theme.getColor("text_link")
font: UM.Theme.getFont("medium") // 14pt, regular font: UM.Theme.getFont("medium") // 14pt, regular
text: catalog.i18nc("@label link to connect manager", "Manage in browser") text: catalog.i18nc("@label link to connect manager", "Manage in browser")
renderType: Text.NativeRendering
} }
} }
@ -72,14 +69,9 @@ Item
{ {
anchors.fill: manageQueueLabel anchors.fill: manageQueueLabel
onClicked: OutputDevice.openPrintJobControlPanel() onClicked: OutputDevice.openPrintJobControlPanel()
onEntered: onEntered: manageQueueText.font.underline = true
{
manageQueueText.font.underline = true onExited: manageQueueText.font.underline = false
}
onExited:
{
manageQueueText.font.underline = false
}
} }
Row Row
@ -94,50 +86,38 @@ Item
} }
spacing: 18 * screenScaleFactor // TODO: Theme! spacing: 18 * screenScaleFactor // TODO: Theme!
Label UM.Label
{ {
text: catalog.i18nc("@label", "There are no print jobs in the queue. Slice and send a job to add one.") text: catalog.i18nc("@label", "There are no print jobs in the queue. Slice and send a job to add one.")
color: UM.Theme.getColor("text")
font: UM.Theme.getFont("medium") font: UM.Theme.getFont("medium")
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
renderType: Text.NativeRendering
visible: printJobList.count === 0 visible: printJobList.count === 0
} }
Label UM.Label
{ {
text: catalog.i18nc("@label", "Print jobs") text: catalog.i18nc("@label", "Print jobs")
color: UM.Theme.getColor("text")
font: UM.Theme.getFont("medium") // 14pt, regular font: UM.Theme.getFont("medium") // 14pt, regular
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
width: 284 * screenScaleFactor // TODO: Theme! (Should match column size) width: 284 * screenScaleFactor // TODO: Theme! (Should match column size)
renderType: Text.NativeRendering
visible: printJobList.count > 0 visible: printJobList.count > 0
} }
Label UM.Label
{ {
text: catalog.i18nc("@label", "Total print time") text: catalog.i18nc("@label", "Total print time")
color: UM.Theme.getColor("text")
font: UM.Theme.getFont("medium") // 14pt, regular font: UM.Theme.getFont("medium") // 14pt, regular
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
width: UM.Theme.getSize("monitor_column").width width: UM.Theme.getSize("monitor_column").width
renderType: Text.NativeRendering
visible: printJobList.count > 0 visible: printJobList.count > 0
} }
Label UM.Label
{ {
text: catalog.i18nc("@label", "Waiting for") text: catalog.i18nc("@label", "Waiting for")
color: UM.Theme.getColor("text")
font: UM.Theme.getFont("medium") // 14pt, regular font: UM.Theme.getFont("medium") // 14pt, regular
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
width: UM.Theme.getSize("monitor_column").width width: UM.Theme.getSize("monitor_column").width
renderType: Text.NativeRendering
visible: printJobList.count > 0 visible: printJobList.count > 0
} }
} }

View file

@ -3,7 +3,6 @@
import QtQuick 2.2 import QtQuick 2.2
import QtQuick.Controls 2.0 import QtQuick.Controls 2.0
import QtQuick.Controls.Styles 1.4
import UM 1.5 as UM import UM 1.5 as UM
Button Button

View file

@ -2,8 +2,7 @@
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2 import QtQuick 2.2
import QtQuick.Window 2.2 import QtQuick.Window 2.2
import QtQuick.Controls 1.1 import QtQuick.Controls 2.15
import QtQuick.Controls 2.15 as NewControls
import UM 1.1 as UM import UM 1.1 as UM
@ -84,7 +83,7 @@ UM.Dialog {
renderType: Text.NativeRendering; renderType: Text.NativeRendering;
} }
NewControls.ComboBox { ComboBox {
id: printerComboBox; id: printerComboBox;
currentIndex: 0; currentIndex: 0;
Behavior on height { NumberAnimation { duration: 100 } } Behavior on height { NumberAnimation { duration: 100 } }