The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – RSS feed

Move graphics rendering to its own method in overview item

These changes was commited to the Birdfont repository Sun, 20 Dec 2015 07:41:30 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
[Sun, 20 Dec 2015 07:41:30 +0000]

Updated Files

libbirdfont/OverView.vala
libbirdfont/OverViewItem.vala
--- a/libbirdfont/OverView.vala +++ b/libbirdfont/OverView.vala @@ -557,6 +557,7 @@ item = new OverViewItem (); item.set_character (character); item.set_glyphs (glyphs); + item.generate_graphics (); item.x = x; item.y = y; visible_items.add (item); @@ -590,6 +591,11 @@ item = visible_items.get (i); glyphs = f.get_glyph_collection_by_name ((!) item.character.to_string ()); item.set_glyphs (glyphs); + } + + for (int i = 0; i < visible_size; i++) { + item = visible_items.get (i); + item.generate_graphics (); } }
--- a/libbirdfont/OverViewItem.vala +++ b/libbirdfont/OverViewItem.vala @@ -56,8 +56,10 @@ } public void set_glyphs (GlyphCollection? gc) { - glyphs = gc; - + glyphs = gc; + } + + public void generate_graphics () { if (glyphs != null) { version_menu = new VersionList ((!) glyphs); version_menu.add_glyph_item.connect ((glyph) => { @@ -81,7 +83,7 @@ truncate_label (); } - draw_background (); + draw_background (); } public void draw_glyph_from_font () {