mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 07:33:57 -06:00
Fixed tooltips
This commit is contained in:
parent
b83e34aa24
commit
98b07e7a2c
1 changed files with 16 additions and 3 deletions
|
@ -13,8 +13,9 @@ UM.AngledCornerRectangle {
|
||||||
property alias saveAction: saveButton.saveAction;
|
property alias saveAction: saveButton.saveAction;
|
||||||
|
|
||||||
cornerSize: UM.Theme.sizes.default_margin.width;
|
cornerSize: UM.Theme.sizes.default_margin.width;
|
||||||
|
|
||||||
function showTooltip(item, position, text) {
|
function showTooltip(item, position, text) {
|
||||||
|
print("omg zomg")
|
||||||
tooltip.text = text;
|
tooltip.text = text;
|
||||||
position = item.mapToItem(base, position.x, position.y);
|
position = item.mapToItem(base, position.x, position.y);
|
||||||
tooltip.show(position);
|
tooltip.show(position);
|
||||||
|
@ -59,7 +60,18 @@ UM.AngledCornerRectangle {
|
||||||
|
|
||||||
property Item sidebar: base;
|
property Item sidebar: base;
|
||||||
|
|
||||||
onLoaded: if(item) item.configureSettings = base.configureMachinesAction
|
onLoaded:
|
||||||
|
{
|
||||||
|
if(item) item.configureSettings = base.configureMachinesAction;
|
||||||
|
if(typeof(item.onShowTooltip) != 'undefined')
|
||||||
|
{
|
||||||
|
item.showTooltip.connect(base.showTooltip)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//onShowTooltip: base.showTooltip(item,position,text)
|
||||||
|
//onHideTooltip: base.hideTooltip()
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveButton {
|
SaveButton {
|
||||||
|
@ -68,8 +80,9 @@ UM.AngledCornerRectangle {
|
||||||
Layout.preferredHeight: UM.Theme.sizes.button.height;
|
Layout.preferredHeight: UM.Theme.sizes.button.height;
|
||||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter;
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SidebarTooltip {
|
SidebarTooltip {
|
||||||
id: tooltip;
|
id: tooltip;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue