[gnome-photos/gnome-3-12] view-container: Prevent the icons from shifting around
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/gnome-3-12] view-container: Prevent the icons from shifting around
- Date: Sat, 15 Mar 2014 21:31:59 +0000 (UTC)
commit 2ea929818075aec9a7bf1e2c5b936826fbd2633d
Author: Debarshi Ray <debarshir gnome org>
Date: Thu Mar 13 20:14:18 2014 +0100
view-container: Prevent the icons from shifting around
The album and photo icons are not exactly of the same size because we
do not frame the albums. This causes the icons to shift horizontally
when moving from a view with only albums to one that has both albums
and photos. So lets set an item width on the GtkIconView to avoid this.
Fixes: https://bugzilla.gnome.org/698941
src/photos-view-container.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-view-container.c b/src/photos-view-container.c
index e794d19..058fef8 100644
--- a/src/photos-view-container.c
+++ b/src/photos-view-container.c
@@ -283,8 +283,10 @@ photos_view_container_constructed (GObject *object)
PhotosViewContainerPrivate *priv = self->priv;
GAction *action;
GApplication *app;
+ GtkWidget *generic_view;
GtkWidget *grid;
gboolean status;
+ gint size;
G_OBJECT_CLASS (photos_view_container_parent_class)->constructed (object);
@@ -301,6 +303,9 @@ photos_view_container_constructed (GObject *object)
gtk_stack_add_named (GTK_STACK (self), priv->error_box, "error");
priv->view = gd_main_view_new (GD_MAIN_VIEW_ICON);
+ generic_view = gd_main_view_get_generic_view (priv->view);
+ size = photos_utils_get_icon_size ();
+ gtk_icon_view_set_item_width (GTK_ICON_VIEW (generic_view), size + 24);
gtk_container_add (GTK_CONTAINER (grid), GTK_WIDGET (priv->view));
priv->load_more = photos_load_more_button_new (priv->mode);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]