Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime van Kessel <nallath@gmail.com>2021-11-10 16:57:01 +0300
committerJaime van Kessel <nallath@gmail.com>2021-11-10 16:57:01 +0300
commit0bb09a47838ac0da85f2c694f1cb6af91b2ce183 (patch)
treef3f4598578ea61cd4613d8505b82e89f03208dce
parente0ff70dc7850a0809dc79f46e9b2ab93333fec5d (diff)
Replace all old controls 1 comboboxes with UM.Combobox
-rw-r--r--plugins/SimulationView/SimulationViewMenuComponent.qml16
-rw-r--r--plugins/Toolbox/resources/qml/components/ToolboxInstalledTile.qml5
-rw-r--r--resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml5
-rw-r--r--resources/qml/PrintSetupSelector/Recommended/RecommendedAdhesionSelector.qml5
-rw-r--r--resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml5
-rw-r--r--resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml5
-rwxr-xr-xresources/themes/cura-light/styles.qml42
7 files changed, 15 insertions, 68 deletions
diff --git a/plugins/SimulationView/SimulationViewMenuComponent.qml b/plugins/SimulationView/SimulationViewMenuComponent.qml
index 6dde44c8ae..2c62473764 100644
--- a/plugins/SimulationView/SimulationViewMenuComponent.qml
+++ b/plugins/SimulationView/SimulationViewMenuComponent.qml
@@ -7,7 +7,7 @@ import QtQuick.Layouts 1.1
import QtQuick.Controls.Styles 1.1
import QtGraphicalEffects 1.0
-import UM 1.0 as UM
+import UM 1.5 as UM
import Cura 1.0 as Cura
@@ -187,7 +187,7 @@ Cura.ExpandableComponent
{
model: CuraApplication.getExtrudersModel()
- CheckBox
+ UM.CheckBox
{
id: extrudersModelCheckBox
checked: viewSettings.extruder_opacities[index] > 0.5 || viewSettings.extruder_opacities[index] == undefined || viewSettings.extruder_opacities[index] == ""
@@ -201,8 +201,6 @@ Cura.ExpandableComponent
UM.Preferences.setValue("layerview/extruder_opacities", viewSettings.extruder_opacities.join("|"));
}
- style: UM.Theme.styles.checkbox
-
Rectangle
{
id: swatch
@@ -277,7 +275,7 @@ Cura.ExpandableComponent
}
}
- CheckBox
+ UM.CheckBox
{
id: legendModelCheckBox
checked: model.initialValue
@@ -285,8 +283,6 @@ Cura.ExpandableComponent
height: UM.Theme.getSize("layerview_row").height + UM.Theme.getSize("default_lining").height
width: parent.width
- style: UM.Theme.styles.checkbox
-
Rectangle
{
anchors.verticalCenter: parent.verticalCenter
@@ -315,24 +311,22 @@ Cura.ExpandableComponent
}
}
- CheckBox
+ UM.CheckBox
{
checked: viewSettings.only_show_top_layers
onClicked: UM.Preferences.setValue("view/only_show_top_layers", checked ? 1.0 : 0.0)
text: catalog.i18nc("@label", "Only Show Top Layers")
visible: UM.SimulationView.compatibilityMode
- style: UM.Theme.styles.checkbox
width: parent.width
}
- CheckBox
+ UM.CheckBox
{
checked: viewSettings.top_layer_count == 5
onClicked: UM.Preferences.setValue("view/top_layer_count", checked ? 5 : 1)
text: catalog.i18nc("@label", "Show 5 Detailed Layers On Top")
width: parent.width
visible: UM.SimulationView.compatibilityMode
- style: UM.Theme.styles.checkbox
}
Repeater
diff --git a/plugins/Toolbox/resources/qml/components/ToolboxInstalledTile.qml b/plugins/Toolbox/resources/qml/components/ToolboxInstalledTile.qml
index e5c94fc996..fb59ff5d34 100644
--- a/plugins/Toolbox/resources/qml/components/ToolboxInstalledTile.qml
+++ b/plugins/Toolbox/resources/qml/components/ToolboxInstalledTile.qml
@@ -4,7 +4,7 @@
import QtQuick 2.10
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4
-import UM 1.1 as UM
+import UM 1.5 as UM
Item
{
@@ -28,7 +28,7 @@ Item
spacing: UM.Theme.getSize("default_margin").width
topPadding: UM.Theme.getSize("default_margin").height
- CheckBox
+ UM.CheckBox
{
id: disableButton
anchors.verticalCenter: pluginInfo.verticalCenter
@@ -36,7 +36,6 @@ Item
visible: model.type == "plugin"
width: visible ? UM.Theme.getSize("checkbox").width : 0
enabled: !toolbox.isDownloading
- style: UM.Theme.styles.checkbox
onClicked: toolbox.isEnabled(model.id) ? toolbox.disable(model.id) : toolbox.enable(model.id)
}
Column
diff --git a/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml b/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml
index 8376693ad1..2533f849fb 100644
--- a/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml
+++ b/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml
@@ -6,7 +6,7 @@ import QtQuick.Controls 2.0
import QtQuick.Controls 1.1 as OldControls
import Cura 1.0 as Cura
-import UM 1.3 as UM
+import UM 1.5 as UM
Item
{
@@ -219,12 +219,11 @@ Item
renderType: Text.NativeRendering
}
- OldControls.CheckBox
+ UM.CheckBox
{
id: enabledCheckbox
enabled: !checked || Cura.MachineManager.numberExtrudersEnabled > 1 //Disable if it's the last enabled extruder.
height: parent.height
- style: UM.Theme.styles.checkbox
Binding
{
diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedAdhesionSelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedAdhesionSelector.qml
index a3a5047ee9..0aae9280e6 100644
--- a/resources/qml/PrintSetupSelector/Recommended/RecommendedAdhesionSelector.qml
+++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedAdhesionSelector.qml
@@ -5,7 +5,7 @@ import QtQuick 2.7
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4
-import UM 1.2 as UM
+import UM 1.5 as UM
import Cura 1.0 as Cura
@@ -44,7 +44,7 @@ Item
verticalCenter: enableAdhesionRowTitle.verticalCenter
}
- CheckBox
+ UM.CheckBox
{
id: enableAdhesionCheckBox
anchors.verticalCenter: parent.verticalCenter
@@ -52,7 +52,6 @@ Item
property alias _hovered: adhesionMouseArea.containsMouse
//: Setting enable printing build-plate adhesion helper checkbox
- style: UM.Theme.styles.checkbox
enabled: recommendedPrintSetup.settingsEnabled
visible: platformAdhesionType.properties.enabled == "True"
diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml
index dd2e0aef2b..143eccd042 100644
--- a/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml
+++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml
@@ -5,7 +5,7 @@ import QtQuick 2.7
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4
-import UM 1.2 as UM
+import UM 1.5 as UM
import Cura 1.0 as Cura
@@ -184,7 +184,7 @@ Item
}
// Gradual Support Infill Checkbox
- CheckBox
+ UM.CheckBox
{
id: enableGradualInfillCheckBox
property alias _hovered: enableGradualInfillMouseArea.containsMouse
@@ -194,7 +194,6 @@ Item
anchors.left: infillSliderContainer.left
text: catalog.i18nc("@label", "Gradual infill")
- style: UM.Theme.styles.checkbox
enabled: recommendedPrintSetup.settingsEnabled
visible: infillSteps.properties.enabled == "True"
checked: parseInt(infillSteps.properties.value) > 0
diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml
index 4e2341fb57..91d5524862 100644
--- a/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml
+++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml
@@ -6,7 +6,7 @@ import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4
import QtQuick.Controls 2.3 as Controls2
-import UM 1.2 as UM
+import UM 1.5 as UM
import Cura 1.0 as Cura
@@ -45,14 +45,13 @@ Item
verticalCenter: enableSupportRowTitle.verticalCenter
}
- CheckBox
+ UM.CheckBox
{
id: enableSupportCheckBox
anchors.verticalCenter: parent.verticalCenter
property alias _hovered: enableSupportMouseArea.containsMouse
- style: UM.Theme.styles.checkbox
enabled: recommendedPrintSetup.settingsEnabled
visible: supportEnabled.properties.enabled == "True"
diff --git a/resources/themes/cura-light/styles.qml b/resources/themes/cura-light/styles.qml
index 0a7ac47461..5d9981d164 100755
--- a/resources/themes/cura-light/styles.qml
+++ b/resources/themes/cura-light/styles.qml
@@ -323,48 +323,6 @@ QtObject
}
}
- property Component checkbox: Component
- {
- CheckBoxStyle
- {
- background: Item { }
- indicator: Rectangle
- {
- implicitWidth: UM.Theme.getSize("checkbox").width
- implicitHeight: UM.Theme.getSize("checkbox").height
-
- color: (control.hovered || control._hovered) ? UM.Theme.getColor("checkbox_hover") : (control.enabled ? UM.Theme.getColor("checkbox") : UM.Theme.getColor("checkbox_disabled"))
- Behavior on color { ColorAnimation { duration: 50; } }
-
- radius: control.exclusiveGroup ? Math.round(UM.Theme.getSize("checkbox").width / 2) : UM.Theme.getSize("checkbox_radius").width
-
- border.width: UM.Theme.getSize("default_lining").width
- border.color: (control.hovered || control._hovered) ? UM.Theme.getColor("checkbox_border_hover") : UM.Theme.getColor("checkbox_border")
-
- UM.RecolorImage
- {
- anchors.verticalCenter: parent.verticalCenter
- anchors.horizontalCenter: parent.horizontalCenter
- width: Math.round(parent.width / 2.5)
- height: Math.round(parent.height / 2.5)
- sourceSize.height: width
- color: UM.Theme.getColor("checkbox_mark")
- source: control.exclusiveGroup ? UM.Theme.getIcon("Dot") : UM.Theme.getIcon("Check")
- opacity: control.checked
- Behavior on opacity { NumberAnimation { duration: 100; } }
- }
- }
- label: Label
- {
- text: control.text
- color: UM.Theme.getColor("checkbox_text")
- font: UM.Theme.getFont("default")
- elide: Text.ElideRight
- renderType: Text.NativeRendering
- }
- }
- }
-
property Component partially_checkbox: Component
{
CheckBoxStyle