summaryrefslogtreecommitdiffstats
path: root/src/ui/widget/ink-ruler.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2019-06-29 08:24:25 +0000
committerTavmjong Bah <tavmjong@free.fr>2019-06-29 12:01:19 +0000
commit6131ca23c145f769898ad074523c0a10b1caa8f6 (patch)
tree9cbc30e5b1c44da6acff4267d1a53869891d9816 /src/ui/widget/ink-ruler.cpp
parentMake tick color the symbolic icon color if symbolic icons are used. (diff)
downloadinkscape-6131ca23c145f769898ad074523c0a10b1caa8f6.tar.gz
inkscape-6131ca23c145f769898ad074523c0a10b1caa8f6.zip
Remove gimp ruler.
Diffstat (limited to 'src/ui/widget/ink-ruler.cpp')
-rw-r--r--src/ui/widget/ink-ruler.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ui/widget/ink-ruler.cpp b/src/ui/widget/ink-ruler.cpp
index c07bdd4e9..08ce6412f 100644
--- a/src/ui/widget/ink-ruler.cpp
+++ b/src/ui/widget/ink-ruler.cpp
@@ -4,6 +4,8 @@
*
* Copyright (C) 2019 Tavmjong Bah
*
+ * Rewrite of the 'C' ruler code which came originally from Gimp.
+ *
* The contents of this file may be used under the GNU General Public License Version 2 or later.
*
*/
@@ -86,7 +88,8 @@ Ruler::set_range(const double& lower, const double& upper)
}
}
-
+// Add a widget (i.e. canvas) to monitor. Note, we don't worry about removing this signal as
+// our ruler is tied tightly to the canvas, if one is destroyed, so is the other.
void
Ruler::add_track_widget(Gtk::Widget& widget)
{
@@ -177,7 +180,7 @@ Ruler::get_preferred_height_vfunc (int& minimum_height, int& natural_height) con
// Update backing store when scale changes.
// Note: in principle, there should not be a border (ruler ends should match canvas ends). If there
-// is a border, We calculate tick position ignoring border width at ends of ruler but move the
+// is a border, we calculate tick position ignoring border width at ends of ruler but move the
// ticks and position marker inside the border.
bool
Ruler::draw_scale(const::Cairo::RefPtr<::Cairo::Context>& cr_in)
@@ -363,7 +366,7 @@ Ruler::draw_marker(const Cairo::RefPtr<::Cairo::Context>& cr)
const int awidth = allocation.get_width();
const int aheight = allocation.get_height();
- // Temp (to verify our rectangle encloses position marker).
+ // Temp (to verify our redraw rectangle encloses position marker).
// Cairo::RectangleInt rect = marker_rect();
// cr->set_source_rgb(0, 1.0, 0);
// cr->rectangle (rect.x, rect.y, rect.width, rect.height);