diff options
author | Carlos Garcia Campos <[email protected]> | 2012-12-23 11:28:46 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2018-04-07 10:07:45 +0200 |
commit | 027a6581125c209d5f495877657af9e0fcb99678 (patch) | |
tree | 6d40e425426130ebea09657efba1e473e4fd175b | |
parent | df069ae28496c75f14aba837cbb3e2e9556250db (diff) | |
download | atril-027a6581125c209d5f495877657af9e0fcb99678.tar.bz2 atril-027a6581125c209d5f495877657af9e0fcb99678.tar.xz |
view: Fix page background rendering while loading
origin commit:
https://git.gnome.org/browse/evince/commit/?h=gnome-3-8&id=38528f9
-rw-r--r-- | libview/ev-view.c | 4 | ||||
-rw-r--r-- | shell/atril.css | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/libview/ev-view.c b/libview/ev-view.c index 755d4832..a7748b70 100644 --- a/libview/ev-view.c +++ b/libview/ev-view.c @@ -105,6 +105,7 @@ 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); @@ -5801,10 +5802,13 @@ draw_one_page (EvView *view, 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); diff --git a/shell/atril.css b/shell/atril.css index dd9f4c92..aa8fd65e 100644 --- a/shell/atril.css +++ b/shell/atril.css @@ -10,6 +10,7 @@ } evview.document-page { + background-color: white; border-color: black; border-style: solid; border-width: 1px; @@ -19,6 +20,7 @@ evview.document-page { } evview.document-page:active { + background-color: white; border-color: @theme_selected_bg_color; border-style: solid; border-width: 1px; @@ -27,6 +29,10 @@ evview.document-page:active { padding: 0; } +evview.document-page.inverted { + background-color: black; +} + evpresentationview { background-color: black; } |