Commit b24a2b43 authored by IBBoard's avatar IBBoard

Check hover position as widget-relative not layout-relative

Without this, the mouse "position" will never be within the
allocation rectangle of the title/subtitle/comment text widgets!
parent 6df577e6
......@@ -2025,7 +2025,14 @@ public class CheckerboardLayout : Gtk.DrawingArea {
public override bool query_tooltip(int x, int y, bool keyboard_mode, Gtk.Tooltip tooltip) {
CheckerboardItem? item = get_item_at_pixel(x, y);
return (item != null) ? item.query_tooltip(x, y, tooltip) : false;
// Note: X & Y allocations are relative to parents, so we need to query the item's tooltip
// relative to its INTERNAL coordinates, otherwise tooltips don't work
if (item != null) {
item.translate_coordinates(ref x, ref y);
return item.query_tooltip(x, y, tooltip);
} else {
return false;
private void on_colors_changed() {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment