From afd1b5567d25472f3e9002767b49d132706006d6 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 30 Mar 2015 10:57:21 +0200 Subject: [PATCH] Add a theme style for setting categories --- styles.qml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/styles.qml b/styles.qml index 02dd43bf4f..616f0a416c 100644 --- a/styles.qml +++ b/styles.qml @@ -51,4 +51,21 @@ QtObject { } } } + + property Component category: Component { + ButtonStyle { + background: UM.AngledCornerRectangle { + property bool down: control.pressed || (control.checkable && control.checked); + color: down ? UM.Theme.colors.button_down : control.hovered ? UM.Theme.colors.button_hover : UM.Theme.colors.button; + cornerSize: UM.Theme.sizes.default_margin.width; + } + label: Row { + anchors.fill: parent; + anchors.margins: UM.Theme.sizes.default_margin.width; + spacing: UM.Theme.sizes.default_margin.width; + Image { anchors.verticalCenter: parent.verticalCenter; source: control.iconSource; } + Label { anchors.verticalCenter: parent.verticalCenter; text: control.text; font: UM.Theme.fonts.large; color: UM.Theme.colors.button_text } + } + } + } }