diff --git a/data/thumbnail-frame.png b/data/thumbnail-frame.png new file mode 100644 index 00000000..ba5d7212 Binary files /dev/null and b/data/thumbnail-frame.png differ diff --git a/help/reference/libdocument/libxreaderdocument-docs.xml b/help/reference/libdocument/libxreaderdocument-docs.xml index 7b1cdf72..350d9beb 100644 --- a/help/reference/libdocument/libxreaderdocument-docs.xml +++ b/help/reference/libdocument/libxreaderdocument-docs.xml @@ -88,7 +88,6 @@ - diff --git a/libdocument/ev-document-misc.c b/libdocument/ev-document-misc.c index 53429d38..bb38d441 100644 --- a/libdocument/ev-document-misc.c +++ b/libdocument/ev-document-misc.c @@ -27,10 +27,10 @@ #include "ev-document-misc.h" -/* Returns a new GdkPixbuf that is suitable for placing in the thumbnail view. - * It is four pixels wider and taller than the source. If source_pixbuf is not - * NULL, then it will fill the return pixbuf with the contents of - * source_pixbuf. +/** + * Returns a new GdkPixbuf that is suitable for placing in the thumbnail view. + * If source_pixbuf is not NULL, then it will fill the return pixbuf with the + * contents of source_pixbuf. */ static GdkPixbuf * create_thumbnail_frame (int width, @@ -39,57 +39,31 @@ create_thumbnail_frame (int width, gboolean fill_bg) { GdkPixbuf *retval; - guchar *data; - gint rowstride; int i; int width_r, height_r; if (source_pixbuf) g_return_val_if_fail (GDK_IS_PIXBUF (source_pixbuf), NULL); - if (source_pixbuf) { - width_r = gdk_pixbuf_get_width (source_pixbuf); - height_r = gdk_pixbuf_get_height (source_pixbuf); - } else { - width_r = width; - height_r = height; - } + width_r = gdk_pixbuf_get_width (source_pixbuf); + height_r = gdk_pixbuf_get_height (source_pixbuf); /* make sure no one is passing us garbage */ g_return_val_if_fail (width_r >= 0 && height_r >= 0, NULL); retval = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, - width_r + 4, - height_r + 4); - - /* make it black and fill in the middle */ - data = gdk_pixbuf_get_pixels (retval); - rowstride = gdk_pixbuf_get_rowstride (retval); + width_r, + height_r); gdk_pixbuf_fill (retval, 0x000000ff); - if (fill_bg) { - for (i = 1; i < height_r + 1; i++) - memset (data + (rowstride * i) + 4, 0xffffffff, width_r * 4); - } /* copy the source pixbuf */ - if (source_pixbuf) - gdk_pixbuf_copy_area (source_pixbuf, 0, 0, - width_r, - height_r, - retval, - 1, 1); - /* Add the corner */ - data [(width_r + 2) * 4 + 3] = 0; - data [(width_r + 3) * 4 + 3] = 0; - data [(width_r + 2) * 4 + (rowstride * 1) + 3] = 0; - data [(width_r + 3) * 4 + (rowstride * 1) + 3] = 0; - - data [(height_r + 2) * rowstride + 3] = 0; - data [(height_r + 3) * rowstride + 3] = 0; - data [(height_r + 2) * rowstride + 4 + 3] = 0; - data [(height_r + 3) * rowstride + 4 + 3] = 0; + gdk_pixbuf_copy_area (source_pixbuf, 0, 0, + width_r, + height_r, + retval, + 0, 0); return retval; } @@ -110,6 +84,78 @@ ev_document_misc_get_loading_thumbnail (int width, return create_thumbnail_frame (width, height, NULL, !inverted_colors); } +static GdkPixbuf * +ev_document_misc_render_thumbnail_frame (GtkWidget *widget, + int width, + int height, + gboolean inverted_colors, + GdkPixbuf *source_pixbuf) +{ + GtkStyleContext *context = gtk_widget_get_style_context (widget); + GtkStateFlags state = gtk_widget_get_state_flags (widget); + int width_r, height_r; + int width_f, height_f; + cairo_surface_t *surface; + cairo_t *cr; + GtkBorder border = {0, }; + GdkPixbuf *retval; + + if (source_pixbuf) { + g_return_val_if_fail (GDK_IS_PIXBUF (source_pixbuf), NULL); + + width_r = gdk_pixbuf_get_width (source_pixbuf); + height_r = gdk_pixbuf_get_height (source_pixbuf); + } else { + width_r = width; + height_r = height; + } + + gtk_style_context_save (context); + + gtk_style_context_add_class (context, "page-thumbnail"); + if (inverted_colors) + gtk_style_context_add_class (context, "inverted"); + + gtk_style_context_get_border (context, state, &border); + width_f = width_r + border.left + border.right; + height_f = height_r + border.top + border.bottom; + + surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, + width_f, height_f); + cr = cairo_create (surface); + if (source_pixbuf) { + gdk_cairo_set_source_pixbuf (cr, source_pixbuf, border.left, border.top); + cairo_paint (cr); + } else { + gtk_render_background (context, cr, 0, 0, width_f, height_f); + } + gtk_render_frame (context, cr, 0, 0, width_f, height_f); + cairo_destroy (cr); + + gtk_style_context_restore (context); + + retval = gdk_pixbuf_get_from_surface (surface, 0, 0, width_f, height_f); + cairo_surface_destroy (surface); + + return retval; +} + +GdkPixbuf * +ev_document_misc_render_loading_thumbnail (GtkWidget *widget, + int width, + int height, + gboolean inverted_colors) +{ + return ev_document_misc_render_thumbnail_frame (widget, width, height, inverted_colors, NULL); +} + +GdkPixbuf * +ev_document_misc_render_thumbnail_with_frame (GtkWidget *widget, + GdkPixbuf *source_pixbuf) +{ + return ev_document_misc_render_thumbnail_frame (widget, -1, -1, FALSE, source_pixbuf); +} + void ev_document_misc_get_page_border_size (gint page_width, gint page_height, diff --git a/libdocument/ev-document-misc.h b/libdocument/ev-document-misc.h index 44f4954e..8efd55c0 100644 --- a/libdocument/ev-document-misc.h +++ b/libdocument/ev-document-misc.h @@ -30,15 +30,27 @@ #include #include +#include "ev-macros.h" G_BEGIN_DECLS +EV_DEPRECATED GdkPixbuf *ev_document_misc_get_thumbnail_frame (int width, int height, GdkPixbuf *source_pixbuf); +EV_DEPRECATED GdkPixbuf *ev_document_misc_get_loading_thumbnail (int width, int height, gboolean inverted_colors); + +GdkPixbuf *ev_document_misc_render_loading_thumbnail (GtkWidget *widget, + int width, + int height, + gboolean inverted_colors); +GdkPixbuf *ev_document_misc_render_thumbnail_with_frame (GtkWidget *widget, + GdkPixbuf *source_pixbuf); + +EV_DEPRECATED void ev_document_misc_get_page_border_size (gint page_width, gint page_height, GtkBorder *border); diff --git a/libview/ev-view.c b/libview/ev-view.c index 129aa064..50b07068 100644 --- a/libview/ev-view.c +++ b/libview/ev-view.c @@ -1,5 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; c-indent-level: 8 -*- */ -/* this file is part of xreader, a mate document viewer +/* this file is part of xreader, a generic document viewer * * Copyright (C) 2004 Red Hat, Inc * @@ -101,6 +101,9 @@ typedef struct { #define SCROLL_TIME 150 +#define EV_STYLE_CLASS_DOCUMENT_PAGE "document-page" +#define EV_STYLE_CLASS_INVERTED "inverted" + /*** Scrolling ***/ static void view_update_range_and_current_page (EvView *view); static void add_scroll_binding_keypad (GtkBindingSet *binding_set, @@ -113,8 +116,6 @@ static void ensure_rectangle_is_visible (EvView /*** Geometry computations ***/ static void compute_border (EvView *view, - int width, - int height, GtkBorder *border); static void get_page_y_offset (EvView *view, int page, @@ -1035,9 +1036,16 @@ ensure_rectangle_is_visible (EvView *view, GdkRectangle *rect) /*** Geometry computations ***/ static void -compute_border (EvView *view, int width, int height, GtkBorder *border) +compute_border (EvView *view, GtkBorder *border) { - ev_document_misc_get_page_border_size (width, height, border); + GtkWidget *widget = GTK_WIDGET (view); + GtkStyleContext *context = gtk_widget_get_style_context (widget); + GtkStateFlags state = gtk_widget_get_state_flags (widget); + + gtk_style_context_save (context); + gtk_style_context_add_class (context, EV_STYLE_CLASS_DOCUMENT_PAGE); + gtk_style_context_get_border (context, state, border); + gtk_style_context_restore (context); } void @@ -1098,13 +1106,12 @@ ev_view_get_max_page_size (EvView *view, static void get_page_y_offset (EvView *view, int page, int *y_offset) { - int max_width, offset = 0; + int offset = 0; GtkBorder border; g_return_if_fail (y_offset != NULL); - ev_view_get_max_page_size (view, &max_width, NULL); - compute_border (view, max_width, max_width, &border); + compute_border (view, &border); if (view->dual_page) { ev_view_get_height_to_page (view, page, NULL, &offset); @@ -1134,7 +1141,7 @@ ev_view_get_page_extents (EvView *view, /* Get the size of the page */ ev_view_get_page_size (view, page, &width, &height); - compute_border (view, width, height, border); + compute_border (view, border); page_area->width = width + border->left + border->right; page_area->height = height + border->top + border->bottom; @@ -1180,7 +1187,7 @@ ev_view_get_page_extents (EvView *view, if (height_2 > height) max_height = height_2; } - compute_border (view, max_width, max_height, &overall_border); + compute_border (view, &overall_border); /* Find the offsets */ x = view->spacing; @@ -3186,7 +3193,7 @@ ev_view_size_request_continuous_dual_page (EvView *view, GtkBorder border; ev_view_get_max_page_size (view, &max_width, NULL); - compute_border (view, max_width, max_width, &border); + compute_border (view, &border); requisition->width = (max_width + border.left + border.right) * 2 + (view->spacing * 3); } break; @@ -3215,7 +3222,7 @@ ev_view_size_request_continuous (EvView *view, GtkBorder border; ev_view_get_max_page_size (view, &max_width, NULL); - compute_border (view, max_width, max_width, &border); + compute_border (view, &border); requisition->width = max_width + (view->spacing * 2) + border.left + border.right; } break; @@ -3252,7 +3259,7 @@ ev_view_size_request_dual_page (EvView *view, height = height_2; } } - compute_border (view, width, height, &border); + compute_border (view, &border); requisition->width = view->sizing_mode == EV_SIZING_FIT_WIDTH ? 1 : ((width + border.left + border.right) * 2) + (view->spacing * 3); @@ -3274,7 +3281,7 @@ ev_view_size_request_single_page (EvView *view, } ev_view_get_page_size (view, view->current_page, &width, &height); - compute_border (view, width, height, &border); + compute_border (view, &border); requisition->width = view->sizing_mode == EV_SIZING_FIT_WIDTH ? 1 : width + border.left + border.right + (2 * view->spacing); @@ -4589,10 +4596,10 @@ draw_one_page (EvView *view, GdkRectangle *expose_area, gboolean *page_ready) { - GdkRectangle overlap; - GdkRectangle real_page_area; - gint current_page; - gboolean inverted_colors; + GtkStyleContext *context; + GdkRectangle overlap; + GdkRectangle real_page_area; + gint current_page; g_assert (view->document); @@ -4608,13 +4615,20 @@ draw_one_page (EvView *view, real_page_area.height -= (border->top + border->bottom); *page_ready = TRUE; + context = gtk_widget_get_style_context (GTK_WIDGET (view)); current_page = ev_document_model_get_page (view->model); - inverted_colors = ev_document_model_get_inverted_colors (view->model); - ev_document_misc_paint_one_page (cr, - GTK_WIDGET (view), - page_area, border, - page == current_page, - inverted_colors); + + gtk_style_context_save (context); + gtk_style_context_add_class (context, EV_STYLE_CLASS_DOCUMENT_PAGE); + if (ev_document_model_get_inverted_colors (view->model)) + gtk_style_context_add_class (context, EV_STYLE_CLASS_INVERTED); + + if (view->continuous && page == current_page) + gtk_style_context_set_state (context, GTK_STATE_FLAG_ACTIVE); + + gtk_render_background (context, cr, page_area->x, page_area->y, page_area->width, page_area->height); + gtk_render_frame (context, cr, page_area->x, page_area->y, page_area->width, page_area->height); + gtk_style_context_restore (context); if (gdk_rectangle_intersect (&real_page_area, expose_area, &overlap)) { gint width, height; @@ -6003,7 +6017,7 @@ ev_view_zoom_for_size_continuous_and_dual_page (EvView *view, doc_height = tmp; } - compute_border (view, doc_width, doc_height, &border); + compute_border (view, &border); doc_width *= 2; width -= (2 * (border.left + border.right) + 3 * view->spacing); @@ -6040,7 +6054,7 @@ ev_view_zoom_for_size_continuous (EvView *view, doc_height = tmp; } - compute_border (view, doc_width, doc_height, &border); + compute_border (view, &border); width -= (border.left + border.right + 2 * view->spacing); height -= (border.top + border.bottom + 2 * view->spacing - 1); @@ -6080,7 +6094,7 @@ ev_view_zoom_for_size_dual_page (EvView *view, if (height_2 > doc_height) doc_height = height_2; } - compute_border (view, width, height, &border); + compute_border (view, &border); doc_width = doc_width * 2; width -= ((border.left + border.right)* 2 + 3 * view->spacing); @@ -6111,7 +6125,7 @@ ev_view_zoom_for_size_single_page (EvView *view, get_doc_page_size (view, view->current_page, &doc_width, &doc_height); /* Get an approximate border */ - compute_border (view, width, height, &border); + compute_border (view, &border); width -= (border.left + border.right + 2 * view->spacing); height -= (border.top + border.bottom + 2 * view->spacing); diff --git a/previewer/Makefile.am b/previewer/Makefile.am index de8ac0f0..c761f297 100644 --- a/previewer/Makefile.am +++ b/previewer/Makefile.am @@ -35,16 +35,16 @@ xreader_previewer_LDADD = \ $(top_builddir)/libmisc/libevmisc.la \ $(PREVIEWER_LIBS) \ $(WEBKIT_LIBS) - -ev-previewer-resources.c: previewer.gresource.xml Makefile $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies --sourcedir $(srcdir) $(srcdir)/previewer.gresource.xml) - $(AM_V_GEN) XMLLINT=$(XMLLINT) $(GLIB_COMPILE_RESOURCES) --target $@ --sourcedir $(srcdir) --generate-source --c-name ev_previewer $< + +ev-previewer-resources.c: previewer.gresource.xml Makefile $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies --sourcedir=$(srcdir) --sourcedir=$(top_builddir)/data $(srcdir)/previewer.gresource.xml) + $(AM_V_GEN) XMLLINT=$(XMLLINT) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --sourcedir=$(top_builddir)/data --generate-source --c-name ev_previewer $< EXTRA_DIST = \ $(man_MANS) \ previewer.gresource.xml \ previewer-ui.xml \ $(NULL) - + CLEANFILES = \ ev-previewer-resources.c \ $(NULL) diff --git a/previewer/ev-previewer-window.c b/previewer/ev-previewer-window.c index 183476f6..caa07c36 100644 --- a/previewer/ev-previewer-window.c +++ b/previewer/ev-previewer-window.c @@ -513,6 +513,27 @@ ev_previewer_window_set_property (GObject *object, } } +static gboolean +_gtk_css_provider_load_from_resource (GtkCssProvider *provider, + const char *resource_path, + GError **error) +{ + GBytes *data; + gboolean retval; + + data = g_resources_lookup_data (resource_path, 0, error); + if (!data) + return FALSE; + + retval = gtk_css_provider_load_from_data (provider, + g_bytes_get_data (data, NULL), + g_bytes_get_size (data), + error); + g_bytes_unref (data); + + return retval; +} + static GObject * ev_previewer_window_constructor (GType type, guint n_construct_properties, @@ -525,13 +546,14 @@ ev_previewer_window_constructor (GType type, GtkAction *action; GError *error = NULL; gdouble dpi; + GtkCssProvider *css_provider; object = G_OBJECT_CLASS (ev_previewer_window_parent_class)->constructor (type, n_construct_properties, construct_params); window = EV_PREVIEWER_WINDOW (object); - gtk_widget_hide(GTK_WIDGET (window)); - gtk_widget_realize (GTK_WIDGET (window)); + gtk_widget_hide(GTK_WIDGET (window)); + gtk_widget_realize (GTK_WIDGET (window)); dpi = get_screen_dpi (window); ev_document_model_set_min_scale (window->model, MIN_SCALE * dpi / 72.0); @@ -571,6 +593,16 @@ ev_previewer_window_constructor (GType type, window); gtk_action_group_set_sensitive (window->accels_group, FALSE); + css_provider = gtk_css_provider_new (); + _gtk_css_provider_load_from_resource (css_provider, + "/org/x/reader/previewer/ui/xreader-previewer.css", + &error); + g_assert_no_error (error); + gtk_style_context_add_provider_for_screen (gtk_widget_get_screen (GTK_WIDGET (window)), + GTK_STYLE_PROVIDER (css_provider), + GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); + g_object_unref (css_provider); + window->ui_manager = gtk_ui_manager_new (); gtk_ui_manager_insert_action_group (window->ui_manager, window->action_group, 0); diff --git a/previewer/previewer.gresource.xml b/previewer/previewer.gresource.xml index 5dd42b8a..6c530763 100644 --- a/previewer/previewer.gresource.xml +++ b/previewer/previewer.gresource.xml @@ -18,5 +18,7 @@ previewer-ui.xml + xreader-previewer.css + thumbnail-frame.png diff --git a/previewer/xreader-previewer.css b/previewer/xreader-previewer.css new file mode 100644 index 00000000..9036d5b7 --- /dev/null +++ b/previewer/xreader-previewer.css @@ -0,0 +1,14 @@ +evview { + background-color: @theme_bg_color; +} + +evview.document-page { + background-color: @theme_bg_color; + border-style: solid; + border-width: 3px 3px 6px 4px; + border-image: url("resource:///org/x/reader/previewer/ui/thumbnail-frame.png") 3 3 6 4; +} + +evview.document-page.inverted { + background-color: black; +} diff --git a/shell/Makefile.am b/shell/Makefile.am index 3bef4bf2..a34342e1 100644 --- a/shell/Makefile.am +++ b/shell/Makefile.am @@ -173,8 +173,8 @@ ev-marshal.c: $(srcdir)/ev-marshal.list echo '#include "ev-marshal.h"' > ev-marshal.c $(AM_V_GEN)$(GLIB_GENMARSHAL) --prefix=ev_marshal $(srcdir)/ev-marshal.list --body >> ev-marshal.c -ev-resources.c: xreader.gresource.xml Makefile $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies --sourcedir $(srcdir) $(srcdir)/xreader.gresource.xml) - $(AM_V_GEN) XMLLINT=$(XMLLINT) $(GLIB_COMPILE_RESOURCES) --target $@ --sourcedir $(srcdir) --generate-source --c-name ev $< +ev-resources.c: xreader.gresource.xml Makefile $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies --sourcedir=$(srcdir) --sourcedir=$(top_builddir)/data $(srcdir)/xreader.gresource.xml) + $(AM_V_GEN) XMLLINT=$(XMLLINT) $(GLIB_COMPILE_RESOURCES) --target $@ --sourcedir=$(srcdir) --sourcedir=$(top_builddir)/data --generate-source --c-name ev $< ev-gdbus-generated.c ev-gdbus-generated.h: ev-gdbus.xml Makefile $(AM_V_GEN) $(GDBUS_CODEGEN) \ diff --git a/shell/ev-recent-view.c b/shell/ev-recent-view.c index 64598dc4..b656e3f7 100644 --- a/shell/ev-recent-view.c +++ b/shell/ev-recent-view.c @@ -103,7 +103,8 @@ thumbnail_job_completed_callback (EvJobThumbnail *job, GtkButton *button) { if (!ev_job_is_failed (EV_JOB (job))) { - gtk_button_set_image (button, gtk_image_new_from_pixbuf(job->thumbnail)); + GdkPixbuf *pixbuf = ev_document_misc_render_thumbnail_with_frame(button, job->thumbnail); + gtk_button_set_image (button, gtk_image_new_from_pixbuf(pixbuf)); } } diff --git a/shell/ev-sidebar-thumbnails.c b/shell/ev-sidebar-thumbnails.c index 41d54a71..b6f658e8 100644 --- a/shell/ev-sidebar-thumbnails.c +++ b/shell/ev-sidebar-thumbnails.c @@ -27,6 +27,7 @@ #endif #include +#include #include #include @@ -438,6 +439,10 @@ ev_sidebar_thumbnails_class_init (EvSidebarThumbnailsClass *ev_sidebar_thumbnail widget_class->map = ev_sidebar_thumbnails_map; +#if GTK_CHECK_VERSION(3, 20, 0) + gtk_widget_class_set_css_name (widget_class, "evsidebarthumbnails"); +#endif + g_object_class_override_property (g_object_class, PROP_WIDGET, "main-widget"); @@ -480,7 +485,8 @@ ev_sidebar_thumbnails_get_loading_icon (EvSidebarThumbnails *sidebar_thumbnails, gboolean inverted_colors; inverted_colors = ev_document_model_get_inverted_colors (priv->model); - icon = ev_document_misc_get_loading_thumbnail (width, height, inverted_colors); + icon = ev_document_misc_render_loading_thumbnail (GTK_WIDGET (sidebar_thumbnails), + width, height, inverted_colors); g_hash_table_insert (priv->loading_icons, key, icon); } else { g_free (key); @@ -706,7 +712,7 @@ ev_sidebar_thumbnails_fill_model (EvSidebarThumbnails *sidebar_thumbnails) sidebar_thumbnails->priv->rotation, &width, &height); - height = (gint) (height*priv->thumbnail_width/width); + height = (gint) ceil((double)(height) * priv->thumbnail_width / width); width = priv->thumbnail_width; if (!loading_icon || (width != prev_width && height != prev_height)) { @@ -904,9 +910,6 @@ ev_sidebar_thumbnails_init (EvSidebarThumbnails *ev_sidebar_thumbnails) priv->thumbnail_width = THUMBNAIL_DEFAULT_WIDTH; - /* We actually don't want GTK_POLICY_AUTOMATIC for horizontal scrollbar here - * it's just a workaround for bug #449462 (GTK2 only) - */ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (priv->swindow), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (priv->swindow), @@ -1075,19 +1078,23 @@ thumbnail_job_completed_callback (EvJobThumbnail *job, EvSidebarThumbnails *sidebar_thumbnails) { EvSidebarThumbnailsPrivate *priv = sidebar_thumbnails->priv; - GtkTreeIter *iter; + GtkTreeIter *iter; + GdkPixbuf *pixbuf; + + pixbuf = ev_document_misc_render_thumbnail_with_frame (GTK_WIDGET (sidebar_thumbnails), job->thumbnail); iter = (GtkTreeIter *) g_object_get_data (G_OBJECT (job), "tree_iter"); if (priv->inverted_colors && priv->document->iswebdocument == FALSE) - ev_document_misc_invert_pixbuf (job->thumbnail); + ev_document_misc_invert_pixbuf (pixbuf); gtk_list_store_set (priv->list_store, iter, - COLUMN_PIXBUF, job->thumbnail, + COLUMN_PIXBUF, pixbuf, COLUMN_THUMBNAIL_SET, TRUE, COLUMN_JOB, NULL, -1); gtk_widget_queue_draw (priv->icon_view); + g_object_unref (pixbuf); } static void diff --git a/shell/xreader.css b/shell/xreader.css index 56f3d671..a5c41a32 100644 --- a/shell/xreader.css +++ b/shell/xreader.css @@ -1,9 +1,24 @@ -EvView { +evview { background-color: @theme_bg_color; } -EvWindow .content-view .view { - background-color: @theme_selected_bg_color; - color: @theme_selected_fg_color; +evsidebarthumbnails.page-thumbnail { + background-color: @theme_bg_color; + border: 1px solid black; +} + +evsidebarthumbnails.page-thumbnail.inverted { + background-color: black; + border: 1px solid white; } +evview.document-page { + background-color: @theme_bg_color; + border-style: solid; + border-width: 3px 3px 6px 4px; + border-image: url("resource:///org/x/reader/shell/ui/thumbnail-frame.png") 3 3 6 4; +} + +evview.document-page.inverted { + background-color: black; +} diff --git a/shell/xreader.gresource.xml b/shell/xreader.gresource.xml index 87efc788..c68b65e2 100644 --- a/shell/xreader.gresource.xml +++ b/shell/xreader.gresource.xml @@ -20,5 +20,6 @@ xreader-ui.xml xreader.css ev-preferences-dialog.ui + thumbnail-frame.png