[gthumb: 18/20] add the scrollbar spacing to the thumbnail list height



commit 49982433b705c766bd20d222ccc559609403471b
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Tue Mar 30 19:04:09 2010 +0200

    add the scrollbar spacing to the thumbnail list height

 gthumb/gth-file-list.c |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/gthumb/gth-file-list.c b/gthumb/gth-file-list.c
index 1b2d3f8..48bf6e3 100644
--- a/gthumb/gth-file-list.c
+++ b/gthumb/gth-file-list.c
@@ -99,6 +99,7 @@ struct _GthFileListPrivateData
 	GtkAdjustment   *vadj;
 	GtkWidget       *notebook;
 	GtkWidget       *view;
+	GtkWidget       *scrolledwindow;
 	GtkWidget       *message;
 	GthIconCache    *icon_cache;
 	GthFileSource   *file_source;
@@ -554,7 +555,7 @@ gth_file_list_construct (GthFileList     *file_list,
 
 	/* the file view */
 
-	scrolled = gtk_scrolled_window_new (NULL, NULL);
+	file_list->priv->scrolledwindow = scrolled = gtk_scrolled_window_new (NULL, NULL);
 	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled),
 					GTK_POLICY_NEVER,
 					GTK_POLICY_AUTOMATIC);
@@ -1209,8 +1210,17 @@ gth_file_list_set_thumb_size (GthFileList *file_list,
 		      "wrap-width", file_list->priv->thumb_size + THUMBNAIL_BORDER,
 		      NULL);
 
-	if (file_list->priv->type == GTH_FILE_LIST_TYPE_THUMBNAIL)
-		gtk_widget_set_size_request (GTK_WIDGET (file_list), -1, file_list->priv->thumb_size + (THUMBNAIL_BORDER * 2));
+	if (file_list->priv->type == GTH_FILE_LIST_TYPE_THUMBNAIL) {
+		int spacing;
+
+		gtk_widget_style_get (GTK_WIDGET (file_list->priv->scrolledwindow),
+				      "scrollbar-spacing", &spacing,
+				      NULL);
+
+		gtk_widget_set_size_request (GTK_WIDGET (file_list),
+					     -1,
+					     file_list->priv->thumb_size + (THUMBNAIL_BORDER * 2) + spacing);
+	}
 }
 
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]