GNOME Bugzilla – Bug 761626
tool-filter-button: Selected icon is not centered on the image
Last modified: 2016-02-11 15:41:06 UTC
The currently selected filter is depicted by a right tick mark arrow on the filter button. If you look closely, it is not actually centered on the corresponding filter button. Start by looking at the function: photos_tool_filter_button_init ()
Created attachment 320683 [details] [review] tool-filter-button: Center the selected arrow by adjusting overlay
Debarshi Ray, I quickly want to test the patch first (apply -> build -> run photos) then please take a look at the patch's code. I don't consider this as a final patch. It's more like a hack (according to me). There's a comment in the patch. Please comment about it in the review.
Review of attachment 320683 [details] [review]: Thanks for the patch, Umang. ::: src/photos-tool-filter-button.c @@ +131,1 @@ shader = photos_widget_shader_new (image); We need to explicitly show the image since it is no longer the "image" of the button. GtkButton will only mark the overlay as visible but won't recurse into it. @@ +315,3 @@ + photos_tool_filter_button_init (self); + photos_tool_filter_button_toggled (self); Umm... why is this needed? @@ +316,3 @@ + photos_tool_filter_button_init (self); + photos_tool_filter_button_toggled (self); + gtk_container_add (GTK_CONTAINER (self->overlay), image); We have to manually remove the older image that is inside the overlay. @@ +317,3 @@ + photos_tool_filter_button_toggled (self); + gtk_container_add (GTK_CONTAINER (self->overlay), image); + gtk_button_set_image (GTK_BUTTON (self->button), self->overlay); Ditto about showing the image.
Created attachment 320885 [details] [review] tool-filter-button: Center the selected icon Addressed the above issues.