Tooltip on a St.Bin in an extension indicator in status bar?


I’m looking for a way to add a tooltip on a St.Bin element in an extension indicator (in status bar), but I did not find a solution for this. Do you have any idea for that ?

Just in case, the code of the extension (focus on the related St.Bin element):

You can create a widget and add it to Main.layoutManager.uiGroup, then place it one the screen appropriately:

let label = new St.Label({ text: 'Tooltip' });

Main.layoutManager.uiGroup.set_child_above_sibling(label, null);

let [x, y] = someParentActor.get_transformed_position();
label.set_position(x, y);

Generally I’d avoid tooltips, since they aren’t very accessible and there’s other UX concerns, but that’s more or less how you would do it.

(post deleted by author)

1 Like

Thanks @andyholmes ! It’s works great !

1 Like

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.