diff --git a/AppPrimaryButton.qml b/AppPrimaryButton.qml new file mode 100644 index 0000000..f3456c9 --- /dev/null +++ b/AppPrimaryButton.qml @@ -0,0 +1,23 @@ +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: true + + 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: Color.blend(control.checked || control.highlighted ? control.palette.dark : control.palette.button, + control.palette.mid, control.down ? 0.5 : 0.0) + border.color: control.palette.highlight + border.width: control.visualFocus ? 2 : 0 + // custom + radius: Theme.radius + } +} diff --git a/CMakeLists.txt b/CMakeLists.txt index 57a6b61..fdca990 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,7 @@ qt_add_library(designsystem STATIC) set(plain_qml_files AppText.qml AppIcon.qml + AppPrimaryButton.qml ) set(qml_singletons Fonts.qml