The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Merge branch '2.10'

These changes was commited to the Birdfont repository Wed, 17 Jun 2015 10:42:52 +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>
Wed, 17 Jun 2015 10:42:52 +0000 (12:42 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Wed, 17 Jun 2015 10:42:52 +0000 (12:42 +0200)
commit 298b645790d1c9fc030807ef6d1b57fe8671822b
tree 61cfe15df37a9ad1b05c58e5eff9ab208cf4c3f4
parent c95f61aa6211f62c5fe6a9c4a5f567f29f1eee7a
parent f14b7ccc2d563c0d6f025e35e1d4e0abc05beede
Merge branch '2.10'

libbirdfont/Toolbox.vala
--- a/libbirdfont/Toolbox.vala +++ b/libbirdfont/Toolbox.vala @@ -201,6 +201,40 @@ } } } + } + + public void scroll_wheel (double x, double y, double dx, double dy) { + bool action = false; + + y -= current_set.scroll; + + if (MenuTab.suppress_event) { + warn_if_test ("Event suppressed"); + return; + } + + if (!scrolling_toolbox) { + foreach (Expander exp in current_set.get_expanders ()) { + if (exp.visible) { + foreach (Tool t in exp.tool) { + if (t.tool_is_visible () && t.is_over (x, y)) { + if (dy < 0) { + action = t.scroll_wheel_up_action (t); + } else { + action = t.scroll_wheel_down_action (t); + } + press_tool = t; + } + } + } + } + } + + if (!action) { + scroll_current_set (dy); + } + + redraw_tool_box (); } public void scroll_up (double x, double y) {