mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Simplify tooltip handling for settings
Rather than use three different signals, use a single showTooltip signal with a text property. This makes it possible to show any tooltip from within a setting item.
This commit is contained in:
parent
2abb9a47c1
commit
b7fd97737c
3 changed files with 8 additions and 5 deletions
|
|
@ -18,7 +18,7 @@ Item {
|
|||
property alias contents: controlContainer.children
|
||||
|
||||
signal contextMenuRequested()
|
||||
signal showTooltip(var position);
|
||||
signal showTooltip(string text);
|
||||
signal hideTooltip();
|
||||
|
||||
MouseArea
|
||||
|
|
@ -49,7 +49,7 @@ Item {
|
|||
interval: 500;
|
||||
repeat: false;
|
||||
|
||||
onTriggered: base.showTooltip({ x: mouse.mouseX, y: mouse.mouseY });
|
||||
onTriggered: base.showTooltip(definition.description);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue