From ac95858e4b77764ceb806a7edbfb79f30d24d09b Mon Sep 17 00:00:00 2001 From: Tamara Hogenhout Date: Mon, 17 Aug 2015 17:32:20 +0200 Subject: [PATCH] 15.10 Restyling buttons in the contentArea Still have to change the buttonsizes, but I don't have the final designs/sizes yet. Contributes to: issue CURA-60 --- resources/themes/cura/styles.qml | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index e7794746f5..77b1d2852e 100644 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -90,34 +90,32 @@ QtObject { property Component tool_button: Component { ButtonStyle { background: Item { + ///////////TODO CHANGE SIZES!! implicitWidth: UM.Theme.sizes.button.width; implicitHeight: UM.Theme.sizes.button.height; Rectangle { - anchors.bottom: parent.verticalCenter; + id: tool_button_background + anchors.top: parent.verticalCenter; width: parent.width; + ///////////TODO CHANGE LABELHEIGHT!! height: control.hovered ? parent.height / 2 + label.height : 0; Behavior on height { NumberAnimation { duration: 100; } } opacity: control.hovered ? 1.0 : 0.0; Behavior on opacity { NumberAnimation { duration: 100; } } - Rectangle { - anchors.horizontalCenter: parent.horizontalCenter; - width: childrenRect.width; - height: childrenRect.height; - - Label { - id: label - text: control.text.replace("&", ""); - font: UM.Theme.fonts.button_tooltip; - color: UM.Theme.colors.button_tooltip_text; - } + Label { + id: label + anchors.bottom: parent.bottom + text: control.text.replace("&", ""); + font: UM.Theme.fonts.button_tooltip; + color: UM.Theme.colors.button_tooltip_text; } } - UM.AngledCornerRectangle { + Rectangle { id: buttonFace; anchors.fill: parent; @@ -138,7 +136,6 @@ QtObject { } } Behavior on color { ColorAnimation { duration: 50; } } - cornerSize: UM.Theme.sizes.default_margin.width; Label { anchors.right: parent.right;