GNOME Bugzilla – Bug 692970
gdl-dock-item-button-image: center drawing of image
Last modified: 2021-06-19 08:57:43 UTC
See the attached patch. I don't really know why the division by four works instead of a division by two as I would expect. But it seems to work which I guess is the most important.
Created attachment 234938 [details] [review] gdl-dock-item-button-image: center drawing of image
Review of attachment 234938 [details] [review]: Thanks for your patch but I don't see the issue. The icons looks quite similar with or without your patch. I have taken some screen shoot when the icon is highlighted to be sure and I get the following: The whole box is 24x24 pixels, there is a 2 pixels border and the rounded box is 11x11 pixels so there is no way to center it exactly. With your patch I get 5 pixels between the rounded box and the top or the left border and obviously 4 between the rounded box and the bottom and right border. Without your patch, I get the opposite: 4 pixels with the top and left border and 5 pixel with the bottom and right border. Then, in your code your use ICON_SIZE but the rounded box is smaller, you should use its size: 11 pixels instead of ICON_SIZE. I think it could explain why you have divided the result by 4 instead of 2. Do you get different result on your system? Perhaps it can depend of the theme.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version of gdl, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/gdl/-/issues/ Thank you for your understanding and your help.