main
zhuzihcu 2023-06-08 14:10:53 +08:00
parent e4f02f50ca
commit a37e4e3b9f
11 changed files with 12 additions and 2 deletions

View File

@ -36,6 +36,7 @@ Button {
enabled: !disabled enabled: !disabled
horizontalPadding:12 horizontalPadding:12
font:FluTextStyle.Body font:FluTextStyle.Body
focusPolicy:Qt.TabFocus
background: Rectangle{ background: Rectangle{
implicitWidth: 28 implicitWidth: 28
implicitHeight: 28 implicitHeight: 28

View File

@ -30,6 +30,7 @@ Button {
visible: control.activeFocus visible: control.activeFocus
} }
} }
focusPolicy:Qt.TabFocus
contentItem: RowLayout{ contentItem: RowLayout{
spacing: 4 spacing: 4
Rectangle{ Rectangle{

View File

@ -13,6 +13,7 @@ T.Button {
horizontalPadding: 0 horizontalPadding: 0
spacing: 0 spacing: 0
contentItem: Item{} contentItem: Item{}
focusPolicy:Qt.TabFocus
background: Item{ background: Item{
FluFocusRectangle{ FluFocusRectangle{
visible: control.activeFocus visible: control.activeFocus

View File

@ -38,6 +38,7 @@ Button {
id: control id: control
rightPadding:35 rightPadding:35
enabled: !disabled enabled: !disabled
focusPolicy:Qt.TabFocus
horizontalPadding:12 horizontalPadding:12
background: Rectangle{ background: Rectangle{
implicitWidth: 28 implicitWidth: 28

View File

@ -26,7 +26,7 @@ Button {
Accessible.onPressAction: control.clicked() Accessible.onPressAction: control.clicked()
id: control id: control
enabled: !disabled enabled: !disabled
Keys.onSpacePressed: control.visualFocus&&clicked() focusPolicy:Qt.TabFocus
font:FluTextStyle.Body font:FluTextStyle.Body
horizontalPadding:12 horizontalPadding:12
background: Rectangle{ background: Rectangle{

View File

@ -41,6 +41,7 @@ Button {
Accessible.onPressAction: control.clicked() Accessible.onPressAction: control.clicked()
id:control id:control
width: 30 width: 30
focusPolicy:Qt.TabFocus
height: 30 height: 30
implicitWidth: width implicitWidth: width
implicitHeight: height implicitHeight: height

View File

@ -838,6 +838,7 @@ Item {
id:item_button id:item_button
width: 160 width: 160
padding:10 padding:10
focusPolicy:Qt.TabFocus
background: Rectangle{ background: Rectangle{
color: { color: {
if(hovered){ if(hovered){

View File

@ -28,6 +28,7 @@ Button {
visible: control.activeFocus visible: control.activeFocus
} }
} }
focusPolicy:Qt.TabFocus
font:FluTextStyle.Body font:FluTextStyle.Body
onClicked: clickListener() onClicked: clickListener()
contentItem: RowLayout{ contentItem: RowLayout{

View File

@ -21,7 +21,7 @@ Button {
return hovered ? hoverColor :normalColor return hovered ? hoverColor :normalColor
} }
id: control id: control
horizontalPadding:12 horizontalPadding:2
enabled: !disabled enabled: !disabled
Keys.onSpacePressed: control.visualFocus&&clicked() Keys.onSpacePressed: control.visualFocus&&clicked()
background: Item{ background: Item{
@ -32,6 +32,7 @@ Button {
radius:8 radius:8
} }
} }
focusPolicy:Qt.TabFocus
Accessible.role: Accessible.Button Accessible.role: Accessible.Button
Accessible.name: control.text Accessible.name: control.text
Accessible.description: contentDescription Accessible.description: contentDescription

View File

@ -36,6 +36,7 @@ Button {
Accessible.name: control.text Accessible.name: control.text
Accessible.description: contentDescription Accessible.description: contentDescription
Accessible.onPressAction: control.clicked() Accessible.onPressAction: control.clicked()
focusPolicy:Qt.TabFocus
id: control id: control
enabled: !disabled enabled: !disabled
horizontalPadding:12 horizontalPadding:12

View File

@ -22,6 +22,7 @@ Button {
height: 20 height: 20
enabled: !disabled enabled: !disabled
implicitHeight: height implicitHeight: height
focusPolicy:Qt.TabFocus
onClicked: clickListener() onClicked: clickListener()
contentItem: Item{} contentItem: Item{}
background : RowLayout{ background : RowLayout{