Clone in a terminal:
Commit c68e6cb
Johan Mattsson - 2015-04-12T19:31:50+00:00
c68e6cb7cde91e6081b56ced8d09c688d926861bjohan.mattsson.m@gmail.com

Fix zoom bar width

Changed files (1)

Diff

diff --git a/libbirdfont/ZoomBar.vala b/libbirdfont/ZoomBar.valaindex e4bac1f..6c73248 100644--- a/libbirdfont/ZoomBar.vala+++ b/libbirdfont/ZoomBar.vala@@ -24,6 +24,8 @@ public class ZoomBar : Tool { 	 	public signal void new_zoom (double zoom_level); 	+	double margin_percent = 0.05;+	 	public ZoomBar () { 		base (); 		@@ -57,7 +59,7 @@ public class ZoomBar : Tool { 	} 	 	void set_zoom_from_mouse (double tx) {-		double margin = w * 0.1;+		double margin = w * margin_percent; 		double bar_width = w - margin - x; 		 		tx -= x;@@ -81,7 +83,7 @@ public class ZoomBar : Tool { 	} 	 	public override void draw (Context cr) {-		double margin = w * 0.1;+		double margin = w * margin_percent; 		double bar_width = w - margin - x; 		 		// filled@@ -110,7 +112,7 @@ public class ZoomBar : Tool { 	void draw_bar (Context cr) { 		double height = h; 		double radius = height / 2;-		double margin = w * 0.1;+		double margin = w * margin_percent; 	 		cr.move_to (x + radius, y + height); 		cr.arc (x + radius, y + radius, radius, PI / 2, 3 * (PI / 2));

Contact

Email: johan.mattsson.m@gmail.com
Mastodon: typo.social/@birdfont
GitHub: johanmattssonm
LinkedIn: johan-mattsson-2ab324112