diff options
Diffstat (limited to 'src/book-view.vala')
-rw-r--r-- | src/book-view.vala | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/book-view.vala b/src/book-view.vala index 59e2469..df2beb4 100644 --- a/src/book-view.vala +++ b/src/book-view.vala @@ -189,14 +189,7 @@ public class BookView : Gtk.Box private void add_cb (Book book, Page 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); + var page_view = new PageView (page); page_view.changed.connect (page_view_changed_cb); page_view.size_changed.connect (page_view_size_changed_cb); page_data.insert (page, page_view); @@ -450,6 +443,8 @@ public class BookView : Gtk.Box for (var i = 0; i < book.n_pages; i++) pages.append (get_nth_page (i)); + var ruler_color = get_style_context ().get_color (get_state_flags ()); + /* Render each page */ foreach (var page in pages) { @@ -462,7 +457,7 @@ public class BookView : Gtk.Box context.save (); context.translate (-x_offset, 0); - page.render (context); + page.render (context, ruler_color); context.restore (); if (page.selected) |