better inner border selection area for graphs, easier to right click on signal names
This commit is contained in:
parent
b72c6885b9
commit
aa493783ac
|
|
@ -35,6 +35,10 @@ static int waves_selected(int event, KeySym key, int state, int button)
|
||||||
static unsigned int excl = STARTZOOM | STARTRECT | STARTLINE | STARTWIRE |
|
static unsigned int excl = STARTZOOM | STARTRECT | STARTLINE | STARTWIRE |
|
||||||
STARTPAN | STARTSELECT | STARTMOVE | STARTCOPY;
|
STARTPAN | STARTSELECT | STARTMOVE | STARTCOPY;
|
||||||
int draw_xhair = tclgetboolvar("draw_crosshair");
|
int draw_xhair = tclgetboolvar("draw_crosshair");
|
||||||
|
static double tk_scaling = 1.0;
|
||||||
|
int border;
|
||||||
|
tk_scaling = atof(tcleval("tk scaling"));
|
||||||
|
border = (int)(5.0 * tk_scaling * xctx->zoom); /* 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;
|
||||||
|
|
@ -64,12 +68,12 @@ static int waves_selected(int event, KeySym key, int state, int button)
|
||||||
(xctx->ui_state & GRAPHPAN) ||
|
(xctx->ui_state & GRAPHPAN) ||
|
||||||
(event != -3 &&
|
(event != -3 &&
|
||||||
(
|
(
|
||||||
POINTINSIDE(xctx->mousex, xctx->mousey, r->x1 + 5, r->y1 + 5, r->x2 - 5, r->y2 - 5)
|
POINTINSIDE(xctx->mousex, xctx->mousey, r->x1 + border, r->y1 + border, r->x2 - border, r->y2 - border)
|
||||||
)
|
)
|
||||||
) ||
|
) ||
|
||||||
(event == -3 && /* double click */
|
(event == -3 && /* double click */
|
||||||
(
|
(
|
||||||
POINTINSIDE(xctx->mousex, xctx->mousey, r->x1 + 5, r->y1 + 5, r->x2 - 5, r->y2 - 5)
|
POINTINSIDE(xctx->mousex, xctx->mousey, r->x1 + border, r->y1 + border, r->x2 - border, r->y2 - border)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue