Clone in a terminal:
Commit 2891d01
Johan Mattsson - 2015-04-20T08:54:28+00:00
2891d01bfa333dd2a8bdece112e9445f94617093johan.mattsson.m@gmail.com

Stroke tool settings

Changed files (4)

Diff

diff --git a/libbirdfont/DrawingTools.vala b/libbirdfont/DrawingTools.valaindex 7d1832b..22a0ecb 100644--- a/libbirdfont/DrawingTools.vala+++ b/libbirdfont/DrawingTools.vala@@ -42,7 +42,6 @@ public class DrawingTools : ToolCollection  { 	PointTool point_tool; 	public static ZoomTool zoom_tool; 	public static ResizeTool resize_tool;-	StrokeTool stroke_tool; 	public static TrackTool track_tool; 	public static BackgroundTool move_background; 	public static Tool move_canvas;@@ -735,14 +734,18 @@ public class DrawingTools : ToolCollection  { 				foreach (Path p in g.active_paths) { 					p.stroke = StrokeTool.stroke_width; 				}+				+				StrokeTool.stroke_width = object_stroke.get_value (); 			} else { 				foreach (Path p in g.active_paths) { 					p.stroke = 0; 				}-			}+			}	 			+			add_stroke.selected = StrokeTool.add_stroke; 			GlyphCanvas.redraw (); 		});+		 		stroke_expander.add_tool (add_stroke);	 		 		// edit stroke width@@ -1031,12 +1034,13 @@ public class DrawingTools : ToolCollection  { 		// Default selection 		IdleSource idle = new IdleSource (); 		idle.set_callback (() => {-			MainWindow.get_toolbox ().reset_active_tool ();-		-			foresight_tool.set_selected (true);-			update_drawing_and_background_tools (foresight_tool);+			Toolbox tb = MainWindow.get_toolbox (); 			-			select_draw_tool ();			+			tb.reset_active_tool ();+			update_drawing_and_background_tools (foresight_tool);+			tb.select_tool (foresight_tool);+			tb.set_current_tool (foresight_tool);+					 			set_point_type_from_preferences (); 			 			if (GlyphCanvas.get_current_glyph ().get_show_help_lines ()) {@@ -1194,7 +1198,6 @@ public class DrawingTools : ToolCollection  { 			zoom_tool.set_selected (false); 			move_tool.set_selected (false); 			resize_tool.set_selected (false);-			stroke_tool.set_selected (false); 			track_tool.set_selected (false); 			move_canvas.set_selected (false); 			delete_background.set_selected (false);@@ -1276,10 +1279,6 @@ public class DrawingTools : ToolCollection  { 	public static PointType get_selected_point_type () { 		return point_type; 	}--	private void select_draw_tool () {-		Toolbox.select_tool_by_name ("pen_tool");-	} 	 	public void remove_all_grid_buttons () { 		grid_expander.tool.clear ();diff --git a/libbirdfont/MenuTab.vala b/libbirdfont/MenuTab.valaindex fc968fe..485f41a 100644--- a/libbirdfont/MenuTab.vala+++ b/libbirdfont/MenuTab.vala@@ -209,6 +209,7 @@ public class MenuTab : FontDisplay { 		 		if (stroke_width != "") { 			DrawingTools.object_stroke.set_value (stroke_width);+			StrokeTool.stroke_width = DrawingTools.object_stroke.get_value (); 		} 	} 	diff --git a/libbirdfont/Theme.vala b/libbirdfont/Theme.valaindex 6b295f3..4937ff5 100644--- a/libbirdfont/Theme.vala+++ b/libbirdfont/Theme.vala@@ -259,7 +259,7 @@ public class Theme : GLib.Object { 		Theme.set_default_color ("Button Border 4", 39 / 255.0, 40 / 255.0, 44 / 255.0, 1); 		Theme.set_default_color ("Button Background 4", 44 / 255.0, 47 / 255.0, 51 / 255.0, 1); 		-		Theme.set_default_color ("Button Foreground", 107 / 255.0, 112 / 255.0, 122 / 255.0, 1);+		Theme.set_default_color ("Button Foreground", 255 / 255.0, 255 / 255.0, 255 / 255.0, 1); 		Theme.set_default_color ("Selected Button Foreground", 107 / 255.0, 112 / 255.0, 122 / 255.0, 1);  		Theme.set_default_color ("Tool Foreground", 123 / 255.0, 127 / 255.0, 132 / 255.0, 1);diff --git a/libbirdfont/Toolbox.vala b/libbirdfont/Toolbox.valaindex c0394e3..1626e9e 100644--- a/libbirdfont/Toolbox.vala+++ b/libbirdfont/Toolbox.vala@@ -267,7 +267,6 @@ public class Toolbox : GLib.Object  { 					redraw ((int) exp.x - 10, (int) exp.y - 10, (int) (exp.x + exp.w + 10), (int) (exp.y + exp.h + 10)); 				} 				- 				foreach (Tool t in exp.tool) { 					if (t.tool_is_visible ()) { 						active = t.is_over (x, y);

Contact

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