Skip to content

Commit

Permalink
Use struct version of scroll-event
Browse files Browse the repository at this point in the history
  • Loading branch information
gnunn1 committed Feb 11, 2017
1 parent d383eb8 commit a32fdf6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions source/gx/terminix/terminal/terminal.d
Original file line number Diff line number Diff line change
Expand Up @@ -1372,11 +1372,11 @@ private:
private:

// Note this event is binded dynamically so no need to check control wheel preference here
bool onTerminalScroll(Event event, Widget widget) {
if (vte !is null && (event.scroll.state & ModifierType.CONTROL_MASK) && !(event.scroll.state & ModifierType.SHIFT_MASK) && !(event.scroll.state & ModifierType.MOD1_MASK)) {
ScrollDirection zoomDirection = event.scroll.direction;
bool onTerminalScroll(GdkEventScroll* event, Widget widget) {
if (vte !is null && (event.state & ModifierType.CONTROL_MASK) && !(event.state & ModifierType.SHIFT_MASK) && !(event.state & ModifierType.MOD1_MASK)) {
ScrollDirection zoomDirection = event.direction;
if (zoomDirection == ScrollDirection.SMOOTH) {
zoomDirection = (event.scroll.deltaY <= 0)?ScrollDirection.UP: ScrollDirection.DOWN;
zoomDirection = (event.deltaY <= 0)?ScrollDirection.UP: ScrollDirection.DOWN;
}
if (zoomDirection == ScrollDirection.UP) {
zoomIn();
Expand Down

0 comments on commit a32fdf6

Please sign in to comment.