GNOME Bugzilla – Bug 786464
[PATHCES] Cleanup and fix gimpcellrenderertoggle
Last modified: 2017-08-19 06:36:23 UTC
The following 3 patches remove a deprecated GTK call and fix rendering if the mouse is currently not hovering over the widget. I can confirm the rendering bug on the latest stable version 3.24.1 with the example PDF provided here: https://www.pdfill.com/pdf_layer.html
Created attachment 357888 [details] [review] Replace depracted gtk_cell_renderer_get_size Revert to calling gimp_cell_renderer_toggle_get_size as in the upstream GIMP code. (Commit 5e064e2f9 ("[gimpcellrenderertoggle] Port to gtk 3") changed this to the current version with no obvious reason.)
Created attachment 357889 [details] [review] Fix rendering without hover The previous code accessed draw_rect which was only set if a shadow was drawn as hover effect. This has worked until commit 8c225e6 ("Remove gtk 2 support") where the gtk 2 code path had if (gdk_rectangle_intersect (expose_area, cell_area, &draw_rect) && (flags & GTK_CELL_RENDERER_PRELIT)) which meant setting draw_rect unconditionally. Commit 0a2d3c2 ("[gimpcellrenderertoggle] Paint a shadow when the mouse is over the cell renderer") readded the code path in its current form which checks the flag first.
Created attachment 357890 [details] [review] Remove code for drawing a shadow I can't see any difference in the current version of all libraries.
Comment on attachment 357888 [details] [review] Replace depracted gtk_cell_renderer_get_size Pushed, thanks.
Comment on attachment 357890 [details] [review] Remove code for drawing a shadow I don't see any difference either.