Clone in a terminal:
Commit 0e71984
Johan Mattsson - 2012-09-13T10:27:06+00:00
0e71984541d0daa0e61346cb00432998f2f8640ajohan.mattsson.m@gmail.com

bugfix: tie to grid

Changed files (4)

Diff

diff --git a/src/GlyphCanvas.vala b/src/GlyphCanvas.valaindex e9e6647..c4a02fd 100644--- a/src/GlyphCanvas.vala+++ b/src/GlyphCanvas.vala@@ -47,14 +47,12 @@ class GlyphCanvas : DrawingArea  { 					bool ug = false;
 					
 					if (allocation.height % 2 != 0) {
-						warning ("MainWindow.toggle_expanded_margin_bottom ();");
-						// MainWindow.toggle_expanded_margin_bottom ();
+						MainWindow.native_window.toggle_expanded_margin_bottom ();
 						ug = true;
 					}
 					
 					if (allocation.width % 2 != 0) {
-						warning ("MainWindow.toggle_expanded_margin_right ();");
-						// MainWindow.toggle_expanded_margin_right ();
+						MainWindow.native_window.toggle_expanded_margin_right ();
 						ug = true;
 					}					
 					
diff --git a/src/GridTool.vala b/src/GridTool.valaindex 7d0a293..d779954 100644--- a/src/GridTool.vala+++ b/src/GridTool.vala@@ -198,8 +198,8 @@ class GridTool : Tool { 		} 		 		if (!coordinate) {-			x = (xmin.get_pos () - g.view_offset_x + (g.allocation.width / 2)) * g.view_zoom;	-			y = (ymin.get_pos () - g.view_offset_y + (g.allocation.height / 2)) * g.view_zoom;+			x = Glyph.reverse_path_coordinate_x (xmin.get_pos ());+			y = Glyph.reverse_path_coordinate_y (-ymin.get_pos ()); 		} else { 			x = xmin.get_pos (); 			y = ymin.get_pos ();diff --git a/src/GtkInterface.vala b/src/GtkInterface.valaindex 296f480..69181b7 100644--- a/src/GtkInterface.vala+++ b/src/GtkInterface.vala@@ -154,7 +154,7 @@ public class GtkWindow : Gtk.Window, NativeWindow { 	 	} -	internal static void toggle_expanded_margin_bottom () {+	internal void toggle_expanded_margin_bottom () { 		int w, h; 		margin_bottom.get_size_request (out w, out h); 		@@ -164,7 +164,7 @@ public class GtkWindow : Gtk.Window, NativeWindow { 		margin_bottom.set_size_request (w, h); 	} 	-	internal static void toggle_expanded_margin_right () {	+	internal void toggle_expanded_margin_right () {	 		int w, h; 		margin_right.get_size_request (out w, out h); diff --git a/src/MainWindow.vala b/src/MainWindow.valaindex 20c8d77..38f2497 100644--- a/src/MainWindow.vala+++ b/src/MainWindow.vala@@ -24,6 +24,10 @@ namespace Supplement { public interface NativeWindow : GLib.Object {
 	public abstract string? file_chooser (string title);
 	public abstract string? set_title (string title);
+
+	public abstract void toggle_expanded_margin_bottom ();
+	public abstract void toggle_expanded_margin_right ();
+	
 }
 
 internal class MainWindow {

Contact

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