Switch old checkbox over to styled variant

CURA-8949
This commit is contained in:
Jaime van Kessel 2022-02-21 10:03:44 +01:00
parent af99b87bef
commit 8e55dda3cc

View File

@ -3,7 +3,6 @@
import QtQuick 2.1 import QtQuick 2.1
import QtQuick.Controls 2.15 import QtQuick.Controls 2.15
import QtQuick.Controls 1.1 as OldControls
import UM 1.5 as UM import UM 1.5 as UM
@ -43,7 +42,7 @@ UM.PreferencesPage
id: base id: base
anchors.fill: parent anchors.fill: parent
OldControls.CheckBox UM.CheckBox
{ {
id: toggleVisibleSettings id: toggleVisibleSettings
anchors anchors
@ -53,7 +52,7 @@ UM.PreferencesPage
leftMargin: UM.Theme.getSize("default_margin").width leftMargin: UM.Theme.getSize("default_margin").width
} }
text: catalog.i18nc("@label:textbox", "Check all") text: catalog.i18nc("@label:textbox", "Check all")
checkedState: checkState:
{ {
if(definitionsModel.visibleCount == definitionsModel.categoryCount) if(definitionsModel.visibleCount == definitionsModel.categoryCount)
{ {
@ -68,8 +67,7 @@ UM.PreferencesPage
return Qt.PartiallyChecked return Qt.PartiallyChecked
} }
} }
partiallyCheckedEnabled: true tristate: true
MouseArea MouseArea
{ {
anchors.fill: parent; anchors.fill: parent;