The Birdfont Source Code


All Repositories / birdfont.git / commit – 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
author Johan Mattsson <johan.mattsson.m@gmail.com>
Tue, 10 Mar 2015 17:51:56 +0000 (18:51 +0100)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Tue, 10 Mar 2015 17:51:56 +0000 (18:51 +0100)
commit afd3ffa9ed9098e48786d6cdf6aa81e9bf504654
tree 926b9f94bc345967e3c50392f27517cd0af15c31
parent 838c511df9002e6a46108de63b6442366940c7b6
Set scale parameter for tool box icons

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 () {