diff --git a/example/qml/component/CodeExpander.qml b/example/qml/component/CodeExpander.qml index 6e33b98..746c395 100644 --- a/example/qml/component/CodeExpander.qml +++ b/example/qml/component/CodeExpander.qml @@ -8,7 +8,6 @@ FluExpander{ id:control property string code: "" - headerText: "Source" contentHeight:content.height focus: false @@ -16,10 +15,12 @@ FluExpander{ FluMultilineTextBox{ id:content width:parent.width + activeFocusOnTab: false + activeFocusOnPress: false + readOnly: true text:highlightQmlCode(code) textFormat: FluMultilineTextBox.RichText KeyNavigation.priority: KeyNavigation.BeforeItem - enabled: false background:Rectangle{ radius: 4 color:FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(247/255,247/255,247/255,1) diff --git a/example/qml/window/MainWindow.qml b/example/qml/window/MainWindow.qml index 3f7a090..eb9eb1c 100644 --- a/example/qml/window/MainWindow.qml +++ b/example/qml/window/MainWindow.qml @@ -64,8 +64,8 @@ CustomWindow { negativeText:"最小化" buttonFlags: FluContentDialog.NeutralButton | FluContentDialog.NegativeButton | FluContentDialog.PositiveButton onNegativeClicked:{ - system_tray.showMessage("友情提示","FluentUI已隐藏至托盘,点击托盘可再次激活窗口"); window.hide() + system_tray.showMessage("友情提示","FluentUI已隐藏至托盘,点击托盘可再次激活窗口"); } positiveText:"退出" neutralText:"取消" diff --git a/src/imports/FluentUI/Controls/FluCheckBox.qml b/src/imports/FluentUI/Controls/FluCheckBox.qml index 131d234..8fa4d19 100644 --- a/src/imports/FluentUI/Controls/FluCheckBox.qml +++ b/src/imports/FluentUI/Controls/FluCheckBox.qml @@ -6,6 +6,7 @@ import FluentUI Button { property bool disabled: false + property string contentDescription: "" property color borderNormalColor: FluTheme.dark ? Qt.rgba(160/255,160/255,160/255,1) : Qt.rgba(136/255,136/255,136/255,1) property color bordercheckedColor: FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark property color borderHoverColor: FluTheme.dark ? Qt.rgba(167/255,167/255,167/255,1) : Qt.rgba(135/255,135/255,135/255,1) @@ -30,6 +31,10 @@ Button { visible: control.activeFocus } } + Accessible.role: Accessible.Button + Accessible.name: control.text + Accessible.description: contentDescription + Accessible.onPressAction: control.clicked() focusPolicy:Qt.TabFocus contentItem: RowLayout{ spacing: 4 diff --git a/src/imports/FluentUI/Controls/FluControl.qml b/src/imports/FluentUI/Controls/FluControl.qml index 3b3b499..50f672e 100644 --- a/src/imports/FluentUI/Controls/FluControl.qml +++ b/src/imports/FluentUI/Controls/FluControl.qml @@ -5,6 +5,7 @@ import QtQuick.Templates as T T.Button { id: control + property string contentDescription: "" implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, implicitContentWidth + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, @@ -20,4 +21,8 @@ T.Button { radius:8 } } + Accessible.role: Accessible.Button + Accessible.name: control.text + Accessible.description: contentDescription + Accessible.onPressAction: control.clicked() } diff --git a/src/imports/FluentUI/Controls/FluCopyableText.qml b/src/imports/FluentUI/Controls/FluCopyableText.qml index b5069cf..e733651 100644 --- a/src/imports/FluentUI/Controls/FluCopyableText.qml +++ b/src/imports/FluentUI/Controls/FluCopyableText.qml @@ -7,6 +7,8 @@ TextField { id:control color: textColor readOnly: true + activeFocusOnTab: false + activeFocusOnPress: false renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering padding: 0 leftPadding: 0 diff --git a/src/imports/FluentUI/Controls/FluToggleButton.qml b/src/imports/FluentUI/Controls/FluToggleButton.qml index 41ff396..df83b6c 100644 --- a/src/imports/FluentUI/Controls/FluToggleButton.qml +++ b/src/imports/FluentUI/Controls/FluToggleButton.qml @@ -4,7 +4,6 @@ import QtQuick.Controls.Basic import FluentUI Button { - property bool disabled: false property string contentDescription: "" property color normalColor: { diff --git a/src/imports/FluentUI/Controls/FluToggleSwitch.qml b/src/imports/FluentUI/Controls/FluToggleSwitch.qml index 62c6814..928bd37 100644 --- a/src/imports/FluentUI/Controls/FluToggleSwitch.qml +++ b/src/imports/FluentUI/Controls/FluToggleSwitch.qml @@ -6,6 +6,7 @@ import FluentUI Button { property bool disabled: false + property string contentDescription: "" property color disableColor: checked ? FluTheme.dark ? Qt.rgba(59/255,59/255,59/255,1) : Qt.rgba(159/255,159/255,159/255,1) :FluTheme.dark ? Qt.rgba(82/255,82/255,82/255,1) : Qt.rgba(240/255,240/255,240/255,1) property color checkColor: FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark property color hoverColor: FluTheme.dark ? Qt.rgba(62/255,62/255,62/255,1) : Qt.rgba(240/255,240/255,240/255,1) @@ -19,6 +20,10 @@ Button { checked = !checked } id: control + Accessible.role: Accessible.Button + Accessible.name: control.text + Accessible.description: contentDescription + Accessible.onPressAction: control.clicked() height: 20 enabled: !disabled implicitHeight: height