mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-07 22:13:58 -06:00
Merge branch 'master' into CURA-8640_PyQt6
# Conflicts: # cura/CuraApplication.py # resources/qml/Preferences/Materials/MaterialsSyncDialog.qml # resources/qml/Preferences/Materials/MaterialsView.qml
This commit is contained in:
commit
3f8907d02a
582 changed files with 8061 additions and 9724 deletions
|
@ -1,11 +1,11 @@
|
|||
// Copyright (c) 2019 Ultimaker B.V.
|
||||
// Copyright (c) 2022 Ultimaker B.V.
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Layouts 1.3
|
||||
|
||||
import UM 1.3 as UM
|
||||
import UM 1.5 as UM
|
||||
import Cura 1.7 as Cura
|
||||
|
||||
|
||||
|
@ -22,7 +22,7 @@ Item
|
|||
property bool searchingForCloudPrinters: true
|
||||
property var discoveredCloudPrintersModel: CuraApplication.getDiscoveredCloudPrintersModel()
|
||||
|
||||
// The area where either the discoveredCloudPrintersScrollView or the busyIndicator will be displayed
|
||||
// The area where either the discoveredCloudPrintersList or the busyIndicator will be displayed
|
||||
Item
|
||||
{
|
||||
id: cloudPrintersContent
|
||||
|
@ -126,14 +126,9 @@ Item
|
|||
|
||||
// The scrollView that contains the list of newly discovered Ultimaker Cloud printers. Visible only when
|
||||
// there is at least a new cloud printer.
|
||||
ScrollView
|
||||
ListView
|
||||
{
|
||||
id: discoveredCloudPrintersScrollView
|
||||
width: parent.width
|
||||
clip : true
|
||||
ScrollBar.horizontal.policy: ScrollBar.AsNeeded
|
||||
ScrollBar.vertical.policy: ScrollBar.AsNeeded
|
||||
visible: discoveredCloudPrintersModel.count > 0
|
||||
id: discoveredCloudPrintersList
|
||||
anchors
|
||||
{
|
||||
top: cloudPrintersAddedTitle.bottom
|
||||
|
@ -144,52 +139,47 @@ Item
|
|||
bottom: parent.bottom
|
||||
}
|
||||
|
||||
Column
|
||||
ScrollBar.vertical: UM.ScrollBar {}
|
||||
clip : true
|
||||
visible: discoveredCloudPrintersModel.count > 0
|
||||
spacing: UM.Theme.getSize("wide_margin").height
|
||||
|
||||
model: discoveredCloudPrintersModel
|
||||
delegate: Item
|
||||
{
|
||||
id: discoveredPrintersColumn
|
||||
spacing: 2 * UM.Theme.getSize("default_margin").height
|
||||
width: discoveredCloudPrintersList.width
|
||||
height: contentColumn.height
|
||||
|
||||
Repeater
|
||||
Column
|
||||
{
|
||||
id: discoveredCloudPrintersRepeater
|
||||
model: discoveredCloudPrintersModel
|
||||
delegate: Item
|
||||
id: contentColumn
|
||||
Label
|
||||
{
|
||||
width: discoveredCloudPrintersScrollView.width
|
||||
height: contentColumn.height
|
||||
|
||||
Column
|
||||
{
|
||||
id: contentColumn
|
||||
Label
|
||||
{
|
||||
id: cloudPrinterNameLabel
|
||||
leftPadding: UM.Theme.getSize("default_margin").width
|
||||
text: model.name
|
||||
font: UM.Theme.getFont("large_bold")
|
||||
color: UM.Theme.getColor("text")
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
Label
|
||||
{
|
||||
id: cloudPrinterTypeLabel
|
||||
leftPadding: 2 * UM.Theme.getSize("default_margin").width
|
||||
topPadding: UM.Theme.getSize("thin_margin").height
|
||||
text: {"Type: " + model.machine_type}
|
||||
font: UM.Theme.getFont("medium")
|
||||
color: UM.Theme.getColor("text")
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
Label
|
||||
{
|
||||
id: cloudPrinterFirmwareVersionLabel
|
||||
leftPadding: 2 * UM.Theme.getSize("default_margin").width
|
||||
text: {"Firmware version: " + model.firmware_version}
|
||||
font: UM.Theme.getFont("medium")
|
||||
color: UM.Theme.getColor("text")
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
}
|
||||
id: cloudPrinterNameLabel
|
||||
leftPadding: UM.Theme.getSize("default_margin").width
|
||||
text: model.name ? model.name : ""
|
||||
font: UM.Theme.getFont("large_bold")
|
||||
color: UM.Theme.getColor("text")
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
Label
|
||||
{
|
||||
id: cloudPrinterTypeLabel
|
||||
leftPadding: 2 * UM.Theme.getSize("default_margin").width
|
||||
topPadding: UM.Theme.getSize("thin_margin").height
|
||||
text: {"Type: " + model.machine_type}
|
||||
font: UM.Theme.getFont("medium")
|
||||
color: UM.Theme.getColor("text")
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
Label
|
||||
{
|
||||
id: cloudPrinterFirmwareVersionLabel
|
||||
leftPadding: 2 * UM.Theme.getSize("default_margin").width
|
||||
text: {"Firmware version: " + model.firmware_version}
|
||||
font: UM.Theme.getFont("medium")
|
||||
color: UM.Theme.getColor("text")
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// Copyright (c) 2019 Ultimaker B.V.
|
||||
// Copyright (c) 2022 Ultimaker B.V.
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Controls 2.3
|
||||
|
||||
import UM 1.3 as UM
|
||||
import UM 1.5 as UM
|
||||
import Cura 1.1 as Cura
|
||||
|
||||
|
||||
|
@ -74,121 +74,93 @@ Item
|
|||
Row
|
||||
{
|
||||
id: localPrinterSelectionItem
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
anchors.fill: parent
|
||||
|
||||
// ScrollView + ListView for selecting a local printer to add
|
||||
Cura.ScrollView
|
||||
//Selecting a local printer to add from this list.
|
||||
ListView
|
||||
{
|
||||
id: scrollView
|
||||
|
||||
height: childrenHeight
|
||||
id: machineList
|
||||
width: Math.floor(parent.width * 0.48)
|
||||
height: parent.height
|
||||
|
||||
ListView
|
||||
clip: true
|
||||
ScrollBar.vertical: UM.ScrollBar {}
|
||||
|
||||
model: UM.DefinitionContainersModel
|
||||
{
|
||||
id: machineList
|
||||
|
||||
// CURA-6793
|
||||
// Enabling the buffer seems to cause the blank items issue. When buffer is enabled, if the ListView's
|
||||
// individual item has a dynamic change on its visibility, the ListView doesn't redraw itself.
|
||||
// The default value of cacheBuffer is platform-dependent, so we explicitly disable it here.
|
||||
cacheBuffer: 0
|
||||
boundsBehavior: Flickable.StopAtBounds
|
||||
flickDeceleration: 20000 // To prevent the flicking behavior.
|
||||
model: UM.DefinitionContainersModel
|
||||
{
|
||||
id: machineDefinitionsModel
|
||||
filter: { "visible": true }
|
||||
sectionProperty: "manufacturer"
|
||||
preferredSections: preferredCategories
|
||||
}
|
||||
|
||||
section.property: "section"
|
||||
section.delegate: sectionHeader
|
||||
delegate: machineButton
|
||||
id: machineDefinitionsModel
|
||||
filter: { "visible": true }
|
||||
sectionProperty: "manufacturer"
|
||||
preferredSections: preferredCategories
|
||||
}
|
||||
|
||||
Component
|
||||
section.property: "section"
|
||||
section.delegate: Button
|
||||
{
|
||||
id: sectionHeader
|
||||
id: button
|
||||
width: machineList.width
|
||||
height: UM.Theme.getSize("action_button").height
|
||||
text: section
|
||||
|
||||
Button
|
||||
property bool isActive: base.currentSection == section
|
||||
|
||||
background: Rectangle
|
||||
{
|
||||
id: button
|
||||
width: ListView.view.width
|
||||
anchors.fill: parent
|
||||
color: isActive ? UM.Theme.getColor("setting_control_highlight") : "transparent"
|
||||
}
|
||||
|
||||
contentItem: Item
|
||||
{
|
||||
width: childrenRect.width
|
||||
height: UM.Theme.getSize("action_button").height
|
||||
text: section
|
||||
|
||||
property bool isActive: base.currentSection == section
|
||||
|
||||
background: Rectangle
|
||||
UM.RecolorImage
|
||||
{
|
||||
anchors.fill: parent
|
||||
color: isActive ? UM.Theme.getColor("setting_control_highlight") : "transparent"
|
||||
id: arrow
|
||||
anchors.left: parent.left
|
||||
width: UM.Theme.getSize("standard_arrow").width
|
||||
height: UM.Theme.getSize("standard_arrow").height
|
||||
sourceSize.width: width
|
||||
sourceSize.height: height
|
||||
color: UM.Theme.getColor("text")
|
||||
source: base.currentSection == section ? UM.Theme.getIcon("ChevronSingleDown") : UM.Theme.getIcon("ChevronSingleRight")
|
||||
}
|
||||
|
||||
contentItem: Item
|
||||
UM.Label
|
||||
{
|
||||
width: childrenRect.width
|
||||
height: UM.Theme.getSize("action_button").height
|
||||
|
||||
UM.RecolorImage
|
||||
{
|
||||
id: arrow
|
||||
anchors.left: parent.left
|
||||
width: UM.Theme.getSize("standard_arrow").width
|
||||
height: UM.Theme.getSize("standard_arrow").height
|
||||
sourceSize.width: width
|
||||
sourceSize.height: height
|
||||
color: UM.Theme.getColor("text")
|
||||
source: base.currentSection == section ? UM.Theme.getIcon("ChevronSingleDown") : UM.Theme.getIcon("ChevronSingleRight")
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
id: label
|
||||
anchors.left: arrow.right
|
||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: button.text
|
||||
font: UM.Theme.getFont("default_bold")
|
||||
color: UM.Theme.getColor("text")
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
id: label
|
||||
anchors.left: arrow.right
|
||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||
text: button.text
|
||||
font: UM.Theme.getFont("default_bold")
|
||||
}
|
||||
}
|
||||
|
||||
onClicked:
|
||||
{
|
||||
base.currentSection = section
|
||||
base.updateCurrentItemUponSectionChange()
|
||||
}
|
||||
onClicked:
|
||||
{
|
||||
base.currentSection = section
|
||||
base.updateCurrentItemUponSectionChange()
|
||||
}
|
||||
}
|
||||
|
||||
Component
|
||||
delegate: Cura.RadioButton
|
||||
{
|
||||
id: machineButton
|
||||
|
||||
Cura.RadioButton
|
||||
id: radioButton
|
||||
anchors
|
||||
{
|
||||
id: radioButton
|
||||
anchors
|
||||
{
|
||||
left: parent !== null ? parent.left: undefined
|
||||
leftMargin: UM.Theme.getSize("standard_list_lineheight").width
|
||||
left: parent !== null ? parent.left : undefined
|
||||
leftMargin: UM.Theme.getSize("standard_list_lineheight").width
|
||||
|
||||
right: parent !== null ? parent.right: undefined
|
||||
rightMargin: UM.Theme.getSize("default_margin").width
|
||||
}
|
||||
height: visible ? UM.Theme.getSize("standard_list_lineheight").height : 0
|
||||
|
||||
checked: ListView.view.currentIndex == index
|
||||
text: name
|
||||
visible: base.currentSection.toLowerCase() === section.toLowerCase()
|
||||
onClicked: ListView.view.currentIndex = index
|
||||
right: parent !== null ? parent.right : undefined
|
||||
rightMargin: UM.Theme.getSize("default_margin").width
|
||||
}
|
||||
height: visible ? UM.Theme.getSize("standard_list_lineheight").height : 0 //This causes the scrollbar to vary in length due to QTBUG-76830.
|
||||
|
||||
checked: machineList.currentIndex == index
|
||||
text: name
|
||||
visible: base.currentSection.toLowerCase() === section.toLowerCase()
|
||||
onClicked: machineList.currentIndex = index
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -197,7 +169,7 @@ Item
|
|||
{
|
||||
id: verticalLine
|
||||
anchors.top: parent.top
|
||||
height: childrenHeight - UM.Theme.getSize("default_lining").height
|
||||
height: parent.height - UM.Theme.getSize("default_lining").height
|
||||
width: UM.Theme.getSize("default_lining").height
|
||||
color: UM.Theme.getColor("lining")
|
||||
}
|
||||
|
@ -210,7 +182,7 @@ Item
|
|||
spacing: UM.Theme.getSize("default_margin").width
|
||||
padding: UM.Theme.getSize("default_margin").width
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
width: parent.width - (2 * UM.Theme.getSize("default_margin").width)
|
||||
wrapMode: Text.Wrap
|
||||
|
@ -228,48 +200,33 @@ Item
|
|||
|
||||
verticalItemAlignment: Grid.AlignVCenter
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: manufacturerLabel
|
||||
text: catalog.i18nc("@label", "Manufacturer")
|
||||
font: UM.Theme.getFont("default")
|
||||
color: UM.Theme.getColor("text")
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text: base.getMachineMetaDataEntry("manufacturer")
|
||||
width: parent.width - manufacturerLabel.width
|
||||
font: UM.Theme.getFont("default")
|
||||
color: UM.Theme.getColor("text")
|
||||
renderType: Text.NativeRendering
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: profileAuthorLabel
|
||||
text: catalog.i18nc("@label", "Profile author")
|
||||
font: UM.Theme.getFont("default")
|
||||
color: UM.Theme.getColor("text")
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text: base.getMachineMetaDataEntry("author")
|
||||
width: parent.width - profileAuthorLabel.width
|
||||
font: UM.Theme.getFont("default")
|
||||
color: UM.Theme.getColor("text")
|
||||
renderType: Text.NativeRendering
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: printerNameLabel
|
||||
text: catalog.i18nc("@label", "Printer name")
|
||||
font: UM.Theme.getFont("default")
|
||||
color: UM.Theme.getColor("text")
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
|
||||
Cura.TextField
|
||||
|
@ -286,7 +243,5 @@ Item
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2019 Ultimaker B.V.
|
||||
// Copyright (c) 2022 Ultimaker B.V.
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.10
|
||||
|
@ -45,11 +45,9 @@ Item
|
|||
}
|
||||
|
||||
contentComponent: networkPrinterListComponent
|
||||
|
||||
Component
|
||||
{
|
||||
id: networkPrinterListComponent
|
||||
|
||||
AddNetworkPrinterScrollView
|
||||
{
|
||||
id: networkPrinterScrollView
|
||||
|
@ -95,20 +93,13 @@ Item
|
|||
}
|
||||
|
||||
contentComponent: localPrinterListComponent
|
||||
|
||||
Component
|
||||
{
|
||||
id: localPrinterListComponent
|
||||
|
||||
AddLocalPrinterScrollView
|
||||
{
|
||||
id: localPrinterView
|
||||
property int childrenHeight: backButton.y - addLocalPrinterDropDown.y - UM.Theme.getSize("expandable_component_content_header").height - UM.Theme.getSize("default_margin").height
|
||||
|
||||
onChildrenHeightChanged:
|
||||
{
|
||||
addLocalPrinterDropDown.children[1].height = childrenHeight
|
||||
}
|
||||
height: backButton.y - addLocalPrinterDropDown.y - UM.Theme.getSize("expandable_component_content_header").height - UM.Theme.getSize("default_margin").height
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// Copyright (c) 2021 Ultimaker B.V.
|
||||
// Copyright (c) 2022 Ultimaker B.V.
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Controls 2.3
|
||||
|
||||
import UM 1.3 as UM
|
||||
import UM 1.5 as UM
|
||||
import Cura 1.1 as Cura
|
||||
|
||||
//
|
||||
|
@ -17,7 +17,7 @@ Item
|
|||
id: base
|
||||
height: networkPrinterInfo.height + controlsRectangle.height
|
||||
|
||||
property alias maxItemCountAtOnce: networkPrinterScrollView.maxItemCountAtOnce
|
||||
property alias maxItemCountAtOnce: networkPrinterListView.maxItemCountAtOnce
|
||||
property var currentItem: (networkPrinterListView.currentIndex >= 0)
|
||||
? networkPrinterListView.model[networkPrinterListView.currentIndex]
|
||||
: null
|
||||
|
@ -29,125 +29,105 @@ Item
|
|||
Item
|
||||
{
|
||||
id: networkPrinterInfo
|
||||
height: networkPrinterScrollView.visible ? networkPrinterScrollView.height : noPrinterLabel.height
|
||||
height: networkPrinterListView.visible ? networkPrinterListView.height : noPrinterLabel.height
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: noPrinterLabel
|
||||
height: UM.Theme.getSize("setting_control").height + UM.Theme.getSize("default_margin").height
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||
text: catalog.i18nc("@label", "There is no printer found over your network.")
|
||||
color: UM.Theme.getColor("text")
|
||||
renderType: Text.NativeRendering
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
visible: networkPrinterListView.count == 0 // Do not show if there are discovered devices.
|
||||
}
|
||||
|
||||
ScrollView
|
||||
ListView
|
||||
{
|
||||
id: networkPrinterScrollView
|
||||
id: networkPrinterListView
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
ScrollBar.horizontal.policy: ScrollBar.AsNeeded
|
||||
ScrollBar.vertical.policy: ScrollBar.AsNeeded
|
||||
|
||||
property int maxItemCountAtOnce: 8 // show at max 8 items at once, otherwise you need to scroll.
|
||||
height: Math.min(contentHeight, (maxItemCountAtOnce * UM.Theme.getSize("action_button").height) - UM.Theme.getSize("default_margin").height)
|
||||
|
||||
ScrollBar.vertical: UM.ScrollBar
|
||||
{
|
||||
id: networkPrinterScrollBar
|
||||
}
|
||||
clip: true
|
||||
property int maxItemCountAtOnce: 8 // show at max 8 items at once, otherwise you need to scroll.
|
||||
visible: networkPrinterListView.count > 0
|
||||
|
||||
clip: true
|
||||
model: contentLoader.enabled ? CuraApplication.getDiscoveredPrintersModel().discoveredPrinters: undefined
|
||||
cacheBuffer: 1000000 // Set a large cache to effectively just cache every list item.
|
||||
|
||||
ListView
|
||||
section.property: "modelData.sectionName"
|
||||
section.criteria: ViewSection.FullString
|
||||
section.delegate: UM.Label
|
||||
{
|
||||
id: networkPrinterListView
|
||||
anchors.fill: parent
|
||||
model: contentLoader.enabled ? CuraApplication.getDiscoveredPrintersModel().discoveredPrinters: undefined
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||
width: parent.width - networkPrinterScrollBar.width - UM.Theme.getSize("default_margin").width
|
||||
height: UM.Theme.getSize("setting_control").height
|
||||
text: section
|
||||
color: UM.Theme.getColor("small_button_text")
|
||||
}
|
||||
|
||||
section.property: "modelData.sectionName"
|
||||
section.criteria: ViewSection.FullString
|
||||
section.delegate: sectionHeading
|
||||
boundsBehavior: Flickable.StopAtBounds
|
||||
flickDeceleration: 20000 // To prevent the flicking behavior.
|
||||
cacheBuffer: 1000000 // Set a large cache to effectively just cache every list item.
|
||||
|
||||
Component.onCompleted:
|
||||
Component.onCompleted:
|
||||
{
|
||||
var toSelectIndex = -1
|
||||
// Select the first one that's not "unknown" and is the host a group by default.
|
||||
for (var i = 0; i < count; i++)
|
||||
{
|
||||
var toSelectIndex = -1
|
||||
// Select the first one that's not "unknown" and is the host a group by default.
|
||||
for (var i = 0; i < count; i++)
|
||||
if (!model[i].isUnknownMachineType && model[i].isHostOfGroup)
|
||||
{
|
||||
if (!model[i].isUnknownMachineType && model[i].isHostOfGroup)
|
||||
{
|
||||
toSelectIndex = i
|
||||
break
|
||||
}
|
||||
}
|
||||
currentIndex = toSelectIndex
|
||||
}
|
||||
|
||||
// CURA-6483 For some reason currentIndex can be reset to 0. This check is here to prevent automatically
|
||||
// selecting an unknown or non-host printer.
|
||||
onCurrentIndexChanged:
|
||||
{
|
||||
var item = model[currentIndex]
|
||||
if (!item || item.isUnknownMachineType || !item.isHostOfGroup)
|
||||
{
|
||||
currentIndex = -1
|
||||
toSelectIndex = i
|
||||
break
|
||||
}
|
||||
}
|
||||
currentIndex = toSelectIndex
|
||||
}
|
||||
|
||||
Component
|
||||
// CURA-6483 For some reason currentIndex can be reset to 0. This check is here to prevent automatically
|
||||
// selecting an unknown or non-host printer.
|
||||
onCurrentIndexChanged:
|
||||
{
|
||||
var item = model[currentIndex]
|
||||
if (!item || item.isUnknownMachineType || !item.isHostOfGroup)
|
||||
{
|
||||
id: sectionHeading
|
||||
currentIndex = -1
|
||||
}
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||
height: UM.Theme.getSize("setting_control").height
|
||||
text: section
|
||||
font: UM.Theme.getFont("default")
|
||||
color: UM.Theme.getColor("small_button_text")
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
delegate: Cura.MachineSelectorButton
|
||||
{
|
||||
text: modelData.device.name
|
||||
|
||||
width: networkPrinterListView.width - networkPrinterScrollBar.width
|
||||
outputDevice: modelData.device
|
||||
|
||||
enabled: !modelData.isUnknownMachineType && modelData.isHostOfGroup
|
||||
|
||||
printerTypeLabelAutoFit: true
|
||||
|
||||
// update printer types for all items in the list
|
||||
updatePrinterTypesOnlyWhenChecked: false
|
||||
updatePrinterTypesFunction: updateMachineTypes
|
||||
// show printer type as it is
|
||||
printerTypeLabelConversionFunction: function(value) { return value }
|
||||
|
||||
function updateMachineTypes()
|
||||
{
|
||||
printerTypesList = [ modelData.readableMachineType ]
|
||||
}
|
||||
|
||||
delegate: Cura.MachineSelectorButton
|
||||
checkable: false
|
||||
selected: networkPrinterListView.currentIndex == model.index
|
||||
onClicked:
|
||||
{
|
||||
text: modelData.device.name
|
||||
|
||||
width: networkPrinterListView.width
|
||||
outputDevice: modelData.device
|
||||
|
||||
enabled: !modelData.isUnknownMachineType && modelData.isHostOfGroup
|
||||
|
||||
printerTypeLabelAutoFit: true
|
||||
|
||||
// update printer types for all items in the list
|
||||
updatePrinterTypesOnlyWhenChecked: false
|
||||
updatePrinterTypesFunction: updateMachineTypes
|
||||
// show printer type as it is
|
||||
printerTypeLabelConversionFunction: function(value) { return value }
|
||||
|
||||
function updateMachineTypes()
|
||||
{
|
||||
printerTypesList = [ modelData.readableMachineType ]
|
||||
}
|
||||
|
||||
checkable: false
|
||||
selected: ListView.view.currentIndex == model.index
|
||||
onClicked:
|
||||
{
|
||||
ListView.view.currentIndex = index
|
||||
}
|
||||
networkPrinterListView.currentIndex = index
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -233,7 +213,7 @@ Item
|
|||
source: UM.Theme.getIcon("LinkExternal")
|
||||
}
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: troubleshootingLabel
|
||||
anchors.right: parent.right
|
||||
|
@ -241,8 +221,6 @@ Item
|
|||
text: catalog.i18nc("@label", "Troubleshooting")
|
||||
font: UM.Theme.getFont("default")
|
||||
color: UM.Theme.getColor("text_link")
|
||||
linkColor: UM.Theme.getColor("text_link")
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
|
||||
MouseArea
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
import QtQuick 2.10
|
||||
import QtQuick.Controls 2.3
|
||||
|
||||
import UM 1.3 as UM
|
||||
import UM 1.5 as UM
|
||||
import Cura 1.1 as Cura
|
||||
|
||||
|
||||
|
@ -15,7 +15,7 @@ Item
|
|||
{
|
||||
UM.I18nCatalog { id: catalog; name: "cura" }
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: titleLabel
|
||||
anchors.top: parent.top
|
||||
|
@ -24,7 +24,6 @@ Item
|
|||
text: catalog.i18nc("@label", "Release Notes")
|
||||
color: UM.Theme.getColor("primary_button")
|
||||
font: UM.Theme.getFont("huge")
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
|
||||
Cura.ScrollableTextArea
|
||||
|
@ -38,8 +37,6 @@ Item
|
|||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
||||
|
||||
textArea.text: CuraApplication.getTextManager().getChangeLogText()
|
||||
textArea.textFormat: Text.RichText
|
||||
textArea.wrapMode: Text.WordWrap
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
import QtQuick 2.10
|
||||
import QtQuick.Controls 2.3
|
||||
|
||||
import UM 1.3 as UM
|
||||
import UM 1.5 as UM
|
||||
import Cura 1.1 as Cura
|
||||
|
||||
import ".."
|
||||
|
@ -46,16 +46,14 @@ Cura.RoundedRectangle
|
|||
onClicked: base.clicked()
|
||||
}
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: title
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: base.title
|
||||
font: UM.Theme.getFont("medium")
|
||||
renderType: Text.NativeRendering
|
||||
color: base.hovered ? UM.Theme.getColor("small_button_text_hover") : UM.Theme.getColor("small_button_text")
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// Copyright (c) 2019 Ultimaker B.V.
|
||||
// Copyright (c) 2022 Ultimaker B.V.
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Controls 2.3
|
||||
|
||||
import UM 1.3 as UM
|
||||
import UM 1.5 as UM
|
||||
import Cura 1.1 as Cura
|
||||
|
||||
|
||||
|
@ -61,7 +61,7 @@ Item
|
|||
anchors.left: header.left
|
||||
anchors.right: header.right
|
||||
// Add 2x lining, because it needs a bit of space on the top and the bottom.
|
||||
height: contentLoader.item.height + 2 * UM.Theme.getSize("thick_lining").height
|
||||
height: contentLoader.item ? contentLoader.item.height + 2 * UM.Theme.getSize("thick_lining").height : 0
|
||||
|
||||
border.width: UM.Theme.getSize("default_lining").width
|
||||
border.color: UM.Theme.getColor("lining")
|
||||
|
@ -88,14 +88,12 @@ Item
|
|||
{
|
||||
id: emptyComponent
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text: catalog.i18nc("@label", "Empty")
|
||||
height: UM.Theme.getSize("action_button").height
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
font: UM.Theme.getFont("medium")
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
import QtQuick 2.10
|
||||
import QtQuick.Controls 2.3
|
||||
|
||||
import UM 1.3 as UM
|
||||
import UM 1.5 as UM
|
||||
import Cura 1.1 as Cura
|
||||
|
||||
//
|
||||
|
@ -14,7 +14,7 @@ Item
|
|||
{
|
||||
UM.I18nCatalog { id: catalog; name: "cura" }
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: titleLabel
|
||||
anchors.top: parent.top
|
||||
|
@ -23,10 +23,9 @@ Item
|
|||
text: catalog.i18nc("@label", "User Agreement")
|
||||
color: UM.Theme.getColor("primary_button")
|
||||
font: UM.Theme.getFont("huge")
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: disclaimerLineLabel
|
||||
anchors
|
||||
|
@ -44,8 +43,6 @@ Item
|
|||
textFormat: Text.RichText
|
||||
wrapMode: Text.WordWrap
|
||||
font: UM.Theme.getFont("medium")
|
||||
color: UM.Theme.getColor("text")
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
|
||||
Cura.PrimaryButton
|
||||
|
|
|
@ -113,8 +113,6 @@ Item
|
|||
right: subpageImage.right
|
||||
}
|
||||
|
||||
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
||||
|
||||
back_color: UM.Theme.getColor("viewport_overlay")
|
||||
do_borders: false
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue