Draw border around button_tooltip

This commit is contained in:
fieldOfView 2015-12-01 15:19:39 +01:00
parent ec46b49847
commit 8f11c36658
2 changed files with 13 additions and 5 deletions

View File

@ -104,7 +104,7 @@ QtObject {
target: Qt.point(parent.x, y + height/2) target: Qt.point(parent.x, y + height/2)
arrowSize: UM.Theme.sizes.button_tooltip_arrow.width arrowSize: UM.Theme.sizes.button_tooltip_arrow.width
color: UM.Theme.colors.button_tooltip color: UM.Theme.colors.button_tooltip_border
opacity: control.hovered ? 1.0 : 0.0; opacity: control.hovered ? 1.0 : 0.0;
width: control.hovered ? button_tip.width + UM.Theme.sizes.button_tooltip.width : 0 width: control.hovered ? button_tip.width + UM.Theme.sizes.button_tooltip.width : 0
@ -113,6 +113,14 @@ QtObject {
Behavior on width { NumberAnimation { duration: 100; } } Behavior on width { NumberAnimation { duration: 100; } }
Behavior on opacity { NumberAnimation { duration: 100; } } Behavior on opacity { NumberAnimation { duration: 100; } }
UM.PointingRectangle {
color: UM.Theme.colors.button_tooltip;
anchors.fill: parent
anchors.margins: UM.Theme.sizes.default_lining.width
target: Qt.point(- UM.Theme.sizes.default_lining.width, parent.height/2)
arrowSize: parent.arrowSize
}
Label { Label {
id: button_tip id: button_tip

View File

@ -72,9 +72,9 @@
"button_disabled": [24, 41, 77, 255], "button_disabled": [24, 41, 77, 255],
"button_disabled_text": [70, 84, 113, 255], "button_disabled_text": [70, 84, 113, 255],
"button_tooltip": [24, 41, 77, 255], "button_tooltip": [255, 255, 255, 255],
"button_tooltip_border": [245, 245, 245, 255], "button_tooltip_border": [24, 41, 77, 255],
"button_tooltip_text": [255, 255, 255, 255], "button_tooltip_text": [24, 41, 77, 255],
"toggle_checked": [24, 41, 77, 255], "toggle_checked": [24, 41, 77, 255],
"toggle_checked_border": [24, 41, 77, 255], "toggle_checked_border": [24, 41, 77, 255],
@ -196,7 +196,7 @@
"button_icon": [3, 3], "button_icon": [3, 3],
"button_lining": [0, 0], "button_lining": [0, 0],
"button_tooltip": [1.2, 1.2], "button_tooltip": [1.0, 1.3],
"button_tooltip_arrow": [0.25, 0.25], "button_tooltip_arrow": [0.25, 0.25],
"progressbar": [26.0, 0.8], "progressbar": [26.0, 0.8],