The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Store skew value in font settings

These changes was commited to the Birdfont repository Sun, 28 Jun 2015 14:31:27 +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>
Sun, 28 Jun 2015 14:31:27 +0000 (16:31 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Sun, 28 Jun 2015 14:31:27 +0000 (16:31 +0200)
commit c5abd5d06e2d96805531e4eedf58af49280d7d44
tree 8ae8468d47c398cbac5701f2b68537eeef83f710
parent d44dbd33d82ecc6552d98b18d87e288262c7106e
Store skew value in font settings

libbirdfont/MenuTab.vala
libbirdfont/OverviewTools.vala
--- a/libbirdfont/MenuTab.vala +++ b/libbirdfont/MenuTab.vala @@ -250,6 +250,12 @@ bool lg = bool.parse (lock_grid); GridTool.lock_grid = lg; DrawingTools.lock_grid.selected = GridTool.lock_grid; + + string skew_overview = f.settings.get_setting ("skew_overview"); + if (skew_overview != "") { + double so = double.parse (skew_overview); + OverviewTools.skew.set_value_round (so); + } } // FIXME: background thread
--- a/libbirdfont/OverviewTools.vala +++ b/libbirdfont/OverviewTools.vala @@ -1,5 +1,5 @@ /* - Copyright (C) 2014 Johan Mattsson + Copyright (C) 2014 2015 Johan Mattsson This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -29,7 +29,7 @@ public static Expander zoom_expander; - SpinButton skew; + public static SpinButton skew; public OverviewTools () { Expander font_name = new Expander (); @@ -97,7 +97,11 @@ Tool transform = new Tool ("transform", t_("Transform")); transform.select_action.connect ((self) => { + FontSettings fs = BirdFont.get_current_font ().settings; + + fs.set_setting ("skew_overview", @"$(skew.get_value ())"); transform.selected = false; + process_transform (); }); transform.selected = false; @@ -118,7 +122,6 @@ foreach (GlyphCollection gc in o.selected_items) { if (gc.length () > 0) { g = gc.get_current (); - print (@"gc.selected: $(gc.selected)\n"); ui.glyphs.add (gc.copy_deep ()); g.add_help_lines (); DrawingTools.resize_tool.skew_glyph (g, -skew.get_value (), 0, false);