Use pointingrectangle for toolbutton tooltips

This commit is contained in:
fieldOfView 2015-12-01 14:03:27 +01:00
parent 1d27822970
commit ec46b49847
4 changed files with 44 additions and 28 deletions

View file

@ -13,7 +13,7 @@ Item {
width: buttons.width;
height: buttons.height
property int activeY
//property int activeY
ColumnLayout {
id: buttons;
@ -44,29 +44,21 @@ Item {
cursorShape: Qt.PointingHandCursor
onClicked: {
parent.checked ? UM.Controller.setActiveTool(null) : UM.Controller.setActiveTool(model.id);
base.activeY = parent.y
//base.activeY = parent.y
}
}
}
}
}
Rectangle {
width: base.width
height: base.height
z: parent.z - 1
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
color: UM.Theme.colors.lining
}
Rectangle {
id: panelBackground;
anchors.left: parent.right;
anchors.leftMargin: UM.Theme.sizes.default_margin.width;
anchors.top: parent.top;
y: base.activeY
//y: base.activeY
z: buttons.z -1
width: {
if (panel.item && panel.width > 0){