summaryrefslogtreecommitdiff
path: root/src/page-view.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2021-08-21 10:58:21 +0200
committerJörg Frings-Fürst <debian@jff.email>2021-08-21 10:58:21 +0200
commit11c0cfbd587f1f07c797ac506e1b0cac63cfd2c7 (patch)
tree3953a15b915d41a87f5d586c968b3ef22c50deb1 /src/page-view.vala
parentc502fe7b056b00189313cdf1d7494ecf150acd52 (diff)
parent383626437ca8f9d26518408719b5d778e696eecd (diff)
Update upstream source from tag 'upstream/40.1'
Update to upstream version '40.1' with Debian dir c17505f9670c12d3b8774b06e0aa025eaae21458
Diffstat (limited to 'src/page-view.vala')
-rw-r--r--src/page-view.vala10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/page-view.vala b/src/page-view.vala
index 90a8071..342df27 100644
--- a/src/page-view.vala
+++ b/src/page-view.vala
@@ -45,6 +45,8 @@ public class PageView : Object
}
}
+ private Gdk.RGBA ruler_color;
+
private int ruler_width = 8;
private int border_width = 2;
@@ -84,9 +86,13 @@ public class PageView : Object
public signal void size_changed ();
public signal void changed ();
- public PageView (Page page)
+ /* It is necessary to ask the ruler color since it is themed with the GTK */
+ /* theme foreground color, and this class doesn't have any GTK widget */
+ /* available to lookup the color. */
+ public PageView (Page page, Gdk.RGBA ruler_color)
{
this.page = page;
+ this.ruler_color = ruler_color;
page.pixels_changed.connect (page_pixels_changed_cb);
page.size_changed.connect (page_size_changed_cb);
page.crop_changed.connect (page_overlay_changed_cb);
@@ -839,7 +845,7 @@ public class PageView : Object
context.paint ();
/* Draw page border */
- context.set_source_rgb (0, 0, 0);
+ context.set_source_rgb (ruler_color.red, ruler_color.green, ruler_color.blue);
context.set_line_width (border_width);
context.rectangle (0,