mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-07-05 17:55:25 +08:00
first commit
This commit is contained in:
28
src/controls/FilledButton.qml
Normal file
28
src/controls/FilledButton.qml
Normal file
@ -0,0 +1,28 @@
|
||||
//@uri FluentUI
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Controls.Material 2.15
|
||||
|
||||
Rectangle {
|
||||
id: button
|
||||
width: 100
|
||||
height: 40
|
||||
radius: 4
|
||||
color: Material.accent
|
||||
border.color: Material.accent
|
||||
|
||||
Text {
|
||||
id: buttonText
|
||||
text: "Button"
|
||||
color: "white"
|
||||
font.pixelSize: 14
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
console.log("Button clicked")
|
||||
}
|
||||
}
|
||||
}
|
40
src/controls/StandardButton.qml
Normal file
40
src/controls/StandardButton.qml
Normal file
@ -0,0 +1,40 @@
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Controls.Material 2.15
|
||||
|
||||
Rectangle {
|
||||
id: button
|
||||
|
||||
property int startPadding : 15
|
||||
property int endPadding : 15
|
||||
property int topPadding: 8
|
||||
property int bottomPadding: 8
|
||||
property bool disabled: false
|
||||
radius: 4
|
||||
color: "#FFFFFF"
|
||||
|
||||
width: childrenRect.width
|
||||
height: childrenRect.height
|
||||
|
||||
border.color: "#eeeeee"
|
||||
border.width: 1
|
||||
|
||||
Text {
|
||||
id: buttonText
|
||||
text: "Standard Button"
|
||||
color: "#000000"
|
||||
font.pixelSize: 13
|
||||
leftPadding: button.startPadding
|
||||
rightPadding: button.endPadding
|
||||
topPadding: button.topPadding
|
||||
bottomPadding: button.bottomPadding
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
console.log("Button clicked")
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user