Commit a88663a
Update font name in toolbox
Changed files (5)
modifiedlibbirdfont/DescriptionDisplay.valamodifiedlibbirdfont/Expander.valamodifiedlibbirdfont/Glyph.valamodifiedlibbirdfont/MenuTab.valamodifiedlibbirdfont/Toolbox.vala
Diff
@@ -118,6 +118,7 @@ public class DescriptionDisplay : TableLayout { full_name.text_changed.connect ((t) => { font.full_name = t; font.touch ();+ MainWindow.get_toolbox ().update_all_expanders (); }); widgets.add (full_name); focus_ring.add (full_name);@@ -248,18 +248,6 @@ public class Expander : GLib.Object { selected.set_selected (false); } }- - // FIXME: delete- /*- if (!is_persistent () && !selected.persistent) {- var time = new TimeoutSource(200);- time.set_callback(() => {- selected.set_selected (false);- MainWindow.get_toolbox ().redraw ((int) x, (int) y, (int) w + 300, (int) (h + margin));- return false;- });- time.attach(null);- }*/ selected.new_selection = false; });@@ -454,7 +454,7 @@ public class Glyph : FontDisplay { update_zoom_bar (); DrawingTools.update_layers ();- MainWindow.get_toolbox ().update_expanders (); + MainWindow.get_toolbox ().update_expanders (); } void update_zoom_bar () {@@ -273,7 +273,11 @@ public class MenuTab : FontDisplay { if (autotrace_simplification != "") { double asi = double.parse (autotrace_simplification); DrawingTools.auto_trace_simplify.set_value_round (asi);- } + }+ + MainWindow.get_toolbox ().update_expanders ();+ MainWindow.get_toolbox ().update_all_expanders ();+ Toolbox.redraw_tool_box (); } // FIXME: background thread@@ -69,12 +69,15 @@ public class Toolbox : GLib.Object { file_tools = new FileTools (); theme_tools = new ThemeTools (); + tool_sets.add (theme_tools);+ tool_sets.add (file_tools);+ tool_sets.add (hidden_tools); tool_sets.add (drawing_tools); tool_sets.add (kerning_tools); tool_sets.add (preview_tools); tool_sets.add (overview_tools); tool_sets.add (background_tools);- // the menu has all the file_tools commands, it won't be added here+ // the menu has all the file_tools commands, it will not be added here tool_sets.add (hidden_tools); // tools without a button current_set = file_tools;@@ -92,6 +95,12 @@ public class Toolbox : GLib.Object { return drawing_tools; } + public void update_all_expanders () {+ foreach (ToolCollection tc in tool_sets) {+ tc.redraw ();+ }+ }+ public static void set_toolbox_from_tab (string tab_name, Tab? t = null) { if (tab_name == "Spacing") { current_set = (ToolCollection) spacing_tools;@@ -287,7 +296,7 @@ public class Toolbox : GLib.Object { update = exp.set_active (a); if (update) {- redraw ((int) exp.x - 10, (int) exp.y - 10, (int) (exp.x + exp.w + 10), (int) (exp.y + exp.h + 10));+ redraw ((int) exp.x - 10, (int) exp.y - 10, (int) (exp.x + exp.w + 20), (int) (exp.y + exp.h + 20)); } foreach (Tool t in exp.tool) {