Commit 38528f9f authored by Carlos Garcia Campos's avatar Carlos Garcia Campos

view: Fix page background rendering while loading

parent a610d498
...@@ -105,6 +105,7 @@ typedef struct { ...@@ -105,6 +105,7 @@ typedef struct {
#define DEFAULT_PIXBUF_CACHE_SIZE 52428800 /* 50MB */ #define DEFAULT_PIXBUF_CACHE_SIZE 52428800 /* 50MB */
#define EV_STYLE_CLASS_DOCUMENT_PAGE "document-page" #define EV_STYLE_CLASS_DOCUMENT_PAGE "document-page"
#define EV_STYLE_CLASS_INVERTED "inverted"
/*** Scrolling ***/ /*** Scrolling ***/
static void view_update_range_and_current_page (EvView *view); static void view_update_range_and_current_page (EvView *view);
...@@ -4380,10 +4381,13 @@ draw_one_page (EvView *view, ...@@ -4380,10 +4381,13 @@ draw_one_page (EvView *view,
gtk_style_context_save (context); gtk_style_context_save (context);
gtk_style_context_add_class (context, EV_STYLE_CLASS_DOCUMENT_PAGE); 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) if (view->continuous && page == current_page)
gtk_style_context_set_state (context, GTK_STATE_FLAG_ACTIVE); 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_render_frame (context, cr, page_area->x, page_area->y, page_area->width, page_area->height);
gtk_style_context_restore (context); gtk_style_context_restore (context);
......
...@@ -18,6 +18,7 @@ EvView:selected { ...@@ -18,6 +18,7 @@ EvView:selected {
} }
EvView.document-page { EvView.document-page {
background-color: white;
border-color: black; border-color: black;
border-style: solid; border-style: solid;
border-width: 1px; border-width: 1px;
...@@ -27,6 +28,7 @@ EvView.document-page { ...@@ -27,6 +28,7 @@ EvView.document-page {
} }
EvView.document-page:active { EvView.document-page:active {
background-color: white;
border-color: @theme_selected_bg_color; border-color: @theme_selected_bg_color;
border-style: solid; border-style: solid;
border-width: 1px; border-width: 1px;
...@@ -34,3 +36,7 @@ EvView.document-page:active { ...@@ -34,3 +36,7 @@ EvView.document-page:active {
border-image: none; border-image: none;
padding: 0; padding: 0;
} }
EvView.document-page.inverted {
background-color: black;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment