summaryrefslogtreecommitdiff
path: root/src/page-view.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2022-03-19 18:05:09 +0100
committerJörg Frings-Fürst <debian@jff.email>2022-03-19 18:05:09 +0100
commite2af6e905a98b8b90b0504bc8f245733196dd808 (patch)
treeed6425480e22209291077ee018858e2a7c9e26f9 /src/page-view.vala
parent14afa21f4a428f9a6a5788dc1fb8a3507a42d02f (diff)
parent8ac2508eb094459c062d0c31b6367da393b4fa6e (diff)
Update upstream source from tag 'upstream/42.0'
Update to upstream version '42.0' with Debian dir baa60a251498352959c048578d8f76023260a87e
Diffstat (limited to 'src/page-view.vala')
-rw-r--r--src/page-view.vala15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/page-view.vala b/src/page-view.vala
index 342df27..148dcca 100644
--- a/src/page-view.vala
+++ b/src/page-view.vala
@@ -45,8 +45,6 @@ public class PageView : Object
}
}
- private Gdk.RGBA ruler_color;
-
private int ruler_width = 8;
private int border_width = 2;
@@ -86,13 +84,9 @@ public class PageView : Object
public signal void size_changed ();
public signal void changed ();
- /* 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)
+ public PageView (Page page)
{
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);
@@ -828,7 +822,10 @@ public class PageView : Object
}
}
- public void render (Cairo.Context context)
+ /* 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 void render (Cairo.Context context, Gdk.RGBA ruler_color)
{
update_animation ();
update_page_view ();
@@ -845,7 +842,7 @@ public class PageView : Object
context.paint ();
/* Draw page border */
- context.set_source_rgb (ruler_color.red, ruler_color.green, ruler_color.blue);
+ Gdk.cairo_set_source_rgba (context, ruler_color);
context.set_line_width (border_width);
context.rectangle (0,