From: Johan Mattsson Date: Tue, 10 Mar 2015 17:51:56 +0000 Subject: Set scale parameter for tool box icons X-Git-Url: http://birdfont.org/gitphp-glip/index.php?p=birdfont.git&a=commitdiff&h=afd3ffa9ed9098e48786d6cdf6aa81e9bf504654 --- Set scale parameter for tool box icons --- --- a/libbirdfont/Toolbox.vala +++ b/libbirdfont/Toolbox.vala @@ -44,8 +44,12 @@ double scroll_y = 0; public List tool_sets = new List (); - + + static double scale = 1; + public Toolbox (GlyphCanvas glyph_canvas, TabBar tab_bar) { + scale = Toolbox.allocation_width / 160.0; + current_tool = new Tool ("no_icon"); press_tool = new Tool (null); @@ -375,10 +379,14 @@ } b.select_tool (b.get_tool (name)); + } + + public static bool set_scale (double s) { + scale = s; } public static double get_scale () { - return Toolbox.allocation_width / 160.0; + return scale; } public void set_default_tool_size () {