]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
use the definitions in screen.h to determine the click area
authorRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Tue, 14 Nov 2023 17:09:34 +0000 (22:39 +0530)
committerRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Tue, 14 Nov 2023 17:09:34 +0000 (22:39 +0530)
vfo.c

diff --git a/vfo.c b/vfo.c
index 9d9956c025c6ede81dca042cb526a27ecdf94816..d020e3f2c01d900b27bed4acd08d942418ff9713 100644 (file)
--- a/vfo.c
+++ b/vfo.c
@@ -1359,11 +1359,13 @@ static gboolean vfo_press_event_cb(GtkWidget *widget, GdkEventButton *event,
                                    gpointer data) {
     // vfo a and b are drawn at x = 280, so it is the y coordinate
     // that matters.
-    if (event->x >= 260 && event->y <= 40) {
+    if (event->x >= VFO_B_X && event->y <= VFO_B_Y) {
         // vfo B
         start_vfo(VFO_B);
         return TRUE;
-    } else if (event->x >= 260 && event->y > 40) {
+    } else if (event->x >= VFO_A_X &&
+              event->y > VFO_B_Y &&
+              event->y <= VFO_A_Y) {
         // vfo A
         start_vfo(VFO_A);
         return TRUE;