diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2022-03-20 09:13:50 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2022-03-20 09:13:50 +0100 |
commit | aafaa7c3ff1f88dadbad34559adab7b35be8542b (patch) | |
tree | 11f3ff35af220dd659d42e5f87d29b5d5ca073cb /src/book-view.vala | |
parent | 055f6f3e01bb718bfdd61331e1b13b0cdba6d718 (diff) | |
parent | e01ac9786891513c1cb628ca0a0374436057cc3b (diff) |
Merge branch 'release/debian/42.0-1'debian/42.0-1
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) |