Merge branch '4.11'

This commit is contained in:
Ghostkeeper 2021-08-31 12:07:42 +02:00
commit d08d5d6625
No known key found for this signature in database
GPG Key ID: 68F39EA88EEED5FF
7 changed files with 55 additions and 53 deletions

View File

@ -159,7 +159,7 @@ Rectangle
{
anchors.fill: parent
hoverEnabled: true
onClicked: Qt.openUrlExternally("https://ultimaker.com/en/resources/manuals/ultimaker-3d-printers")
onClicked: Qt.openUrlExternally("https://ultimaker.com/in/cura/troubleshooting/network?utm_source=cura&utm_medium=software&utm_campaign=monitor-not-connected")
onEntered: manageQueueText.font.underline = true
onExited: manageQueueText.font.underline = false
}

View File

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

View File

@ -104,6 +104,25 @@ class VersionUpgrade49to410(VersionUpgrade):
"g" : "D060"
}
def upgradePreferences(self, serialized: str, filename: str) -> Tuple[List[str], List[str]]:
"""
Upgrades preferences to have the new version number.
:param serialized: The original contents of the preferences file.
:param filename: The file name of the preferences file.
:return: A list of new file names, and a list of the new contents for
those files.
"""
parser = configparser.ConfigParser(interpolation = None)
parser.read_string(serialized)
# Update version number.
parser["metadata"]["setting_version"] = "17"
result = io.StringIO()
parser.write(result)
return [filename], [result.getvalue()]
def upgradeInstanceContainer(self, serialized: str, filename: str) -> Tuple[List[str], List[str]]:
"""Upgrades instance containers to have the new version number.

View File

@ -21,6 +21,7 @@ def getMetaData() -> Dict[str, Any]:
("quality_changes", 4000016): ("quality_changes", 4000017, upgrade.upgradeInstanceContainer),
("quality", 4000016): ("quality", 4000017, upgrade.upgradeInstanceContainer),
("user", 4000016): ("user", 4000017, upgrade.upgradeInstanceContainer),
("preferences", 7000016): ("preferences", 7000017, upgrade.upgradePreferences),
},
"sources": {
"machine_stack": {

View File

@ -3,6 +3,7 @@
import QtQuick 2.1
import QtQuick.Controls 1.1
import QtQuick.Controls 2.15 as NewControls
import QtQuick.Dialogs 1.2
import QtQuick.Window 2.1
@ -145,10 +146,11 @@ UM.Dialog
anchors.margins: UM.Theme.getSize("default_margin").width
height: childrenRect.height
ComboBox
NewControls.ComboBox
{
id: discardOrKeepProfileChangesDropDownButton
width: 300
textRole: "text"
model: ListModel
{
@ -217,4 +219,4 @@ UM.Dialog
}
}
}
}
}

View File

@ -19,26 +19,9 @@ Item
property Action configureSettings
property bool findingSettings
Rectangle
Item
{
id: filterContainer
visible: true
radius: UM.Theme.getSize("setting_control_radius").width
border.width: UM.Theme.getSize("default_lining").width
border.color:
{
if (hoverMouseArea.containsMouse || clearFilterButton.containsMouse)
{
return UM.Theme.getColor("setting_control_border_highlight")
}
else
{
return UM.Theme.getColor("setting_control_border")
}
}
color: UM.Theme.getColor("setting_control")
anchors
{
@ -48,6 +31,7 @@ Item
rightMargin: UM.Theme.getSize("default_margin").width
}
height: UM.Theme.getSize("print_setup_big_item").height
Timer
{
id: settingsSearchTimer
@ -57,33 +41,35 @@ Item
repeat: false
}
TextField
Cura.TextField
{
id: filter
height: parent.height
anchors.left: parent.left
anchors.right: clearFilterButton.left
anchors.rightMargin: Math.round(UM.Theme.getSize("thick_margin").width)
placeholderText:
{
var imageSize = "width='" + UM.Theme.getSize("small_button_icon").width + "' height='" + UM.Theme.getSize("small_button_icon").height
var imageSource = "' src='"+ UM.Theme.getIcon("Magnifier")
var searchPlaceholder = catalog.i18nc("@label:textbox", "Search settings")
return "<img align='middle' " + imageSize + imageSource +"'>" + "<div vertical-align=bottom>" + searchPlaceholder
}
style: TextFieldStyle
{
textColor: UM.Theme.getColor("setting_control_text")
placeholderTextColor: UM.Theme.getColor("setting_filter_field")
font: UM.Theme.getFont("default_italic")
background: Item {}
}
anchors.right: parent.right
leftPadding: searchIcon.width + UM.Theme.getSize("default_margin").width * 2
placeholderText: catalog.i18nc("@label:textbox", "Search settings")
font.italic: true
property var expandedCategories
property bool lastFindingSettings: false
UM.RecolorImage
{
id: searchIcon
anchors
{
verticalCenter: parent.verticalCenter
left: parent.left
leftMargin: UM.Theme.getSize("default_margin").width
}
source: UM.Theme.getIcon("search")
height: UM.Theme.getSize("small_button_icon").height
width: height
color: UM.Theme.getColor("text")
}
onTextChanged:
{
settingsSearchTimer.restart()
@ -127,15 +113,6 @@ Item
}
}
MouseArea
{
id: hoverMouseArea
anchors.fill: parent
hoverEnabled: true
acceptedButtons: Qt.NoButton
cursorShape: Qt.IBeamCursor
}
UM.SimpleButton
{
id: clearFilterButton

View File

@ -203,12 +203,12 @@ Item
{
if (addPrinterByIpScreen.hasRequestFinished)
{
return catalog.i18nc("@label", "Could not connect to device.") + "<br /><br /><a href=\"https://ultimaker.com/en/resources/52891-set-up-a-cloud-connection\">"
return catalog.i18nc("@label", "Could not connect to device.") + "<br /><br /><a href=\"https://ultimaker.com/in/cura/troubleshooting/network?utm_source=cura&utm_medium=software&utm_campaign=add-network-printer-error\">"
+ catalog.i18nc("@label", "Can't connect to your Ultimaker printer?") + "</a>";
}
else
{
return catalog.i18nc("@label", "The printer at this address has not responded yet.") + "<br /><br /><a href=\"https://ultimaker.com/en/resources/52891-set-up-a-cloud-connection\">"
return catalog.i18nc("@label", "The printer at this address has not responded yet.") + "<br /><br /><a href=\"https://ultimaker.com/in/cura/troubleshooting/network?utm_source=cura&utm_medium=software&utm_campaign=add-network-printer-error\">"
+ catalog.i18nc("@label", "Can't connect to your Ultimaker printer?") + "</a>";
}
}