[nautilus] list-view: increase vertical padding
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] list-view: increase vertical padding
- Date: Tue, 27 Jan 2015 17:08:55 +0000 (UTC)
commit 69b11d10342d4ed03dcfea615a644ac8a2097e96
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Tue Jan 27 17:05:51 2015 +0000
list-view: increase vertical padding
To match mockups.
src/nautilus-list-view.c | 22 +++++++++++++++++++---
1 files changed, 19 insertions(+), 3 deletions(-)
---
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
index 445b986..67be649 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -1872,17 +1872,33 @@ trash_orig_path_cell_data_func (GtkTreeViewColumn *column,
location_cell_data_func (column, renderer, model, iter, view, TRUE);
}
+#define SMALL_ZOOM_ICON_PADDING 10
+#define LARGE_ZOOM_ICON_PADDING 6
+
+static gint
+nautilus_list_view_get_icon_padding_for_zoom_level (NautilusListZoomLevel zoom_level)
+{
+ switch (zoom_level) {
+ case NAUTILUS_LIST_ZOOM_LEVEL_SMALL:
+ return SMALL_ZOOM_ICON_PADDING;
+ case NAUTILUS_LIST_ZOOM_LEVEL_STANDARD:
+ case NAUTILUS_LIST_ZOOM_LEVEL_LARGE:
+ return LARGE_ZOOM_ICON_PADDING;
+ default:
+ g_assert_not_reached ();
+ }
+}
static void
set_up_pixbuf_size (NautilusListView *view)
{
- int icon_size;
+ int icon_size, icon_padding;
/* Make all rows the same size. */
icon_size = nautilus_list_model_get_icon_size_for_zoom_level (view->details->zoom_level);
+ icon_padding = nautilus_list_view_get_icon_padding_for_zoom_level (view->details->zoom_level);
gtk_cell_renderer_set_fixed_size (GTK_CELL_RENDERER (view->details->pixbuf_cell),
- -1, icon_size);
-
+ -1, icon_size + 2 * icon_padding);
/* FIXME: https://bugzilla.gnome.org/show_bug.cgi?id=641518 */
gtk_tree_view_columns_autosize (view->details->tree_view);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]