button3 right click on signal names in graphs works now better, no context menu in the way.
This commit is contained in:
parent
aa493783ac
commit
3efe7bfbec
|
|
@ -38,7 +38,7 @@ static int waves_selected(int event, KeySym key, int state, int button)
|
||||||
static double tk_scaling = 1.0;
|
static double tk_scaling = 1.0;
|
||||||
int border;
|
int border;
|
||||||
tk_scaling = atof(tcleval("tk scaling"));
|
tk_scaling = atof(tcleval("tk scaling"));
|
||||||
border = (int)(5.0 * tk_scaling * xctx->zoom); /* fixed number of screen pixels */
|
border = (int)(5.0 * tk_scaling); /* fixed number of screen pixels */
|
||||||
rstate = state; /* rstate does not have ShiftMask bit, so easier to test for KeyPress events */
|
rstate = state; /* rstate does not have ShiftMask bit, so easier to test for KeyPress events */
|
||||||
rstate &= ~ShiftMask; /* don't use ShiftMask, identifying characters is sufficient */
|
rstate &= ~ShiftMask; /* don't use ShiftMask, identifying characters is sufficient */
|
||||||
if(xctx->ui_state & excl) skip = 1;
|
if(xctx->ui_state & excl) skip = 1;
|
||||||
|
|
@ -66,6 +66,11 @@ static int waves_selected(int event, KeySym key, int state, int button)
|
||||||
|
|
||||||
check =
|
check =
|
||||||
(xctx->ui_state & GRAPHPAN) ||
|
(xctx->ui_state & GRAPHPAN) ||
|
||||||
|
((event == ButtonPress || event == ButtonRelease) && button == Button3 &&
|
||||||
|
(
|
||||||
|
POINTINSIDE(xctx->mousex, xctx->mousey, r->x1, r->y1, r->x2, r->y2)
|
||||||
|
)
|
||||||
|
) ||
|
||||||
(event != -3 &&
|
(event != -3 &&
|
||||||
(
|
(
|
||||||
POINTINSIDE(xctx->mousex, xctx->mousey, r->x1 + border, r->y1 + border, r->x2 - border, r->y2 - border)
|
POINTINSIDE(xctx->mousex, xctx->mousey, r->x1 + border, r->y1 + border, r->x2 - border, r->y2 - border)
|
||||||
|
|
|
||||||
12
src/draw.c
12
src/draw.c
|
|
@ -3039,6 +3039,13 @@ static void draw_graph_grid(Graph_ctx *gr, void *ct)
|
||||||
int j, k;
|
int j, k;
|
||||||
double mark_size = gr->marginy/10.0;
|
double mark_size = gr->marginy/10.0;
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
static double tk_scaling = 1.0;
|
||||||
|
int border;
|
||||||
|
tk_scaling = atof(tcleval("tk scaling"));
|
||||||
|
border = (int)(5.0 * tk_scaling); /* fixed number of screen pixels */
|
||||||
|
#endif
|
||||||
|
|
||||||
/* calculate dash length for grid lines */
|
/* calculate dash length for grid lines */
|
||||||
dash_size = 1.5 * xctx->mooz;
|
dash_size = 1.5 * xctx->mooz;
|
||||||
dash_size = dash_size < 1.0 ? 0.0: (dash_size > 3.0 ? 3.0 : 2.0);
|
dash_size = dash_size < 1.0 ? 0.0: (dash_size > 3.0 ? 3.0 : 2.0);
|
||||||
|
|
@ -3049,6 +3056,11 @@ static void draw_graph_grid(Graph_ctx *gr, void *ct)
|
||||||
/* graph bounding box */
|
/* graph bounding box */
|
||||||
drawrect(GRIDLAYER, NOW, gr->rx1, gr->ry1, gr->rx2, gr->ry2, 2, -1, -1);
|
drawrect(GRIDLAYER, NOW, gr->rx1, gr->ry1, gr->rx2, gr->ry2, 2, -1, -1);
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
/* graph graph selection boundary */
|
||||||
|
drawrect(GRIDLAYER, NOW, gr->rx1+border, gr->ry1+border, gr->rx2-border, gr->ry2-border, 2, -1, -1);
|
||||||
|
#endif
|
||||||
|
|
||||||
bbox(START, 0.0, 0.0, 0.0, 0.0);
|
bbox(START, 0.0, 0.0, 0.0, 0.0);
|
||||||
bbox(ADD, gr->rx1, gr->ry1, gr->rx2, gr->ry2);
|
bbox(ADD, gr->rx1, gr->ry1, gr->rx2, gr->ry2);
|
||||||
bbox(SET_INSIDE, 0.0, 0.0, 0.0, 0.0);
|
bbox(SET_INSIDE, 0.0, 0.0, 0.0, 0.0);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue