summaryrefslogtreecommitdiff
path: root/src/book-view.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/book-view.vala')
-rw-r--r--src/book-view.vala9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/book-view.vala b/src/book-view.vala
index 12da06f..59e2469 100644
--- a/src/book-view.vala
+++ b/src/book-view.vala
@@ -189,7 +189,14 @@ public class BookView : Gtk.Box
private void add_cb (Book book, Page page)
{
- var page_view = new PageView (page);
+ Gdk.RGBA page_ruler_color;
+ if (!get_style_context ().lookup_color ("theme_fg_color", out page_ruler_color))
+ {
+ warning ("Couldn't get theme_fg_color from GTK theme, needed to draw the page view ruler");
+ /* Use a bright color so that theme makers notice it. */
+ page_ruler_color.parse ("#00ff00");
+ }
+ var page_view = new PageView (page, page_ruler_color);
page_view.changed.connect (page_view_changed_cb);
page_view.size_changed.connect (page_view_size_changed_cb);
page_data.insert (page, page_view);