The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – RSS feed

Stroke tool settings

These changes was commited to the Birdfont repository Mon, 20 Apr 2015 08:54:28 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
[Mon, 20 Apr 2015 08:54:28 +0000]

Updated Files

libbirdfont/DrawingTools.vala
libbirdfont/MenuTab.vala
libbirdfont/Theme.vala
libbirdfont/Toolbox.vala
--- a/libbirdfont/DrawingTools.vala +++ b/libbirdfont/DrawingTools.vala @@ -42,7 +42,6 @@ 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 @@ 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 @@ // 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 @@ 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); @@ -1275,10 +1278,6 @@ /** Insert new points of this type. */ 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 () {
--- a/libbirdfont/MenuTab.vala +++ b/libbirdfont/MenuTab.vala @@ -209,6 +209,7 @@ if (stroke_width != "") { DrawingTools.object_stroke.set_value (stroke_width); + StrokeTool.stroke_width = DrawingTools.object_stroke.get_value (); } }
--- a/libbirdfont/Theme.vala +++ b/libbirdfont/Theme.vala @@ -259,7 +259,7 @@ 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);
--- a/libbirdfont/Toolbox.vala +++ b/libbirdfont/Toolbox.vala @@ -267,7 +267,6 @@ 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);