Commit 569f203
Fix selection in overview
Changed files (8)
modifiedbirdfont/GtkWindow.valamodifiedlibbirdfont/FontName.valamodifiedlibbirdfont/LabelTool.valamodifiedlibbirdfont/LanguageSelectionTab.valamodifiedlibbirdfont/OverView.valamodifiedlibbirdfont/Path.valamodifiedlibbirdfont/Theme.valamodifiedlibbirdfont/Toolbox.vala
Diff
@@ -210,7 +210,7 @@ public class GtkWindow : Gtk.Window, NativeWindow { 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) {@@ -50,7 +50,7 @@ public class FontName : Tool { 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 ();@@ -85,9 +85,9 @@ public class LabelTool : Tool { 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);@@ -55,13 +55,13 @@ public class LanguageSelectionTab : FontDisplay { 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) {@@ -605,7 +605,7 @@ public class OverView : FontDisplay { if (selected >= visible_items.size) { selected = (int) (visible_items.size - 1); }- + selected_item = get_selected_item (); } @@ -644,7 +644,7 @@ public class OverView : FontDisplay { if (first_visible < 0) { first_visible = 0; - } + } } public void key_left () {@@ -734,6 +734,11 @@ public class OverView : FontDisplay { 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 () {@@ -1688,7 +1688,6 @@ public class Path { 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); @@ -109,7 +109,6 @@ public class Theme : GLib.Object { 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 @@ public class Theme : GLib.Object { 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 @@ public class Theme : GLib.Object { 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 @@ public class Theme : GLib.Object { t_("Spin Button"); t_("Active Spin Button"); t_("Zoom Bar Border");+ t_("Font Name"); } } @@ -439,9 +439,6 @@ public class Toolbox : GLib.Object { } public void draw (int w, int h, Context cr) { - ImageSurface bg;- double scale_x, scale_y, scale;- cr.save (); if (current_set is EmptySet) {