The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Store zoom value

These changes was commited to the Birdfont repository Sun, 19 Jun 2016 13:04:36 +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, 19 Jun 2016 13:04:36 +0000 (15:04 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Sun, 19 Jun 2016 13:04:36 +0000 (15:04 +0200)
commit 30ab0d5a9cf8116f54b7288fe9982101936fffd2
tree 7b836b5eb4dafec1c3554e0604e7d5f4f29776ef
parent ee35673d94c8a9926491516022b417da10f2584d
Store zoom value

libbirdfont/OverView.vala
--- a/libbirdfont/OverView.vala +++ b/libbirdfont/OverView.vala @@ -129,6 +129,16 @@ update_item_list (); update_scrollbar (); reset_zoom (); + + string? zoom = Preferences.get ("overview_zoom"); + + if (zoom != null) { + string z = (!) zoom; + + if (z != "") { + set_zoom (double.parse (z)); + } + } } public Glyph? get_selected_glyph () { @@ -411,7 +421,8 @@ OverViewItem.margin = OverViewItem.DEFAULT_MARGIN * z; update_item_list (); OverViewItem.reset_label (); - GlyphCanvas.redraw (); + GlyphCanvas.redraw (); + Preferences.set ("overview_zoom", @"$zoom"); } public override void zoom_min () {