Specify width and height in Cura.Checkbox

Update Dialogs to use Cura.CheckBox instead of QtQuick. This will make it easier to update the QtQuick checkbox version.
This commit is contained in:
j.delarago 2022-01-20 17:31:00 +01:00
parent 25fa71b056
commit 670872f8d1
4 changed files with 7 additions and 10 deletions

View file

@ -57,12 +57,12 @@ UM.Dialog
onTextChanged: settingPickDialog.updateFilter() onTextChanged: settingPickDialog.updateFilter()
} }
CheckBox Cura.CheckBox
{ {
id: toggleShowAll id: toggleShowAll
anchors anchors
{ {
top: parent.top verticalCenter: parent.verticalCenter
right: parent.right right: parent.right
} }
text: catalog.i18nc("@label:checkbox", "Show all") text: catalog.i18nc("@label:checkbox", "Show all")

View file

@ -92,17 +92,11 @@ UM.Dialog
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
} }
CheckBox Cura.CheckBox
{ {
id: rememberChoiceCheckBox id: rememberChoiceCheckBox
text: catalog.i18nc("@text:window", "Remember my choice") text: catalog.i18nc("@text:window", "Remember my choice")
checked: UM.Preferences.getValue("cura/choice_on_open_project") != "always_ask" checked: UM.Preferences.getValue("cura/choice_on_open_project") != "always_ask"
style: CheckBoxStyle {
label: Label {
text: control.text
font: UM.Theme.getFont("default")
}
}
} }
// Buttons // Buttons

View file

@ -275,7 +275,7 @@ UM.Dialog
width: parent.width width: parent.width
height: childrenRect.height height: childrenRect.height
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
CheckBox Cura.CheckBox
{ {
id: dontShowAgainCheckbox id: dontShowAgainCheckbox
anchors.left: parent.left anchors.left: parent.left

View file

@ -17,6 +17,9 @@ CheckBox
hoverEnabled: true hoverEnabled: true
height: UM.Theme.getSize("checkbox").height
width: UM.Theme.getSize("checkbox").width
indicator: Rectangle indicator: Rectangle
{ {
width: control.height width: control.height