The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Set selection for zoom buttons

These changes was commited to the Birdfont repository Sat, 25 Jun 2016 10:17:10 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
author Johan Mattsson <johan.mattsson.m@gmail.com>
Sat, 25 Jun 2016 10:17:10 +0000 (12:17 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Sat, 25 Jun 2016 10:17:10 +0000 (12:17 +0200)
commit 857d3ff16469123312118c7cc76a022b6c57da31
tree 952a47f922e3c532219c2df3e586baced3fb13af
parent 2d8424147e5dcf70927890cd3689a1e8e28c0ea6
Set selection for zoom buttons

libbirdfont/DrawingTools.vala
--- a/libbirdfont/DrawingTools.vala +++ b/libbirdfont/DrawingTools.vala @@ -1088,6 +1088,7 @@ zoom_tool.store_current_view (); glyph_canvas.get_current_display ().reset_zoom (); glyph_canvas.redraw_area(0, 0, GlyphCanvas.allocation.width, GlyphCanvas.allocation.height); + self.set_selected (false); }); zoombar_tool.add_tool (reset_zoom); reset_zoom.set_tool_visibility (false); @@ -1096,6 +1097,7 @@ full_glyph.select_action.connect((self) => { zoom_tool.store_current_view (); zoom_tool.zoom_full_glyph (); + self.set_selected (false); }); zoombar_tool.add_tool (full_glyph); @@ -1103,6 +1105,7 @@ zoom_boundaries.select_action.connect((self) => { zoom_tool.store_current_view (); glyph_canvas.get_current_display ().zoom_max (); + self.set_selected (false); }); zoombar_tool.add_tool (zoom_boundaries); @@ -1113,18 +1116,21 @@ ZoomTool.zoom_full_background_image (); glyph_canvas.redraw_area(0, 0, GlyphCanvas.allocation.width, GlyphCanvas.allocation.height); } + self.set_selected (false); }); zoombar_tool.add_tool (zoom_bg); Tool zoom_prev = new Tool ("prev", t_("Previous view")); zoom_prev.select_action.connect((self) => { zoom_tool.previous_view (); + self.set_selected (false); }); zoombar_tool.add_tool (zoom_prev); Tool zoom_next = new Tool ("next", t_("Next view")); zoom_next.select_action.connect((self) => { zoom_tool.next_view (); + self.set_selected (false); }); zoombar_tool.add_tool (zoom_next); // view_tools zoom_next.set_tool_visibility (false);