diff options
author | Thomas O Fredericks <mrtof@users.sourceforge.net> | 2008-05-14 22:24:09 +0000 |
---|---|---|
committer | Thomas O Fredericks <mrtof@users.sourceforge.net> | 2008-05-14 22:24:09 +0000 |
commit | 94e2e7ba7e316f080c30c715cf4f2ebaf6584733 (patch) | |
tree | 012a04a2a3d98fe28fdd32b3692710f237065651 /src | |
parent | 3adbad6f33d27d9004f699779ca99fe0bfa2c5de (diff) |
Fixed a bug in the width of breakpoints widget
svn path=/trunk/externals/tof/; revision=9805
Diffstat (limited to 'src')
-rwxr-xr-x | src/breakpoints.c | 3 | ||||
-rwxr-xr-x | src/breakpoints~.c | 3 | ||||
-rwxr-xr-x | src/breakpoints~.h | 3 | ||||
-rwxr-xr-x | src/w_breakpoints.h | 8 |
4 files changed, 7 insertions, 10 deletions
diff --git a/src/breakpoints.c b/src/breakpoints.c index 587a025..8d7bbbe 100755 --- a/src/breakpoints.c +++ b/src/breakpoints.c @@ -14,7 +14,6 @@ #include "breakpoints~.h"
-#define BACKGROUNDWIDTH "1"
#include "w_breakpoints.h"
static t_class *breakpoints_class;
@@ -296,7 +295,7 @@ static void *breakpoints_new(t_symbol *s,int argc,t_atom* argv) {
t_breakpoints *x = (t_breakpoints *)pd_new(breakpoints_class);
-
+ x->borderwidth = 1;
x->x_f = 0;
x->args = STATES;
diff --git a/src/breakpoints~.c b/src/breakpoints~.c index 3ac2000..8e3b903 100755 --- a/src/breakpoints~.c +++ b/src/breakpoints~.c @@ -14,7 +14,6 @@ #include "breakpoints~.h"
-#define BACKGROUNDWIDTH "2"
#include "w_breakpoints.h"
static t_class *breakpoints_class;
@@ -327,7 +326,7 @@ static void *breakpoints_new(t_symbol *s,int argc,t_atom* argv) {
t_breakpoints *x = (t_breakpoints *)pd_new(breakpoints_class);
-
+ x->borderwidth = 2;
x->x_f = 0;
x->args = STATES;
diff --git a/src/breakpoints~.h b/src/breakpoints~.h index 27d6a6d..f973dac 100755 --- a/src/breakpoints~.h +++ b/src/breakpoints~.h @@ -32,7 +32,8 @@ typedef struct _breakpoints t_float totaldur;
t_int args; /* get rid of that */
t_int resizing;
- t_int resizeable;
+ t_int resizeable; + t_int borderwidth;
t_symbol* r_sym; //receive symbol
t_symbol* s_sym; //send symbol
diff --git a/src/w_breakpoints.h b/src/w_breakpoints.h index a44d793..14c326b 100755 --- a/src/w_breakpoints.h +++ b/src/w_breakpoints.h @@ -9,9 +9,7 @@ #define BACKGROUNDCOLOR "grey86"
#define LINECOLOR "grey30"
-#ifndef BACKGROUNDWIDTH
-#define BACKGROUNDWIDTH "1"
-#endif
+
#define BORDER 2
@@ -238,11 +236,11 @@ static void breakpoints_create(t_breakpoints *x, t_glist *glist) ypos = (int) text_ypix(&x->x_obj,glist);
x->w.numclock = clock_new(x, (t_method) breakpoints_delnum);
sys_vgui(".x%x.c create rectangle \
-%d %d %d %d -tags %xS -fill "BACKGROUNDCOLOR" -width "BACKGROUNDWIDTH"\n",
+%d %d %d %d -tags %xS -fill "BACKGROUNDCOLOR" -width %d\n",
glist_getcanvas(glist),
xpos-BORDER, ypos-BORDER,
xpos + x->w.width+2*BORDER, ypos + x->w.height+2*BORDER,
- x);
+ x,x->borderwidth);
xscale = x->w.width/x->duration[x->last_state];
yscale = x->w.height;
|