Skip to content

Commit

Permalink
Merge pull request #3 from g0orx/master
Browse files Browse the repository at this point in the history
resync
  • Loading branch information
m5evt authored Apr 28, 2020
2 parents 5d6e8ad + a3112a9 commit 53139d4
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions receiver.c
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,30 @@ gboolean receiver_motion_notify_event_cb(GtkWidget *widget, GdkEventMotion *even

gboolean receiver_scroll_event_cb(GtkWidget *widget, GdkEventScroll *event, gpointer data) {
RECEIVER *rx=(RECEIVER *)data;
int x=(int)event->x;
int y=(int)event->y;
int half=rx->panadapter_height/2;

if(!rx->locked) {
if((x>4 && x<35) && (widget==rx->panadapter)) {
if(event->direction==GDK_SCROLL_UP) {

if(y<half) {
rx->panadapter_high=rx->panadapter_high-5;
} else {
rx->panadapter_low=rx->panadapter_low-5;
}
return TRUE;
} else {
if(y<half) {
rx->panadapter_high=rx->panadapter_high+5;
} else {
rx->panadapter_low=rx->panadapter_low+5;
}
return TRUE;
}
}

if(event->direction==GDK_SCROLL_UP) {
if(rx->ctun) {
rx->ctun_offset+=rx->step;
Expand Down

0 comments on commit 53139d4

Please sign in to comment.