GNOME Bugzilla – Bug 678456
Zoom in/out to the right icon in the collection
Last modified: 2016-03-31 14:00:11 UTC
When you click on or go back from a box we zoom into the wrong place, because currently there is no api to get the right place. Bug 678418 has patches to add this to gtk+ which we could then use.
Created attachment 216803 [details] [review] Require Gtk+ 3.5.5 for gtk_icon_view_get_cell_area
Created attachment 216804 [details] [review] Add IconView.get_cell_area to vapi file
Created attachment 216805 [details] [review] Zoom to/from the right item in the collection view We use the new get_cell_area to figure out where to zoom.
Created attachment 216806 [details] [review] Minor cleanup Define a current_image local to avoid multiple uses of App.app.current_item
Created attachment 216807 [details] [review] Fix item zooming after properties shown We hide the current item when showing the properties view, we need to show it when zooming it back to the collection view.
Review of attachment 216806 [details] [review]: ACK
Review of attachment 216803 [details] [review]: ACK
Review of attachment 216804 [details] [review]: Please do remember to update the vapi in vala package as well.
We should first wait for bug 678418
Review of attachment 216805 [details] [review]: Looks good otherwise, does it work? :) ::: src/collection-view.vala @@ -45,3 +45,3 @@ icon_view.unselect_all (); if (App.app.current_item != null) { - var actor = App.app.current_item.actor; + var current_item = App.app.current_item; isn't this already part of another patch on this bug? @@ -49,3 +50,3 @@ Clutter.BinAlignment.FIXED, Clutter.BinAlignment.FIXED); - // TODO: How do I get the icon coords from the iconview? + Gdk.Rectangle rect; these 4 lines are repeated just below so perhaps we but this into another small util function?
Review of attachment 216807 [details] [review]: ACK
(In reply to comment #9) > We should first wait for bug 678418 Oh, I thought its already in. Wish there was a patch status for this case. :(
Attachment 216806 [details] pushed as 48fbcfb - Minor cleanup Attachment 216807 [details] pushed as e84a9e9 - Fix item zooming after properties shown
Created attachment 216901 [details] [review] Add CollectionView.get_path_for_item helper
Created attachment 216902 [details] [review] Zoom to/from the right place on the icon view We use the new IconView.get_cell_area to find the right place to zoom
I pushed the cleanup and the zoom after properties fix, and attached a new zoom-position fix based on that.
Created attachment 217215 [details] [review] Require Gtk+ 3.5.5 for gtk_icon_view_get_cell_area
Created attachment 217216 [details] [review] Update to latest Gtk vapi file This is from vala master and is needed for gtk_icon_view_get_cell_rect
Created attachment 217217 [details] [review] Add CollectionView.get_path_for_item helper
Created attachment 217218 [details] [review] Zoom to/from the right place on the icon view We use the new IconView.get_cell_rect to find the right place to zoom
Review of attachment 217215 [details] [review]: ACK
Review of attachment 217216 [details] [review]: Assuming you tested this doesn't break anything, ACK
Review of attachment 217217 [details] [review]: ACK
Review of attachment 217218 [details] [review]: Looks good.
Attachment 217215 [details] pushed as 2a1743e - Require Gtk+ 3.5.5 for gtk_icon_view_get_cell_area Attachment 217216 [details] pushed as 8268810 - Update to latest Gtk vapi file Attachment 217217 [details] pushed as b70b737 - Add CollectionView.get_path_for_item helper Attachment 217218 [details] pushed as 6fdaca1 - Zoom to/from the right place on the icon view