Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/libdocument
diff options
context:
space:
mode:
authorJuanjo MarĂ­n <juanj.marin@juntadeandalucia.es>2010-05-04 09:10:12 (GMT)
committer Carlos Garcia Campos <carlosgc@gnome.org>2010-05-04 09:10:12 (GMT)
commit5f13b35d7289f486f4022094f8574608d11c9d73 (patch)
treeb6a3bb4f71658945caebedea64369ec3c0c4d1e6 /libdocument
parent5a3fc72a0268f18a72702149eec1fb5dc2882f0f (diff)
Invert colors of pages when loading in inverted color mode
Fixes bug #616110.
Diffstat (limited to 'libdocument')
-rw-r--r--libdocument/ev-document-misc.c5
-rw-r--r--libdocument/ev-document-misc.h3
2 files changed, 5 insertions, 3 deletions
diff --git a/libdocument/ev-document-misc.c b/libdocument/ev-document-misc.c
index 7f2f731..4d8bc28 100644
--- a/libdocument/ev-document-misc.c
+++ b/libdocument/ev-document-misc.c
@@ -118,7 +118,8 @@ ev_document_misc_paint_one_page (GdkDrawable *drawable,
GtkWidget *widget,
GdkRectangle *area,
GtkBorder *border,
- gboolean highlight)
+ gboolean highlight,
+ gboolean inverted_colors)
{
GtkStyle *style = gtk_widget_get_style (widget);
GtkStateType state = gtk_widget_get_state (widget);
@@ -131,7 +132,7 @@ ev_document_misc_paint_one_page (GdkDrawable *drawable,
area->width,
area->height);
gdk_draw_rectangle (drawable,
- style->white_gc,
+ inverted_colors ? style->black_gc : style->white_gc,
TRUE,
area->x + border->left,
area->y + border->top,
diff --git a/libdocument/ev-document-misc.h b/libdocument/ev-document-misc.h
index e392076..2503aa7 100644
--- a/libdocument/ev-document-misc.h
+++ b/libdocument/ev-document-misc.h
@@ -43,7 +43,8 @@ void ev_document_misc_paint_one_page (GdkDrawable *drawable,
GtkWidget *widget,
GdkRectangle *area,
GtkBorder *border,
- gboolean highlight);
+ gboolean highlight,
+ gboolean inverted_colors);
cairo_surface_t *ev_document_misc_surface_from_pixbuf (GdkPixbuf *pixbuf);
GdkPixbuf *ev_document_misc_pixbuf_from_surface (cairo_surface_t *surface);