[bijiben] main-view: Improve list view



commit 6da6c4ec62823c5ba59051a2c69b28c34d799c15
Author: Isaque Galdino <igaldino gmail com>
Date:   Mon Feb 5 18:36:22 2018 -0200

    main-view: Improve list view
    
    This patch removes the type column from list view, reducing visual
    noise, as that information is also communicated by the icon.
    
    It also adds border to notebooks, improving contrast to the shown
    icons.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=748714

 data/resources/Adwaita.css  |    1 +
 src/bjb-main-view.c         |   44 -------------------------------------------
 src/libbiji/biji-notebook.c |    2 +-
 3 files changed, 2 insertions(+), 45 deletions(-)
---
diff --git a/data/resources/Adwaita.css b/data/resources/Adwaita.css
index b7475af..279cdba 100644
--- a/data/resources/Adwaita.css
+++ b/data/resources/Adwaita.css
@@ -1,4 +1,5 @@
 .biji-notebook-icon {
+    border: 1px solid rgba(0, 0, 0, 0.4);
     background-color: #d3d7cf;
     border-radius: 8px;
 }
diff --git a/src/bjb-main-view.c b/src/bjb-main-view.c
index 17fe6c7..a5a3a8e 100644
--- a/src/bjb-main-view.c
+++ b/src/bjb-main-view.c
@@ -472,38 +472,6 @@ _get_item_for_tree_path (GtkTreeModel *tree_model,
   return retval;
 }
 
-
-
-static void
-render_type     (GtkTreeViewColumn *tree_column,
-                 GtkCellRenderer *cell,
-                 GtkTreeModel *tree_model,
-                 GtkTreeIter *iter,
-                 gpointer data)
-{
-  BijiItem *item;
-  const gchar *str;
-  BjbMainView *self;
-
-  self = data;
-  str = NULL;
-  item = _get_item_for_tree_path (tree_model, iter, self);
-
-  if (item != NULL)
-  {
-    if (BIJI_IS_NOTEBOOK (item))
-      str= _("Notebook");
-
-    else if (BIJI_IS_NOTE_OBJ (item))
-      str = _("Note");
-  }
-
-  if (str != NULL)
-    g_object_set (cell, "text", str, NULL);
-}
-
-
-
 static void
 render_where    (GtkTreeViewColumn *tree_column,
                  GtkCellRenderer *cell,
@@ -557,18 +525,6 @@ add_list_renderers (BjbMainView *self)
 
   generic =  gd_main_view_get_generic_view (self->view);
 
-  /* Type Renderer */
-  cell = gd_styled_text_renderer_new ();
-  gd_styled_text_renderer_add_class (GD_STYLED_TEXT_RENDERER (cell), "dim-label");
-  gtk_cell_renderer_set_padding (cell, 16, 0);
-
-  gd_main_list_view_add_renderer (GD_MAIN_LIST_VIEW (generic),
-                                  cell,
-                                  render_type,
-                                  self,
-                                  __destroy_n_notify__);
-
-
   /* Where Renderer */
   cell = gd_styled_text_renderer_new ();
   gd_styled_text_renderer_add_class (GD_STYLED_TEXT_RENDERER (cell), "dim-label");
diff --git a/src/libbiji/biji-notebook.c b/src/libbiji/biji-notebook.c
index 789d6fe..f749b2e 100644
--- a/src/libbiji/biji-notebook.c
+++ b/src/libbiji/biji-notebook.c
@@ -138,8 +138,8 @@ biji_create_notebook_icon (gint base_size, gint scale, GList *surfaces)
   cairo_surface_set_device_scale (surface, scale, scale);
   cr = cairo_create (surface);
 
-  gtk_render_frame (context, cr, 0, 0, base_size, base_size);
   gtk_render_background (context, cr, 0, 0, base_size, base_size);
+  gtk_render_frame (context, cr, 0, 0, base_size, base_size);
 
   l = surfaces;
   idx = 0;


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