After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 786464 - [PATHCES] Cleanup and fix gimpcellrenderertoggle
[PATHCES] Cleanup and fix gimpcellrenderertoggle
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: PDF
git master
Other Linux
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-08-18 12:07 UTC by Jonas Hahnfeld
Modified: 2017-08-19 06:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Replace depracted gtk_cell_renderer_get_size (1.61 KB, patch)
2017-08-18 12:07 UTC, Jonas Hahnfeld
committed Details | Review
Fix rendering without hover (2.17 KB, patch)
2017-08-18 12:08 UTC, Jonas Hahnfeld
committed Details | Review
Remove code for drawing a shadow (1.87 KB, patch)
2017-08-18 12:09 UTC, Jonas Hahnfeld
committed Details | Review

Description Jonas Hahnfeld 2017-08-18 12:07:16 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
Comment 1 Jonas Hahnfeld 2017-08-18 12:07:56 UTC
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.)
Comment 2 Jonas Hahnfeld 2017-08-18 12:08:44 UTC
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.
Comment 3 Jonas Hahnfeld 2017-08-18 12:09:08 UTC
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 4 Carlos Garcia Campos 2017-08-19 06:35:41 UTC
Comment on attachment 357888 [details] [review]
Replace depracted  gtk_cell_renderer_get_size

Pushed, thanks.
Comment 5 Carlos Garcia Campos 2017-08-19 06:36:16 UTC
Comment on attachment 357890 [details] [review]
Remove code for drawing a shadow

I don't see any difference either.