From f5e4ef108e3df60a7ac5d31c0e76e33b377feb39 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Fri, 17 Apr 2015 18:30:22 +0200 Subject: [PATCH] Move the button text from PrinterButton to the style in Theme --- styles.qml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/styles.qml b/styles.qml index 2504e7ef4b..ef4ab8936e 100644 --- a/styles.qml +++ b/styles.qml @@ -54,6 +54,24 @@ QtObject { } Behavior on color { ColorAnimation { duration: 50; } } cornerSize: UM.Theme.sizes.default_margin.width; + + Rectangle { + anchors.bottom: parent.top; + + width: parent.width; + height: control.hovered ? label.height : 0; + Behavior on height { NumberAnimation { duration: 75; } } + + opacity: control.hovered ? 1.0 : 0.0; + Behavior on opacity { NumberAnimation { duration: 75; } } + + Label { + id: label + anchors.horizontalCenter: parent.horizontalCenter; + text: control.text; + font: UM.Theme.fonts.button_tooltip; + } + } } label: Item {