Fix tooltips for simple mode helpers

CURA-790
This commit is contained in:
fieldOfView 2016-05-25 19:02:55 +02:00
parent fe53a43819
commit 098cf515df
2 changed files with 22 additions and 4 deletions

View File

@ -218,7 +218,7 @@ Item
onEntered: onEntered:
{ {
parent.hovered_ex = true parent.hovered_ex = true
base.showTooltip(brimCheckBox, Qt.point(-helpersCellRight.x, 0), base.showTooltip(brimCheckBox, Qt.point(-brimCheckBox.x, 0),
catalog.i18nc("@label", "Enable printing a brim. This will add a single-layer-thick flat area around your object which is easy to cut off afterwards.")); catalog.i18nc("@label", "Enable printing a brim. This will add a single-layer-thick flat area around your object which is easy to cut off afterwards."));
} }
onExited: onExited:
@ -266,7 +266,7 @@ Item
onEntered: onEntered:
{ {
parent.hovered_ex = true parent.hovered_ex = true
base.showTooltip(supportCheckBox, Qt.point(-helpersCellRight.x, 0), base.showTooltip(supportCheckBox, Qt.point(-supportCheckBox.x, 0),
catalog.i18nc("@label", "Enable printing support structures. This will build up supporting structures below the model to prevent the model from sagging or printing in mid air.")); catalog.i18nc("@label", "Enable printing support structures. This will build up supporting structures below the model to prevent the model from sagging or printing in mid air."));
} }
onExited: onExited:
@ -289,6 +289,8 @@ Item
width: parent.width/100*45 width: parent.width/100*45
style: UM.Theme.styles.combobox style: UM.Theme.styles.combobox
property bool hovered_ex: false
currentIndex: supportEnabled.properties.value == "True" ? parseFloat(supportExtruderNr.properties.value) + 1 : 0 currentIndex: supportEnabled.properties.value == "True" ? parseFloat(supportExtruderNr.properties.value) + 1 : 0
onActivated: { onActivated: {
if(index==0) { if(index==0) {
@ -298,6 +300,22 @@ Item
supportExtruderNr.setPropertyValue("value", index - 1); supportExtruderNr.setPropertyValue("value", index - 1);
} }
} }
MouseArea {
anchors.fill: parent
hoverEnabled: true
acceptedButtons: Qt.NoButton
onEntered:
{
parent.hovered_ex = true
base.showTooltip(supportExtruderCombobox, Qt.point(-supportExtruderCombobox.x, 0),
catalog.i18nc("@label", "Select which extruder to use for support. This will build up supporting structures below the model to prevent the model from sagging or printing in mid air."));
}
onExited:
{
parent.hovered_ex = false
base.hideTooltip();
}
}
} }
ListModel { ListModel {

View File

@ -286,11 +286,11 @@ QtObject {
implicitHeight: UM.Theme.getSize("setting_control").height; implicitHeight: UM.Theme.getSize("setting_control").height;
implicitWidth: UM.Theme.getSize("setting_control").width; implicitWidth: UM.Theme.getSize("setting_control").width;
color: control.hovered ? Theme.getColor("setting_control_highlight") : Theme.getColor("setting_control"); color: (control.hovered || control.hovered_ex) ? Theme.getColor("setting_control_highlight") : Theme.getColor("setting_control");
Behavior on color { ColorAnimation { duration: 50; } } Behavior on color { ColorAnimation { duration: 50; } }
border.width: Theme.getSize("default_lining").width; border.width: Theme.getSize("default_lining").width;
border.color: control.hovered ? Theme.getColor("setting_control_border_highlight") : Theme.getColor("setting_control_border"); border.color: (control.hovered || control.hovered_ex) ? Theme.getColor("setting_control_border_highlight") : Theme.getColor("setting_control_border");
} }
label: Item { label: Item {
Label { Label {