Clone in a terminal:
Commit a88663a
Johan Mattsson - 2015-08-27T11:36:15+00:00
a88663a3107f7456f884466ca6907278d2b684e4johan.mattsson.m@gmail.com

Update font name in toolbox

Changed files (5)

Diff

diff --git a/libbirdfont/DescriptionDisplay.vala b/libbirdfont/DescriptionDisplay.valaindex b89925b..3e3ab13 100644--- a/libbirdfont/DescriptionDisplay.vala+++ b/libbirdfont/DescriptionDisplay.vala@@ -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);diff --git a/libbirdfont/Expander.vala b/libbirdfont/Expander.valaindex d1e992d..a2ad17c 100644--- a/libbirdfont/Expander.vala+++ b/libbirdfont/Expander.vala@@ -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; 		});diff --git a/libbirdfont/Glyph.vala b/libbirdfont/Glyph.valaindex 992ab77..511a7b4 100644--- a/libbirdfont/Glyph.vala+++ b/libbirdfont/Glyph.vala@@ -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 () {diff --git a/libbirdfont/MenuTab.vala b/libbirdfont/MenuTab.valaindex a625bf3..8b47335 100644--- a/libbirdfont/MenuTab.vala+++ b/libbirdfont/MenuTab.vala@@ -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 threaddiff --git a/libbirdfont/Toolbox.vala b/libbirdfont/Toolbox.valaindex 1a3e346..2c1a6ef 100644--- a/libbirdfont/Toolbox.vala+++ b/libbirdfont/Toolbox.vala@@ -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) {

Contact

Email: johan.mattsson.m@gmail.com
Mastodon: typo.social/@birdfont
GitHub: johanmattssonm
LinkedIn: johan-mattsson-2ab324112