[frogr] Explicitly set padding and spacing in the icon view
- From: Mario Sanchez Prada <msanchez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [frogr] Explicitly set padding and spacing in the icon view
- Date: Sun, 17 Jul 2011 20:30:54 +0000 (UTC)
commit c704ce4e6848a4f64beddfc2a89821af734a7fcf
Author: Mario Sanchez Prada <msanchez igalia com>
Date: Sun Jul 17 22:30:21 2011 +0200
Explicitly set padding and spacing in the icon view
src/frogr-global-defs.h | 7 +++++--
src/frogr-main-view.c | 5 ++++-
2 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/src/frogr-global-defs.h b/src/frogr-global-defs.h
index 0386fe9..1bdbaa6 100644
--- a/src/frogr-global-defs.h
+++ b/src/frogr-global-defs.h
@@ -33,8 +33,11 @@
* will be the size of the pixbuf that will remain in memory during
* the whole life of every FrogrPicture object.
*/
-#define IV_THUMB_WIDTH 140
-#define IV_THUMB_HEIGHT 140
+#define IV_THUMB_WIDTH 136
+#define IV_THUMB_HEIGHT 136
+
+/* Padding to be used in the icon view */
+#define IV_THUMB_PADDING 4
#if DEBUG_ENABLED
#define DEBUG(...) g_debug (__VA_ARGS__);
diff --git a/src/frogr-main-view.c b/src/frogr-main-view.c
index 9c5cf81..68aba29 100644
--- a/src/frogr-main-view.c
+++ b/src/frogr-main-view.c
@@ -1764,7 +1764,10 @@ frogr_main_view_init (FrogrMainView *self)
gtk_icon_view_set_selection_mode (GTK_ICON_VIEW (icon_view),
GTK_SELECTION_MULTIPLE);
gtk_icon_view_set_columns (GTK_ICON_VIEW (icon_view), -1);
- gtk_icon_view_set_item_width (GTK_ICON_VIEW (icon_view), IV_THUMB_WIDTH);
+ gtk_icon_view_set_item_width (GTK_ICON_VIEW (icon_view), IV_THUMB_WIDTH + IV_THUMB_PADDING);
+ gtk_icon_view_set_item_padding (GTK_ICON_VIEW (icon_view), IV_THUMB_PADDING);
+ gtk_icon_view_set_column_spacing (GTK_ICON_VIEW (icon_view), IV_THUMB_PADDING);
+ gtk_icon_view_set_row_spacing (GTK_ICON_VIEW (icon_view), IV_THUMB_PADDING);
gtk_widget_set_has_tooltip (icon_view, TRUE);
gtk_window_set_default_size (priv->window, MINIMUM_WINDOW_WIDTH, MINIMUM_WINDOW_HEIGHT);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]