feat: add ghost button
This commit is contained in:
@@ -0,0 +1,21 @@
|
|||||||
|
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 ? "transparent" : Theme.card
|
||||||
|
border.width: 0
|
||||||
|
// custom
|
||||||
|
radius: Theme.radius
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -14,6 +14,7 @@ set(plain_qml_files
|
|||||||
AppIcon.qml
|
AppIcon.qml
|
||||||
AppPrimaryButton.qml
|
AppPrimaryButton.qml
|
||||||
AppSecondaryButton.qml
|
AppSecondaryButton.qml
|
||||||
|
AppGhostButton.qml
|
||||||
AppCard.qml
|
AppCard.qml
|
||||||
AppCaption.qml
|
AppCaption.qml
|
||||||
AppHeadline.qml
|
AppHeadline.qml
|
||||||
|
|||||||
@@ -33,6 +33,9 @@ AppWindow {
|
|||||||
AppSecondaryButton {
|
AppSecondaryButton {
|
||||||
text: "Secondary button"
|
text: "Secondary button"
|
||||||
}
|
}
|
||||||
|
AppGhostButton {
|
||||||
|
text: "Ghost"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
AppCard {
|
AppCard {
|
||||||
|
|||||||
Reference in New Issue
Block a user