Skip to content

Instantly share code, notes, and snippets.

@ongardie
Created November 25, 2013 08:04
Show Gist options
  • Save ongardie/7637957 to your computer and use it in GitHub Desktop.
Save ongardie/7637957 to your computer and use it in GitHub Desktop.
a few tweaks to evince's UI to make it more compact. changes toolbar to text-only. reduces thumbnail padding in the sidebar. drops bookmarks from the sidebar (useless for me, too wide). works with evince-gtk 3.4.0 on debian.
diff --git a/shell/ev-sidebar-thumbnails.c b/shell/ev-sidebar-thumbnails.c
index 594ebce..8365ea0 100644
--- a/shell/ev-sidebar-thumbnails.c
+++ b/shell/ev-sidebar-thumbnails.c
@@ -649,6 +649,8 @@ ev_sidebar_init_icon_view (EvSidebarThumbnails *ev_sidebar_thumbnails)
priv->icon_view = gtk_icon_view_new_with_model (GTK_TREE_MODEL (priv->list_store));
gtk_icon_view_set_markup_column (GTK_ICON_VIEW (priv->icon_view), 0);
gtk_icon_view_set_pixbuf_column (GTK_ICON_VIEW (priv->icon_view), 1);
+ gtk_icon_view_set_item_padding(GTK_ICON_VIEW (priv->icon_view), 10);
+ gtk_icon_view_set_item_width(GTK_ICON_VIEW (priv->icon_view), THUMBNAIL_WIDTH + 10*2);
g_signal_connect (priv->icon_view, "selection-changed",
G_CALLBACK (ev_sidebar_icon_selection_changed), ev_sidebar_thumbnails);
diff --git a/shell/ev-window.c b/shell/ev-window.c
index ae9a9cc..b3a3f58 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -6964,7 +6964,7 @@ get_toolbars_model (void)
g_free (toolbars_file);
g_free (toolbars_path);
- egg_toolbars_model_set_flags (toolbars_model, 0, EGG_TB_MODEL_NOT_REMOVABLE);
+ egg_toolbars_model_set_flags (toolbars_model, 0, EGG_TB_MODEL_NOT_REMOVABLE|EGG_TB_MODEL_TEXT);
return toolbars_model;
}
@@ -7392,9 +7392,9 @@ ev_window_init (EvWindow *ev_window)
"add-bookmark",
G_CALLBACK (sidebar_bookmarks_add_bookmark),
ev_window);
- gtk_widget_show (sidebar_widget);
- ev_sidebar_add_page (EV_SIDEBAR (ev_window->priv->sidebar),
- sidebar_widget);
+ //gtk_widget_show (sidebar_widget);
+ //ev_sidebar_add_page (EV_SIDEBAR (ev_window->priv->sidebar),
+ // sidebar_widget);
ev_window->priv->view_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
ev_window->priv->scrolled_window =
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment