update
parent
a648b683d9
commit
fdcf2de3ee
|
@ -109,7 +109,7 @@ FluScrollablePage{
|
||||||
disabled:filled_button_switch.selected
|
disabled:filled_button_switch.selected
|
||||||
text:"Filled Button"
|
text:"Filled Button"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
showWarning("点击FilledButton")
|
showWarning("点击FilledButton"+height)
|
||||||
}
|
}
|
||||||
anchors{
|
anchors{
|
||||||
verticalCenter: parent.verticalCenter
|
verticalCenter: parent.verticalCenter
|
||||||
|
|
|
@ -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)
|
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
|
id: control
|
||||||
topPadding:5
|
|
||||||
bottomPadding:5
|
|
||||||
leftPadding:15
|
|
||||||
rightPadding:15
|
|
||||||
enabled: !disabled
|
enabled: !disabled
|
||||||
focusPolicy:Qt.TabFocus
|
focusPolicy:Qt.TabFocus
|
||||||
|
horizontalPadding:12
|
||||||
Keys.onSpacePressed: control.visualFocus&&clicked()
|
Keys.onSpacePressed: control.visualFocus&&clicked()
|
||||||
font:FluTextStyle.Body
|
font:FluTextStyle.Body
|
||||||
|
|
||||||
background: Rectangle{
|
background: Rectangle{
|
||||||
|
implicitWidth: 100
|
||||||
|
implicitHeight: 28
|
||||||
border.color: FluTheme.dark ? "#505050" : "#DFDFDF"
|
border.color: FluTheme.dark ? "#505050" : "#DFDFDF"
|
||||||
border.width: 1
|
border.width: 1
|
||||||
radius: 4
|
radius: 4
|
||||||
|
|
|
@ -14,16 +14,14 @@ Button {
|
||||||
property alias items: menu.content
|
property alias items: menu.content
|
||||||
|
|
||||||
id: control
|
id: control
|
||||||
topPadding:5
|
|
||||||
bottomPadding:5
|
|
||||||
leftPadding:15
|
|
||||||
rightPadding:35
|
rightPadding:35
|
||||||
enabled: !disabled
|
enabled: !disabled
|
||||||
focusPolicy:Qt.TabFocus
|
focusPolicy:Qt.TabFocus
|
||||||
|
horizontalPadding:12
|
||||||
Keys.onSpacePressed: control.visualFocus&&clicked()
|
Keys.onSpacePressed: control.visualFocus&&clicked()
|
||||||
|
|
||||||
background: Rectangle{
|
background: Rectangle{
|
||||||
|
implicitWidth: 100
|
||||||
|
implicitHeight: 28
|
||||||
border.color: FluTheme.dark ? "#505050" : "#DFDFDF"
|
border.color: FluTheme.dark ? "#505050" : "#DFDFDF"
|
||||||
border.width: 1
|
border.width: 1
|
||||||
radius: 4
|
radius: 4
|
||||||
|
|
|
@ -13,14 +13,13 @@ Button {
|
||||||
|
|
||||||
id: control
|
id: control
|
||||||
enabled: !disabled
|
enabled: !disabled
|
||||||
topPadding:5
|
|
||||||
bottomPadding:5
|
|
||||||
leftPadding:15
|
|
||||||
rightPadding:15
|
|
||||||
Keys.onSpacePressed: control.visualFocus&&clicked()
|
Keys.onSpacePressed: control.visualFocus&&clicked()
|
||||||
focusPolicy:Qt.TabFocus
|
focusPolicy:Qt.TabFocus
|
||||||
font:FluTextStyle.Body
|
font:FluTextStyle.Body
|
||||||
|
horizontalPadding:12
|
||||||
background: Rectangle{
|
background: Rectangle{
|
||||||
|
implicitWidth: 100
|
||||||
|
implicitHeight: 28
|
||||||
radius: 4
|
radius: 4
|
||||||
FluFocusRectangle{
|
FluFocusRectangle{
|
||||||
visible: control.visualFocus
|
visible: control.visualFocus
|
||||||
|
|
|
@ -33,13 +33,12 @@ Button {
|
||||||
|
|
||||||
id: control
|
id: control
|
||||||
enabled: !disabled
|
enabled: !disabled
|
||||||
topPadding:5
|
|
||||||
bottomPadding:5
|
|
||||||
leftPadding:15
|
|
||||||
rightPadding:15
|
|
||||||
Keys.onSpacePressed: control.visualFocus&&clicked()
|
Keys.onSpacePressed: control.visualFocus&&clicked()
|
||||||
focusPolicy:Qt.TabFocus
|
focusPolicy:Qt.TabFocus
|
||||||
|
horizontalPadding:12
|
||||||
background: Rectangle{
|
background: Rectangle{
|
||||||
|
implicitWidth: 100
|
||||||
|
implicitHeight: 28
|
||||||
radius: 4
|
radius: 4
|
||||||
border.color: FluTheme.dark ? "#505050" : "#DFDFDF"
|
border.color: FluTheme.dark ? "#505050" : "#DFDFDF"
|
||||||
border.width: selected ? 0 : 1
|
border.width: selected ? 0 : 1
|
||||||
|
|
|
@ -1,4 +1,35 @@
|
||||||
MetaInfo {
|
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 {
|
Type {
|
||||||
name: "FluentUI.Controls.FluButton"
|
name: "FluentUI.Controls.FluButton"
|
||||||
icon: "images/button-icon16.png"
|
icon: "images/button-icon16.png"
|
||||||
|
@ -11,7 +42,100 @@ MetaInfo {
|
||||||
requiredImport: "FluentUI"
|
requiredImport: "FluentUI"
|
||||||
toolTip: qsTr("A button with text.")
|
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\")" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue