The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – RSS feed

Set scale parameter for tool box icons

These changes was commited to the Birdfont repository Tue, 10 Mar 2015 17:51:56 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
[Tue, 10 Mar 2015 17:51:56 +0000]

Updated Files

libbirdfont/Toolbox.vala
--- a/libbirdfont/Toolbox.vala +++ b/libbirdfont/Toolbox.vala @@ -44,8 +44,12 @@ double scroll_y = 0; public List<ToolCollection> tool_sets = new List<ToolCollection> (); - + + 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 () {