Commit b3947d1
Fix character info
Changed files (2)
Diff
@@ -61,14 +61,14 @@ public class CharacterInfo : GLib.Object { 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); } } @@ -49,6 +49,7 @@ public class OverViewItem : GLib.Object { 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 @@ public class OverViewItem : GLib.Object { } 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 () {