Commit 88df29c
fix kerning tool layout
Changed files (4)
modifiedlibbirdfont/Expander.valamodifiedlibbirdfont/KerningRange.valamodifiedlibbirdfont/TestCases.valamodifiedlibbirdfont/Toolbox.vala
Diff
@@ -77,10 +77,15 @@ public class Expander : GLib.Object { bool new_row = false; foreach (Tool t in tool) {- t.w = 33 * scale;- t.h = (33 / 1.11) * scale;+ if (t is KerningRange) {+ t.w = Toolbox.allocation_width * scale;+ t.h = 17 * scale; + } else {+ t.w = 33 * scale;+ t.h = (33 / 1.11) * scale;+ } }- + if (tool.length () > 0) { content_height = tool.first ().data.h + margin_small; } else {@@ -55,9 +55,6 @@ public class KerningRange : Tool { panel_release_action.connect ((selected, button, tx, ty) => { });- - w = 200;- h = 17; } public void set_ranges (string r) {@@ -104,8 +101,8 @@ public class KerningRange : Tool { public override void draw (Context cr) { double xt, yt; - xt = x + 27;- yt = y + 53;+ xt = x + 10;+ yt = y + 10; cr.save (); @@ -59,7 +59,6 @@ class TestCases { int error; File f = BirdFont.get_settings_directory (); Font font = BirdFont.get_current_font ();- bool valid; font.set_name ("TEST_FONT"); @@ -237,7 +237,6 @@ public class Toolbox : GLib.Object { public static void redraw_tool_box () { Toolbox t = MainWindow.get_toolbox ();- warning ("redraw_tool_box"); t.redraw (0, 0, allocation_width, allocation_height); } @@ -322,8 +321,6 @@ public class Toolbox : GLib.Object { } public void update_expanders () {- Expander? p = null; - Expander pp; double pos; foreach (Expander e in current_set.get_expanders ()) {