mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-28 21:31:15 -07:00
Add a tooltip to PrinterButton
This commit is contained in:
parent
0d54855937
commit
bcbbaf41f3
1 changed files with 19 additions and 0 deletions
|
|
@ -6,5 +6,24 @@ import QtQuick.Layouts 1.1
|
||||||
import UM 1.0 as UM
|
import UM 1.0 as UM
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
|
id: base;
|
||||||
style: UM.Theme.styles.tool_button;
|
style: UM.Theme.styles.tool_button;
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
anchors.bottom: parent.top;
|
||||||
|
|
||||||
|
width: parent.width;
|
||||||
|
height: base.hovered ? label.height : 0;
|
||||||
|
Behavior on height { NumberAnimation { duration: 75; } }
|
||||||
|
|
||||||
|
opacity: base.hovered ? 1.0 : 0.0;
|
||||||
|
Behavior on opacity { NumberAnimation { duration: 75; } }
|
||||||
|
|
||||||
|
Label {
|
||||||
|
id: label
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter;
|
||||||
|
text: base.text;
|
||||||
|
font: UM.Theme.fonts.button_tooltip;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue