[evince] ev-view: Fix the Eview background color and page borders and shadow
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] ev-view: Fix the Eview background color and page borders and shadow
- Date: Sat, 6 Oct 2012 09:52:50 +0000 (UTC)
commit dbc67b85fa737fa9a66c4bc7b4c30e82be9c8543
Author: Carlos Garcia Campos <carlosgc gnome org>
Date: Sat Oct 6 11:43:15 2012 +0200
ev-view: Fix the Eview background color and page borders and shadow
Latest changes in Adwaita broke it, so define the EvView background
color in our css to use the theme background color instead of the theme
base color.
libdocument/ev-document-misc.c | 9 +--------
shell/evince.css | 4 ++++
2 files changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/libdocument/ev-document-misc.c b/libdocument/ev-document-misc.c
index e7523af..131d5ef 100644
--- a/libdocument/ev-document-misc.c
+++ b/libdocument/ev-document-misc.c
@@ -143,17 +143,10 @@ ev_document_misc_paint_one_page (cairo_t *cr,
GtkStyleContext *context = gtk_widget_get_style_context (widget);
GtkStateFlags state = gtk_widget_get_state_flags (widget);
GdkRGBA fg, bg, shade_bg;
- GtkSymbolicColor *c1, *c2;
gtk_style_context_get_background_color (context, state, &bg);
gtk_style_context_get_color (context, state, &fg);
-
- // FIXME: should we cache the shade_bg?
- c1 = gtk_symbolic_color_new_literal (&bg);
- c2 = gtk_symbolic_color_new_shade (c1, 0.7);
- gtk_symbolic_color_resolve (c2, NULL, &shade_bg);
- gtk_symbolic_color_unref (c1);
- gtk_symbolic_color_unref (c2);
+ gtk_style_context_get_color (context, GTK_STATE_FLAG_INSENSITIVE, &shade_bg);
gdk_cairo_set_source_rgba (cr, highlight ? &fg : &shade_bg);
gdk_cairo_rectangle (cr, area);
diff --git a/shell/evince.css b/shell/evince.css
index 0aa5a1e..b347a79 100644
--- a/shell/evince.css
+++ b/shell/evince.css
@@ -8,3 +8,7 @@
border-radius: 10px;
padding: 10px;
}
+
+EvView {
+ background-color: @theme_bg_color;
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]