summaryrefslogtreecommitdiff
path: root/src/book-view.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2021-08-21 10:58:40 +0200
committerJörg Frings-Fürst <debian@jff.email>2021-08-21 10:58:40 +0200
commit7f079d48a2f00e9fe261928e94f340931d35547a (patch)
tree3953a15b915d41a87f5d586c968b3ef22c50deb1 /src/book-view.vala
parentc502fe7b056b00189313cdf1d7494ecf150acd52 (diff)
parent11c0cfbd587f1f07c797ac506e1b0cac63cfd2c7 (diff)
Merge branch 'feature/upstream' into develop
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);