mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-07-04 17:15:29 +08:00
修复部分控件在禁用后错误高亮的问题
涉及控件如下:FluCheckBox、FluCopyableText、FluIcon、FluIconButton、FluRadioButton、FluText、FluToggleSwitch
This commit is contained in:
@ -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")
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user