The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Remove old scroll code

These changes was commited to the Birdfont repository Wed, 17 Jun 2015 15:58:03 +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 15:58:03 +0000 (17:58 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Wed, 17 Jun 2015 15:58:03 +0000 (17:58 +0200)
commit f38d10b77bba49bbe0834ee2e114f74c89dee57d
tree b12c56cf946786c2baae3716b77ce4a50406713d
parent 298b645790d1c9fc030807ef6d1b57fe8671822b
Remove old scroll code

libbirdfont/Toolbox.vala
--- a/libbirdfont/Toolbox.vala +++ b/libbirdfont/Toolbox.vala @@ -238,33 +238,7 @@ } public void scroll_up (double x, double y) { - 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)) { - action = t.scroll_wheel_up_action (t); - press_tool = t; - } - } - } - } - } - - if (!action) { - scroll_current_set (35); - } - - redraw_tool_box (); + scroll_wheel (x, y, 0, -10); } void scroll_current_set (double d) { @@ -285,28 +259,7 @@ } public void scroll_down (double x, double y) { - bool action = false; - - y -= current_set.scroll; - - 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)) { - action = t.scroll_wheel_down_action (t); - press_tool = t; - } - } - } - } - } - - if (!action) { - scroll_current_set (-35); - } - - redraw_tool_box (); + scroll_wheel (x, y, 0, 10); } void suppress_scroll () {