diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2022-03-19 18:05:26 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2022-03-19 18:05:26 +0100 |
commit | 4e466fc263ef18533b1368ac7514bdf01973227b (patch) | |
tree | ed6425480e22209291077ee018858e2a7c9e26f9 /src/book-view.vala | |
parent | 14afa21f4a428f9a6a5788dc1fb8a3507a42d02f (diff) | |
parent | e2af6e905a98b8b90b0504bc8f245733196dd808 (diff) |
Merge branch 'feature/upstream' into develop
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) |