The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Update font name in toolbox

These changes was commited to the Birdfont repository Thu, 27 Aug 2015 11:36:15 +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>
Thu, 27 Aug 2015 11:36:15 +0000 (13:36 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Thu, 27 Aug 2015 11:36:15 +0000 (13:36 +0200)
commit a88663a3107f7456f884466ca6907278d2b684e4
tree 05e93c0d4392f0d069ef3d04ae40b0cac4f49e93
parent 9cec240b8c1cded8e1056fec0d0322c642e7ca83
Update font name in toolbox

libbirdfont/DescriptionDisplay.vala
libbirdfont/Expander.vala
libbirdfont/Glyph.vala
libbirdfont/MenuTab.vala
libbirdfont/Toolbox.vala
--- a/libbirdfont/DescriptionDisplay.vala +++ b/libbirdfont/DescriptionDisplay.vala @@ -118,6 +118,7 @@ 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);
--- a/libbirdfont/Expander.vala +++ b/libbirdfont/Expander.vala @@ -248,18 +248,6 @@ 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; });
--- a/libbirdfont/Glyph.vala +++ b/libbirdfont/Glyph.vala @@ -454,7 +454,7 @@ update_zoom_bar (); DrawingTools.update_layers (); - MainWindow.get_toolbox ().update_expanders (); + MainWindow.get_toolbox ().update_expanders (); } void update_zoom_bar () {
--- a/libbirdfont/MenuTab.vala +++ b/libbirdfont/MenuTab.vala @@ -273,7 +273,11 @@ 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
--- a/libbirdfont/Toolbox.vala +++ b/libbirdfont/Toolbox.vala @@ -69,12 +69,15 @@ 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; @@ -90,6 +93,12 @@ public static DrawingTools get_drawing_tools () { 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) { @@ -287,7 +296,7 @@ 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) {