main
朱子楚\zhuzi 2023-05-13 00:20:12 +08:00
parent a648b683d9
commit fdcf2de3ee
6 changed files with 138 additions and 20 deletions

View File

@ -109,7 +109,7 @@ FluScrollablePage{
disabled:filled_button_switch.selected
text:"Filled Button"
onClicked: {
showWarning("点击FilledButton")
showWarning("点击FilledButton"+height)
}
anchors{
verticalCenter: parent.verticalCenter

View File

@ -11,16 +11,14 @@ Button {
property color disableColor: FluTheme.dark ? Qt.rgba(59/255,59/255,59/255,1) : Qt.rgba(252/255,252/255,252/255,1)
id: control
topPadding:5
bottomPadding:5
leftPadding:15
rightPadding:15
enabled: !disabled
focusPolicy:Qt.TabFocus
horizontalPadding:12
Keys.onSpacePressed: control.visualFocus&&clicked()
font:FluTextStyle.Body
background: Rectangle{
implicitWidth: 100
implicitHeight: 28
border.color: FluTheme.dark ? "#505050" : "#DFDFDF"
border.width: 1
radius: 4

View File

@ -14,16 +14,14 @@ Button {
property alias items: menu.content
id: control
topPadding:5
bottomPadding:5
leftPadding:15
rightPadding:35
enabled: !disabled
focusPolicy:Qt.TabFocus
horizontalPadding:12
Keys.onSpacePressed: control.visualFocus&&clicked()
background: Rectangle{
implicitWidth: 100
implicitHeight: 28
border.color: FluTheme.dark ? "#505050" : "#DFDFDF"
border.width: 1
radius: 4

View File

@ -13,14 +13,13 @@ Button {
id: control
enabled: !disabled
topPadding:5
bottomPadding:5
leftPadding:15
rightPadding:15
Keys.onSpacePressed: control.visualFocus&&clicked()
focusPolicy:Qt.TabFocus
font:FluTextStyle.Body
horizontalPadding:12
background: Rectangle{
implicitWidth: 100
implicitHeight: 28
radius: 4
FluFocusRectangle{
visible: control.visualFocus

View File

@ -33,13 +33,12 @@ Button {
id: control
enabled: !disabled
topPadding:5
bottomPadding:5
leftPadding:15
rightPadding:15
Keys.onSpacePressed: control.visualFocus&&clicked()
focusPolicy:Qt.TabFocus
horizontalPadding:12
background: Rectangle{
implicitWidth: 100
implicitHeight: 28
radius: 4
border.color: FluTheme.dark ? "#505050" : "#DFDFDF"
border.width: selected ? 0 : 1

View File

@ -1,4 +1,35 @@
MetaInfo {
Type {
name: "FluentUI.Controls.FluWindow"
icon: "images/button-icon16.png"
ItemLibraryEntry {
name: "FluWindow"
category: "FluentUI - Controls"
libraryIcon: "images/button-icon.png"
version: "1.0"
requiredImport: "FluentUI"
toolTip: qsTr("FluWindow")
}
}
Type {
name: "FluentUI.Controls.FluTextButton"
icon: "images/button-icon16.png"
ItemLibraryEntry {
name: "FluTextButton"
category: "FluentUI - Controls"
libraryIcon: "images/button-icon.png"
version: "1.0"
requiredImport: "FluentUI"
toolTip: qsTr("A button with text.")
Property { name: "text"; type: "binding"; value: "qsTr(\"Text Button\")" }
}
}
Type {
name: "FluentUI.Controls.FluButton"
icon: "images/button-icon16.png"
@ -11,7 +42,100 @@ MetaInfo {
requiredImport: "FluentUI"
toolTip: qsTr("A button with text.")
Property { name: "text"; type: "binding"; value: "qsTr(\"Button\")" }
Property { name: "text"; type: "binding"; value: "qsTr(\"Standard Button\")" }
}
}
Type {
name: "FluentUI.Controls.FluFilledButton"
icon: "images/button-icon16.png"
ItemLibraryEntry {
name: "FluFilledButton"
category: "FluentUI - Controls"
libraryIcon: "images/button-icon.png"
version: "1.0"
requiredImport: "FluentUI"
toolTip: qsTr("A button with text.")
Property { name: "text"; type: "binding"; value: "qsTr(\"Filled Button\")" }
}
}
Type {
name: "FluentUI.Controls.FluToggleButton"
icon: "images/button-icon16.png"
ItemLibraryEntry {
name: "FluToggleButton"
category: "FluentUI - Controls"
libraryIcon: "images/button-icon.png"
version: "1.0"
requiredImport: "FluentUI"
toolTip: qsTr("A button with text.")
Property { name: "text"; type: "binding"; value: "qsTr(\"Toggle Button\")" }
}
}
Type {
name: "FluentUI.Controls.FluIconButton"
icon: "images/button-icon16.png"
ItemLibraryEntry {
name: "FluIconButton"
category: "FluentUI - Controls"
libraryIcon: "images/button-icon.png"
version: "1.0"
requiredImport: "FluentUI"
}
}
Type {
name: "FluentUI.Controls.FluDropDownButton"
icon: "images/button-icon16.png"
ItemLibraryEntry {
name: "FluDropDownButton"
category: "FluentUI - Controls"
libraryIcon: "images/button-icon.png"
version: "1.0"
requiredImport: "FluentUI"
toolTip: qsTr("A button with text.")
Property { name: "text"; type: "binding"; value: "qsTr(\"DropDownButton\")" }
}
}
Type {
name: "FluentUI.Controls.FluRadioButton"
icon: "images/button-icon16.png"
ItemLibraryEntry {
name: "FluRadioButton"
category: "FluentUI - Controls"
libraryIcon: "images/button-icon.png"
version: "1.0"
requiredImport: "FluentUI"
toolTip: qsTr("A button with text.")
Property { name: "text"; type: "binding"; value: "qsTr(\"Radio Button\")" }
}
}
Type {
name: "FluentUI.Controls.FluCheckBox"
icon: "images/button-icon16.png"
ItemLibraryEntry {
name: "FluCheckBox"
category: "FluentUI - Controls"
libraryIcon: "images/button-icon.png"
version: "1.0"
requiredImport: "FluentUI"
toolTip: qsTr("A button with text.")
Property { name: "text"; type: "binding"; value: "qsTr(\"CheckBox\")" }
}
}