The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Fix selection in overview

These changes was commited to the Birdfont repository Fri, 17 Apr 2015 16:05:00 +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>
Fri, 17 Apr 2015 16:05:00 +0000 (18:05 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Fri, 17 Apr 2015 16:05:00 +0000 (18:05 +0200)
commit 569f20338daf92db8753520c7d5c97c9efb3caa6
tree edd21c8cc78c95bd1ec5c8ad2549ecab1e1bc572
parent 8123a8904e93a4a920ffd8f22f193d60df00bd31
Fix selection in overview

birdfont/GtkWindow.vala
libbirdfont/FontName.vala
libbirdfont/LabelTool.vala
libbirdfont/LanguageSelectionTab.vala
libbirdfont/OverView.vala
libbirdfont/Path.vala
libbirdfont/Theme.vala
libbirdfont/Toolbox.vala
--- a/birdfont/GtkWindow.vala +++ b/birdfont/GtkWindow.vala @@ -210,7 +210,7 @@ public void font_loaded () { Font f = BirdFont.get_current_font (); - set_title (@"BirdFont $(f.full_name)"); + set_title (@"$(f.full_name)"); } public void set_overwrite_dialog (OverWriteDialogListener d) {
--- a/libbirdfont/FontName.vala +++ b/libbirdfont/FontName.vala @@ -50,7 +50,7 @@ text_height *= max_width / extent; } - Theme.text_color (font_name, "Highlighted 1"); + Theme.text_color (font_name, "Font Name"); font_name.set_font_size (text_height); font_name.draw_at_baseline (cr, x, y + 13 * Toolbox.get_scale ()); cr.restore ();
--- a/libbirdfont/LabelTool.vala +++ b/libbirdfont/LabelTool.vala @@ -85,9 +85,9 @@ bgy = y + 2; if (is_selected ()) { - Theme.color (cr, "Glyph Count Background"); + Theme.color (cr, "Glyph Count Background 1"); } else { - Theme.color (cr, "Menu Background"); + Theme.color (cr, "Glyph Count Background 2"); } draw_rounded_rectangle (cr, bgx, bgy, counter_box_width, counter_box_height, 3);
--- a/libbirdfont/LanguageSelectionTab.vala +++ b/libbirdfont/LanguageSelectionTab.vala @@ -55,13 +55,13 @@ visible_rows = (int) (allocation.height / 18.0); cr.save (); - Theme.color (cr, "Background 1"); + Theme.color (cr, "Table Background 1"); cr.rectangle (0, 0, allocation.width, allocation.height); cr.fill (); cr.restore (); cr.save (); - Theme.color (cr, "Background 5"); + Theme.color (cr, "Table Background 2"); cr.set_font_size (12); foreach (string language in DefaultLanguages.names) {
--- a/libbirdfont/OverView.vala +++ b/libbirdfont/OverView.vala @@ -605,7 +605,7 @@ if (selected >= visible_items.size) { selected = (int) (visible_items.size - 1); } - + selected_item = get_selected_item (); } @@ -644,7 +644,7 @@ if (first_visible < 0) { first_visible = 0; - } + } } public void key_left () { @@ -734,6 +734,11 @@ scroll_to_char (keyval); selected_item = get_selected_item (); + + selected_items.clear (); + if (selected_item.glyphs != null) { + selected_items.add ((!) selected_item.glyphs); + } } public void delete_selected_glyph () {
--- a/libbirdfont/Path.vala +++ b/libbirdfont/Path.vala @@ -1688,7 +1688,6 @@ cr.save (); all_of_path ((x, y) => { - //Theme.color (cr, "Background 5"); cr.move_to (px + xc, -py + yc); cr.line_to (x + xc, -y + yc);
--- a/libbirdfont/Theme.vala +++ b/libbirdfont/Theme.vala @@ -109,7 +109,6 @@ Theme.set_default_color ("Headline Background", 110 / 255.0, 113 / 255.0, 130 / 255.0, 1); Theme.set_default_color ("Empty Tool Box", 110 / 255.0, 113 / 255.0, 130 / 255.0, 1); - Theme.set_default_color ("Background 5", 0.3, 0.3, 0.3, 1); Theme.set_default_color ("Background 6", 224/255.0, 224/255.0, 224/255.0, 1); Theme.set_default_color ("Background 7", 56 / 255.0, 59 / 255.0, 65 / 255.0, 1); Theme.set_default_color ("Background 8", 55/255.0, 55/255.0, 55/255.0, 1); @@ -201,7 +200,7 @@ Theme.set_default_color ("Spin Button", 164 / 255.0, 167 / 255.0, 175 / 255.0, 1); Theme.set_default_color ("Active Spin Button", 104 / 255.0, 108 / 255.0, 119 / 255.0, 1); Theme.set_default_color ("Zoom Bar Border", 122 / 255.0, 131 / 255.0, 145 / 255.0, 1); - + Theme.set_default_color ("Font Name", 0 / 255.0, 0 / 255.0, 0 / 255.0, 1); if (BirdFont.has_argument ("--test")) { current_theme = "generated_theme.theme"; @@ -216,7 +215,6 @@ t_("Dialog Background"); t_("Menu Background"); t_("Default Background"); - t_("Background 5"); t_("Background 6"); t_("Background 7"); t_("Background 8"); @@ -294,6 +292,7 @@ t_("Spin Button"); t_("Active Spin Button"); t_("Zoom Bar Border"); + t_("Font Name"); } }
--- a/libbirdfont/Toolbox.vala +++ b/libbirdfont/Toolbox.vala @@ -439,9 +439,6 @@ } public void draw (int w, int h, Context cr) { - ImageSurface bg; - double scale_x, scale_y, scale; - cr.save (); if (current_set is EmptySet) {