feat: add secondary button
This commit is contained in:
@@ -0,0 +1,22 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Controls.Basic
|
||||||
|
import QtQuick.Controls.impl // Needed for features like the Control.blend() function
|
||||||
|
import DesignSystem
|
||||||
|
|
||||||
|
Button {
|
||||||
|
id: control
|
||||||
|
font.family: Fonts.dotrice
|
||||||
|
font.bold: false
|
||||||
|
|
||||||
|
background: Rectangle {
|
||||||
|
// NOTE: copied from ~/Qt/6.8.3/macos/qml/QtQuick/Controls/Basic/Button.qml
|
||||||
|
implicitWidth: 100
|
||||||
|
implicitHeight: 40
|
||||||
|
visible: !control.flat || control.down || control.checked || control.highlighted
|
||||||
|
color: control.down ? Theme.card : "transparent"
|
||||||
|
border.color: Theme.softBorder
|
||||||
|
border.width: 1
|
||||||
|
// custom
|
||||||
|
radius: Theme.radius
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -13,6 +13,7 @@ set(plain_qml_files
|
|||||||
AppText.qml
|
AppText.qml
|
||||||
AppIcon.qml
|
AppIcon.qml
|
||||||
AppPrimaryButton.qml
|
AppPrimaryButton.qml
|
||||||
|
AppSecondaryButton.qml
|
||||||
AppCard.qml
|
AppCard.qml
|
||||||
AppCaption.qml
|
AppCaption.qml
|
||||||
AppHeadline.qml
|
AppHeadline.qml
|
||||||
|
|||||||
+12
-5
@@ -21,10 +21,17 @@ AppWindow {
|
|||||||
|
|
||||||
AppLogo {}
|
AppLogo {}
|
||||||
|
|
||||||
AppPrimaryButton {
|
Row {
|
||||||
text: "Toggle theme"
|
spacing: 5
|
||||||
onClicked: {
|
|
||||||
Theme.toggleTheme()
|
AppPrimaryButton {
|
||||||
|
text: "Toggle theme"
|
||||||
|
onClicked: {
|
||||||
|
Theme.toggleTheme()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
AppSecondaryButton {
|
||||||
|
text: "Secondary button"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -51,7 +58,7 @@ AppWindow {
|
|||||||
|
|
||||||
Switch {}
|
Switch {}
|
||||||
|
|
||||||
AppPrimaryButton {
|
AppSecondaryButton {
|
||||||
text: "Open message dialog"
|
text: "Open message dialog"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
messageDialog.open()
|
messageDialog.open()
|
||||||
|
|||||||
Reference in New Issue
Block a user