Commit f467e91
Zoom in and out with + and - keys.
Changed files (4)
modifiedlibbirdfont/DrawingTools.valamodifiedlibbirdfont/Glyph.valamodifiedlibbirdfont/KeyBindings.valamodifiedlibbirdfont/PenTool.vala
Diff
@@ -872,7 +872,7 @@ public class DrawingTools : ToolCollection { }); view_tools.add_tool (full_glyph); - Tool zoom_boundaries = new Tool ("zoom_boundaries", t_("Zoom in on region boundaries"), 'v');+ Tool zoom_boundaries = new Tool ("zoom_boundaries", t_("Fit in view"), 'v'); zoom_boundaries.select_action.connect((self) => { zoom_tool.store_current_view (); glyph_canvas.get_current_display ().zoom_max ();@@ -629,7 +629,16 @@ public class Glyph : FontDisplay { public override void key_press (uint keyval) { Tool t = MainWindow.get_toolbox ().get_current_tool ();- t.key_press_action (t, keyval); + t.key_press_action (t, keyval);+ + switch (keyval) {+ case Key.NUM_PLUS:+ zoom_in ();+ break;+ case Key.NUM_MINUS:+ zoom_out ();+ break;+ } } /** Delete edit point from path.@@ -40,7 +40,9 @@ public enum Key { LOGO_RIGHT = 65516, CONTEXT_MENU = 65383, TAB = 65289,- DEL = 65535+ DEL = 65535,+ NUM_PLUS = 65451,+ NUM_MINUS = 65453 } bool is_arrow_key (uint keyval) {@@ -126,12 +126,6 @@ public class PenTool : Tool { move_action (this, x, y); press (b, x, y, false);- - if (GridTool.is_visible ()) {- tie_pixels (ref x, ref y);- } else if (GridTool.has_ttf_grid ()) {- GridTool.ttf_grid (ref x, ref y);- } if (BirdFont.android) { point_selection_image = true;