Skip to content

Commit fba3ee4

Browse files
committed
Add AccentButton component
1 parent 7076d71 commit fba3ee4

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/uicomponents/AccentButton.qml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// SPDX-License-Identifier: GPL-3.0-or-later
2+
3+
import QtQuick
4+
import QtQuick.Controls.Material
5+
6+
CustomButton {
7+
readonly property color accent: Material.accent
8+
Material.foreground: Material.theme == Material.Dark ? "white" : "black"
9+
Material.background: Qt.rgba(accent.r, accent.g, accent.b, 0.3)
10+
background.layer.enabled: false
11+
font.capitalization: Font.MixedCase
12+
}

src/uicomponents/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ set(MODULE_URI UiComponents)
33
set(MODULE_QML_FILES
44
CustomButton.qml
55
CustomToolButton.qml
6+
AccentButton.qml
67
HoverToolTip.qml
78
CustomMenuBar.qml
89
CustomMenu.qml

0 commit comments

Comments
 (0)