tooltips misplaced on large/tall widgets
Submitted by Lionel Landwerlin
Link to original bug (#703471)
Description
Attached is a screenshot of nautilus showing the tooltip from the treeview at a fairly unexpected position.
I believe the problem is that the positioning code of GtkTooltip is assuming that the whatever widget we display the tooltip on, the widget will always be small enough saw that the distance between the border of the widget and the position of the mouse pointer is inferior to the size of the mouse cursor + 32 pixels.
That is not the case on large widget like a treeview.
You can also try this on this small example :
=======================================================
const GLib = imports.gi.GLib; const Gtk = imports.gi.Gtk; const Lang = imports.lang;
for (let i in Gtk) log(Gtk[i]); log(Gtk);
Gtk.init(null, null);
let mwindow = new Gtk.Window(); mwindow.resize(500,500);
let button = new Gtk.Button({ label: "plop" }); button.set_tooltip_text('fffffffffffffffffffffffffffuuuuuu'); mwindow.add(button);
mwindow.show_all();
Gtk.main();
=======================================================
The attached patch provides an improvement over tooltip positioning.
Version: 3.22.x