diff --git a/pd/src/g_all_guis.c b/pd/src/g_all_guis.c index 0cf62ce207cbf795fab9b44269ddd2e66e64d9ce..2194b67c86f3e3b106bc220fc9465c46f36514a9 100644 --- a/pd/src/g_all_guis.c +++ b/pd/src/g_all_guis.c @@ -502,9 +502,8 @@ void iemgui_select(t_gobj *z, t_glist *glist, int selected) x->x_selected = canvas; else x->x_selected = NULL; - char fcol[8]; sprintf(fcol,"#%6.6x", x->x_fcol); sys_vgui(".x%lx.c itemconfigure {x%lx&&border} -stroke %s\n", canvas, x, - x->x_selected && x->x_glist == canvas ? selection_color : fcol); + x->x_selected && x->x_glist == canvas ? selection_color : border_color); x->x_draw((void *)z, glist, IEM_GUI_DRAW_MODE_SELECT); if (selected < 2) { @@ -1184,6 +1183,7 @@ void g_iemgui_setup (void) { } const char *selection_color = "$pd_colors(selection)"; +const char *border_color = "$pd_colors(iemgui_border)"; #define GET_OUTLET t_outlet *out = x->x_obj.ob_outlet; /* can't use int o because there's not obj_nth_outlet function */ #define SEND_BY_SYMBOL (iemgui_has_snd(x) && x->x_snd->s_thing && (!chk_putin || x->x_put_in2out)) diff --git a/pd/src/g_all_guis.h b/pd/src/g_all_guis.h index 9f8dd9659a340164e4be209e63c79144a8814131..3a065e21fe4573973fc0e0e56526f3b623651f65 100644 --- a/pd/src/g_all_guis.h +++ b/pd/src/g_all_guis.h @@ -267,6 +267,7 @@ EXTERN void wb_init(t_widgetbehavior *wb, t_getrectfn gr, t_clickfn cl); // rena extern t_symbol *s_empty; EXTERN const char *selection_color; +EXTERN const char *border_color; static inline int iemgui_has_snd (t_iemgui *x) {return x->x_snd!=s_empty;} static inline int iemgui_has_rcv (t_iemgui *x) {return x->x_rcv!=s_empty;} diff --git a/pd/src/g_radio.c b/pd/src/g_radio.c index cf7cd690edcbd3482b0e2ae8a7468c21d7d350f2..ca476b52678797997cc01a8fce5bfbd6ac2ff0e4 100644 --- a/pd/src/g_radio.c +++ b/pd/src/g_radio.c @@ -44,9 +44,9 @@ void radio_draw_new(t_radio *x, t_glist *glist) iemgui_base_draw_new(&x->x_gui); for(i=0; i<n; i++) if (x->x_orient) { - if (i) sys_vgui(".x%lx.c create pline %d %d %d %d " + if (i) sys_vgui(".x%lx.c create prect %d %d %d %d " "-stroke $pd_colors(iemgui_border) " - "-tags {%lxBASE%d %lxBASEL x%lx text iemgui border}\n", + "-tags {%lxBASE%d %lxBASE x%lx text iemgui border}\n", canvas, x1, yi, x1+d, yi, x, i, x, x); sys_vgui(".x%lx.c create prect %d %d %d %d -fill #%6.6x " "-stroke #%6.6x -tags {%lxBUT%d x%lx text iemgui}\n", @@ -57,9 +57,9 @@ void radio_draw_new(t_radio *x, t_glist *glist) yi += d; x->x_drawn = x->x_on; } else { - if (i) sys_vgui(".x%lx.c create pline %d %d %d %d " + if (i) sys_vgui(".x%lx.c create prect %d %d %d %d " "-stroke $pd_colors(iemgui_border) " - "-tags {%lxBASE%d %lxBASEL x%lx text iemgui border}\n", + "-tags {%lxBASE%d %lxBASE x%lx text iemgui border}\n", canvas, xi, y1, xi, y1+d, x, i, x, x); sys_vgui(".x%lx.c create prect %d %d %d %d -fill #%6.6x " "-stroke #%6.6x -tags {%lxBUT%d x%lx text iemgui}\n",