Commit e0d40474 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

fix [bng] button appearance

fix "pos" method for [nbx]
parent 11f858ea
......@@ -2335,8 +2335,8 @@ function gui_hide_selection_rectangle(cid) {
function gui_create_bng(cid, tag, cx, cy, radius) {
var g = get_gobj(cid, tag);
var circle = create_item(cid, 'circle', {
cx: cx + 0.5,
cy: cy + 0.5,
cx: cx,
cy: cy,
r: radius,
'shape-rendering': 'auto',
fill: 'none',
......@@ -2433,7 +2433,8 @@ gui_post("basex is " + basex + " and basey is " + basey);
fill: bgcolor,
stroke: 'black',
'stroke-width': 1,
id: (tag + 'border')
id: (tag + 'border'),
'class': 'border'
});
g.appendChild(border);
}
......
......@@ -59,7 +59,7 @@ void bng_draw_new(t_bng *x, t_glist *glist)
// canvas, cx, cy, cr, x->x_flashed?x->x_gui.x_fcol:x->x_gui.x_bcol,
// x, x);
gui_vmess("gui_create_bng", "xsfff", canvas, tagbuf,
cx - x1 - 0.5, cy - y1 - 0.5, cr);
cx - x1, cy - y1, cr);
}
void bng_draw_move(t_bng *x, t_glist *glist)
......@@ -84,9 +84,9 @@ void bng_draw_move(t_bng *x, t_glist *glist)
canvas, tagbuf);
gui_start_array();
gui_s("cx");
gui_f(cx - x1 - 0.5); // 0.5 is fudge factor... might be better
gui_f(cx - x1); // 0.5 is fudge factor... might be better
gui_s("cy");
gui_f(cy - y1 - 0.5); // handled by shape-rendering css attr
gui_f(cy - y1); // handled by shape-rendering css attr
gui_s("r");
gui_f(cr);
gui_s("fill");
......
......@@ -207,6 +207,8 @@ static void my_numbox_draw_move(t_my_numbox *x, t_glist *glist)
int x1=text_xpix(&x->x_gui.x_obj, glist), x2=x1+x->x_numwidth;
int y1=text_ypix(&x->x_gui.x_obj, glist), y2=y1+x->x_gui.x_h;
iemgui_base_draw_move(&x->x_gui);
//sys_vgui(".x%lx.c coords %lxBASE1 %d %d %d %d %d %d %d %d %d %d\n",
// canvas, x, x1, y1, x2-4, y1, x2, y1+4, x2, y2, x1, y2);
if (x->x_hide_frame <= 1)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment