The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Fix character info

These changes was commited to the Birdfont repository Sat, 30 May 2015 21:36:03 +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, 30 May 2015 21:36:03 +0000 (23:36 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Sat, 30 May 2015 21:36:03 +0000 (23:36 +0200)
commit b3947d1ef18d767f60b400faf6c52c7278c68cf4
tree ae35c8506c666d868be5816b5a5268e6a557d12a
parent ed62e8738176cfe9e5c9ec39d6216accad3bc056
Fix character info

libbirdfont/CharacterInfo.vala
libbirdfont/OverViewItem.vala
--- a/libbirdfont/CharacterInfo.vala +++ b/libbirdfont/CharacterInfo.vala @@ -61,16 +61,16 @@ return (x <= px <= x + 12) && (y <= py <= y + 24); } - public void draw_icon (Context cr, bool selected) { + public void draw_icon (Context cr, bool selected, double px, double py) { if (selected) { Theme.text_color (icon, "Overview Selected Foreground"); } else { Theme.text_color (icon, "Overview Foreground"); } - icon.draw_at_top (cr, x, y); + icon.draw_at_top (cr, px, py); } } }
--- a/libbirdfont/OverViewItem.vala +++ b/libbirdfont/OverViewItem.vala @@ -49,6 +49,7 @@ this.character = character; this.glyphs = glyphs; this.info = new CharacterInfo (character, glyphs); + info.set_position (x + width - 17, y + height - 22.5); label = new Text ((!) character.to_string (), 17); truncate_label (); @@ -379,11 +380,7 @@ } private void draw_character_info_icon (Context cr) { - double px = width - 17; - double py = -2.5; - - info.set_position (px, py); - info.draw_icon (cr, selected); + info.draw_icon (cr, selected, width - 17, -2.5); } public void hide_menu () {