mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-07-02 16:15:28 +08:00
update
This commit is contained in:
@ -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
|
||||
|
@ -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()
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -4,7 +4,6 @@ import QtQuick.Controls.Basic
|
||||
import FluentUI
|
||||
|
||||
Button {
|
||||
|
||||
property bool disabled: false
|
||||
property string contentDescription: ""
|
||||
property color normalColor: {
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user