mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-09-13 18:43:13 +08:00
Merge remote-tracking branch 'origin/CURA-8688_qt6_cleanup' into CURA-8688_qt6_cleanup
This commit is contained in:
commit
b60c82aa92
@ -5,7 +5,7 @@ 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.1 as Cura
|
||||
|
||||
|
||||
@ -88,7 +88,7 @@ Cura.MachineAction
|
||||
}
|
||||
}
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: machineNameLabel
|
||||
anchors.top: parent.top
|
||||
@ -97,7 +97,6 @@ Cura.MachineAction
|
||||
text: Cura.MachineManager.activeMachine.name
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
font: UM.Theme.getFont("large_bold")
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
|
||||
UM.TabRow
|
||||
|
@ -272,7 +272,6 @@ UM.Dialog
|
||||
UM.CheckBox
|
||||
{
|
||||
id: dontShowAgainCheckbox
|
||||
anchors.left: parent.left
|
||||
text: catalog.i18nc("@action:label", "Don't show project summary on save again")
|
||||
checked: dontShowAgain
|
||||
}
|
||||
|
@ -78,7 +78,6 @@ Item
|
||||
background: Rectangle
|
||||
{
|
||||
radius: UM.Theme.getSize("action_button_radius").width
|
||||
width: contents.width
|
||||
color:
|
||||
{
|
||||
if (stageSelectorButton.checked)
|
||||
|
@ -133,6 +133,7 @@ Cura.Menu
|
||||
focus: true
|
||||
from: 1
|
||||
to: 99
|
||||
width: 2 * UM.Theme.getSize("button").width
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ UM.PreferencesPage
|
||||
title: catalog.i18nc("@title:tab", "General")
|
||||
id: generalPreferencesPage
|
||||
|
||||
width: parent.width
|
||||
width: parent ? parent.width: 0
|
||||
|
||||
function setDefaultLanguage(languageCode)
|
||||
{
|
||||
|
@ -266,7 +266,7 @@ Window
|
||||
border.color: UM.Theme.getColor("lining")
|
||||
border.width: UM.Theme.getSize("default_lining").width
|
||||
width: printerList.width - printerListScrollBar.width
|
||||
height: UM.Theme.getSize("card").height
|
||||
height: UM.Theme.getSize("machine_selector_icon").height + 2 * UM.Theme.getSize("default_margin").height
|
||||
|
||||
property string syncStatus:
|
||||
{
|
||||
|
@ -144,7 +144,7 @@ UM.ManagementPage
|
||||
}
|
||||
|
||||
// Dialog to request a name when creating a new profile
|
||||
UM.RenameDialog
|
||||
Cura.RenameDialog
|
||||
{
|
||||
id: createQualityDialog
|
||||
title: catalog.i18nc("@title:window", "Create Profile")
|
||||
@ -233,7 +233,7 @@ UM.ManagementPage
|
||||
}
|
||||
|
||||
// Dialog to request a name when duplicating a new profile
|
||||
UM.RenameDialog
|
||||
Cura.RenameDialog
|
||||
{
|
||||
id: duplicateQualityDialog
|
||||
title: catalog.i18nc("@title:window", "Duplicate Profile")
|
||||
@ -263,7 +263,7 @@ UM.ManagementPage
|
||||
}
|
||||
|
||||
// Dialog to rename a quality profile
|
||||
UM.RenameDialog
|
||||
Cura.RenameDialog
|
||||
{
|
||||
id: renameQualityDialog
|
||||
title: catalog.i18nc("@title:window", "Rename Profile")
|
||||
|
91
resources/qml/Preferences/RenameDialog.qml
Normal file
91
resources/qml/Preferences/RenameDialog.qml
Normal file
@ -0,0 +1,91 @@
|
||||
// Copyright (c) 2022 Ultimaker B.V.
|
||||
// Uranium is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.1
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Window 2.1
|
||||
|
||||
import UM 1.5 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
||||
UM.Dialog
|
||||
{
|
||||
id: base
|
||||
property string object: ""
|
||||
|
||||
property alias newName: nameField.text
|
||||
property bool validName: true
|
||||
property string validationError
|
||||
property string dialogTitle: catalog.i18nc("@title:window", "Rename")
|
||||
property string explanation: catalog.i18nc("@info", "Please provide a new name.")
|
||||
|
||||
title: dialogTitle
|
||||
|
||||
minimumWidth: UM.Theme.getSize("small_popup_dialog").width
|
||||
minimumHeight: UM.Theme.getSize("small_popup_dialog").height
|
||||
width: minimumWidth
|
||||
height: minimumHeight
|
||||
|
||||
property variant catalog: UM.I18nCatalog { name: "cura" }
|
||||
|
||||
signal textChanged(string text)
|
||||
signal selectText()
|
||||
onSelectText:
|
||||
{
|
||||
nameField.selectAll();
|
||||
nameField.focus = true;
|
||||
}
|
||||
|
||||
Column
|
||||
{
|
||||
anchors.fill: parent
|
||||
|
||||
UM.Label
|
||||
{
|
||||
text: base.explanation + "\n" //Newline to make some space using system theming.
|
||||
width: parent.width
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
|
||||
Cura.TextField
|
||||
{
|
||||
id: nameField
|
||||
width: parent.width
|
||||
text: base.object
|
||||
maximumLength: 40
|
||||
selectByMouse: true
|
||||
onTextChanged: base.textChanged(text)
|
||||
}
|
||||
|
||||
UM.Label
|
||||
{
|
||||
visible: !base.validName
|
||||
text: base.validationError
|
||||
}
|
||||
}
|
||||
|
||||
Item
|
||||
{
|
||||
ButtonGroup {
|
||||
buttons: [cancelButton, okButton]
|
||||
checkedButton: okButton
|
||||
}
|
||||
}
|
||||
|
||||
rightButtons: [
|
||||
Cura.SecondaryButton
|
||||
{
|
||||
id: cancelButton
|
||||
text: catalog.i18nc("@action:button","Cancel")
|
||||
onClicked: base.reject()
|
||||
},
|
||||
Cura.PrimaryButton
|
||||
{
|
||||
id: okButton
|
||||
text: catalog.i18nc("@action:button", "OK")
|
||||
onClicked: base.accept()
|
||||
enabled: base.validName
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ UM.PreferencesPage
|
||||
}
|
||||
}
|
||||
|
||||
TextField
|
||||
Cura.TextField
|
||||
{
|
||||
id: filter
|
||||
|
||||
@ -105,7 +105,7 @@ UM.PreferencesPage
|
||||
Cura.ComboBox
|
||||
{
|
||||
id: visibilityPreset
|
||||
width: 150 * screenScaleFactor
|
||||
width: UM.Theme.getSize("action_button").width
|
||||
anchors
|
||||
{
|
||||
top: parent.top
|
||||
|
@ -11,7 +11,7 @@ Cura.ActionButton
|
||||
{
|
||||
color: UM.Theme.getColor("secondary_button")
|
||||
textColor: UM.Theme.getColor("secondary_button_text")
|
||||
outlineColor: UM.Theme.getColor("secondary_button_text")
|
||||
outlineColor: UM.Theme.getColor("border_accent_1")
|
||||
disabledColor: UM.Theme.getColor("action_button_disabled")
|
||||
textDisabledColor: UM.Theme.getColor("action_button_disabled_text")
|
||||
hoverColor: UM.Theme.getColor("secondary_button_hover")
|
||||
|
@ -409,7 +409,7 @@ Item
|
||||
}
|
||||
}
|
||||
|
||||
Menu
|
||||
Cura.Menu
|
||||
{
|
||||
id: contextMenu
|
||||
|
||||
|
@ -26,21 +26,18 @@ ComboBox
|
||||
{
|
||||
name: "disabled"
|
||||
when: !control.enabled
|
||||
PropertyChanges { target: backgroundRectangle; color: UM.Theme.getColor("setting_control_disabled")}
|
||||
PropertyChanges { target: background; color: UM.Theme.getColor("setting_control_disabled")}
|
||||
PropertyChanges { target: contentLabel; color: UM.Theme.getColor("setting_control_disabled_text")}
|
||||
},
|
||||
State
|
||||
{
|
||||
name: "highlighted"
|
||||
when: control.hovered || control.activeFocus
|
||||
PropertyChanges { target: backgroundRectangle; color: UM.Theme.getColor("setting_control_highlight")}
|
||||
PropertyChanges { target: background; liningColor: UM.Theme.getColor("border_main_light")}
|
||||
}
|
||||
]
|
||||
|
||||
background: UM.UnderlineBackground
|
||||
{
|
||||
id: backgroundRectangle
|
||||
}
|
||||
background: UM.UnderlineBackground{}
|
||||
|
||||
indicator: UM.RecolorImage
|
||||
{
|
||||
|
@ -38,7 +38,7 @@ RadioButton
|
||||
{
|
||||
name: "highlighted"
|
||||
when: radioButton.hovered || radioButton.activeFocus
|
||||
PropertyChanges { target: indicator; border.color: UM.Theme.getColor("accent_1")}
|
||||
PropertyChanges { target: indicator; border.color: UM.Theme.getColor("border_main_light")}
|
||||
}
|
||||
]
|
||||
|
||||
|
@ -24,6 +24,7 @@ TextField
|
||||
font: UM.Theme.getFont("default")
|
||||
color: UM.Theme.getColor("text")
|
||||
renderType: Text.NativeRendering
|
||||
selectionColor: UM.Theme.getColor("text_selection")
|
||||
leftPadding: iconLeft.visible ? iconLeft.width + UM.Theme.getSize("default_margin").width * 2 : UM.Theme.getSize("thin_margin").width
|
||||
|
||||
states: [
|
||||
@ -43,6 +44,7 @@ TextField
|
||||
{
|
||||
name: "hovered"
|
||||
when: textField.hovered || textField.activeFocus
|
||||
PropertyChanges { target: backgroundRectangle; liningColor: UM.Theme.getColor("border_main_light")}
|
||||
}
|
||||
]
|
||||
|
||||
|
@ -47,3 +47,4 @@ GcodeTextArea 1.0 GcodeTextArea.qml
|
||||
NumericTextFieldWithUnit 1.0 NumericTextFieldWithUnit.qml
|
||||
PrintHeadMinMaxTextField 1.0 PrintHeadMinMaxTextField.qml
|
||||
SimpleCheckBox 1.0 SimpleCheckBox.qml
|
||||
RenameDialog 1.0 RenameDialog.qml
|
||||
|
@ -56,6 +56,8 @@
|
||||
"main_window_header_background_gradient": "background_4",
|
||||
"main_window_header_button_background_hovered": [46, 46, 46, 255],
|
||||
|
||||
"secondary_button_text": "text_secondary_button",
|
||||
|
||||
"account_sync_state_icon": [255, 255, 255, 204],
|
||||
|
||||
"machine_selector_printer_icon": [204, 204, 204, 255],
|
||||
@ -155,10 +157,11 @@
|
||||
"checkbox": "background_1",
|
||||
"checkbox_hover": [43, 48, 52, 255],
|
||||
"checkbox_border": "text_disabled",
|
||||
"checkbox_border_hover": [255, 255, 255, 38],
|
||||
"checkbox_border_hover": "border_main",
|
||||
"checkbox_mark": "text_default",
|
||||
"checkbox_square": "text_disabled",
|
||||
"checkbox_text": "text_default",
|
||||
"checkbox_disabled": "background_2",
|
||||
|
||||
"tooltip": "background_2",
|
||||
"tooltip_text": "text_default",
|
||||
|
@ -206,17 +206,15 @@
|
||||
"text_selection": [156, 195, 255, 127],
|
||||
"border": [127, 127, 127, 255],
|
||||
"border_field": [180, 180, 180, 255],
|
||||
"text_selection": [156,195, 255, 127],
|
||||
"secondary": [240, 240, 240, 255],
|
||||
|
||||
"icon": [8, 7, 63, 255],
|
||||
|
||||
"primary_button": [25, 110, 240, 255],
|
||||
"primary_button": "accent_1",
|
||||
"primary_button_hover": [16, 70, 156, 255],
|
||||
"primary_button_text": [255, 255, 255, 255],
|
||||
|
||||
"secondary_button": "text_default",
|
||||
"secondary_button": "background_1",
|
||||
"secondary_button_shadow": [216, 216, 216, 255],
|
||||
"secondary_button_hover": [232, 240, 253, 255],
|
||||
"secondary_button_text": "accent_1",
|
||||
@ -324,11 +322,11 @@
|
||||
"quality_slider_available": [0, 0, 0, 255],
|
||||
|
||||
"checkbox": [255, 255, 255, 255],
|
||||
"checkbox_hover": [255, 255, 255, 255],
|
||||
"checkbox_hover": "border_main",
|
||||
"checkbox_border": [180, 180, 180, 255],
|
||||
"checkbox_border_hover": [25, 110, 240, 255],
|
||||
"checkbox_mark": [35, 35, 35, 255],
|
||||
"checkbox_disabled": [223, 223, 223, 255],
|
||||
"checkbox_disabled": "background_2",
|
||||
"checkbox_text": [0, 12, 26, 255],
|
||||
|
||||
"tooltip": [25, 25, 25, 255],
|
||||
@ -424,7 +422,10 @@
|
||||
"cloud_unavailable": [153, 153, 153, 255],
|
||||
"connection_badge_background": [255, 255, 255, 255],
|
||||
"warning_badge_background": [0, 0, 0, 255],
|
||||
"error_badge_background": [255, 255, 255, 255]
|
||||
"error_badge_background": [255, 255, 255, 255],
|
||||
|
||||
"border_field_light": [180, 180, 180, 255],
|
||||
"border_main_light": [212, 212, 212, 255]
|
||||
},
|
||||
|
||||
"sizes": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user