修复部分控件在禁用后错误高亮的问题

涉及控件如下:FluCheckBox、FluCopyableText、FluIcon、FluIconButton、FluRadioButton、FluText、FluToggleSwitch
This commit is contained in:
lucky9loogn
2024-11-25 14:59:18 +08:00
parent d75ecfeca7
commit 2a639022ec
19 changed files with 215 additions and 27 deletions

View File

@ -399,16 +399,14 @@ FluScrollablePage{
verticalCenter: parent.verticalCenter
left: parent.left
}
disabled: radio_button_switch.checked
FluRadioButton{
disabled:radio_button_switch.checked
text: qsTr("Radio Button_1")
}
FluRadioButton{
disabled:radio_button_switch.checked
text: qsTr("Radio Button_2")
}
FluRadioButton{
disabled:radio_button_switch.checked
text: qsTr("Radio Button_3")
}
}

View File

@ -18,6 +18,15 @@ FluContentPage {
grid_view.model = FluApp.iconData(text_box.text)
}
}
FluToggleSwitch{
id: toggle_switch
anchors{
left: text_box.right
verticalCenter: text_box.verticalCenter
leftMargin: 10
}
text: qsTr("Disabled")
}
GridView{
id: grid_view
cellWidth: 110
@ -45,6 +54,7 @@ FluContentPage {
horizontalPadding: 0
bottomPadding: 30
anchors.fill: parent
disabled: toggle_switch.checked
onClicked: {
var text ="FluentIcons."+modelData.name;
FluTools.clipText(text)
@ -57,6 +67,7 @@ FluContentPage {
text: modelData.name
anchors.top: parent.top
anchors.topMargin: 60
enabled: !toggle_switch.checked
}
}
}

View File

@ -15,10 +15,19 @@ FluScrollablePage{
padding: 10
FluCopyableText{
enabled: !toggle_switch.checked
text: qsTr("This is a text that can be copied")
anchors.verticalCenter: parent.verticalCenter
}
FluToggleSwitch{
id: toggle_switch
anchors{
right: parent.right
verticalCenter: parent.verticalCenter
}
text: qsTr("Disabled")
}
}
CodeExpander{
Layout.fillWidth: true