diff --git a/examples/basic/box.c b/examples/basic/box.c index adbba79..1b37168 100644 --- a/examples/basic/box.c +++ b/examples/basic/box.c @@ -26,21 +26,21 @@ int main() { box = MwVaCreateWidget(MwBoxClass, "box", window, 0, 0, 0, 0, MwNpadding, 10, - MwNspacing, 10, + MwNmargin, 10, NULL); box2 = MwVaCreateWidget(MwBoxClass, "box2", box, 0, 0, 0, 0, - MwNspacing, 10, + MwNmargin, 10, MwNorientation, MwVERTICAL, NULL); box3 = MwVaCreateWidget(MwBoxClass, "box3", box, 0, 0, 0, 0, - MwNspacing, 10, + MwNmargin, 10, MwNorientation, MwVERTICAL, NULL); box4 = MwVaCreateWidget(MwBoxClass, "box4", box, 0, 0, 0, 0, - MwNspacing, 10, + MwNmargin, 10, MwNorientation, MwVERTICAL, MwNfixedSize, 40, NULL); diff --git a/include/Mw/StringDefs.h b/include/Mw/StringDefs.h index d4e96a7..0711373 100644 --- a/include/Mw/StringDefs.h +++ b/include/Mw/StringDefs.h @@ -34,7 +34,7 @@ #define MwNfillArea "IfillArea" #define MwNratio "Iratio" #define MwNfixedSize "IfixedSize" -#define MwNspacing "Ispacing" +#define MwNmargin "Imargin" #define MwNtitle "Stitle" #define MwNtext "Stext" diff --git a/milsko.xml b/milsko.xml index 6b92938..f7f5bae 100644 --- a/milsko.xml +++ b/milsko.xml @@ -86,7 +86,7 @@ - + @@ -491,7 +491,7 @@ - + diff --git a/src/widget/box.c b/src/widget/box.c index 4526d7e..2c47137 100644 --- a/src/widget/box.c +++ b/src/widget/box.c @@ -6,7 +6,7 @@ static int create(MwWidget handle) { MwSetDefault(handle); MwSetInteger(handle, MwNorientation, MwHORIZONTAL); - MwSetInteger(handle, MwNspacing, 0); + MwSetInteger(handle, MwNmargin, 0); MwSetInteger(handle, MwNpadding, 0); return 0; @@ -39,7 +39,7 @@ static void layout(MwWidget handle) { if(n == MwDEFAULT) n = 1; if(s != MwDEFAULT) { - sz -= s + ((i != (arrlen(handle->children) - 1)) ? MwGetInteger(handle, MwNspacing) : 0); + sz -= s + ((i != (arrlen(handle->children) - 1)) ? MwGetInteger(handle, MwNmargin) : 0); } else { sum += n; } @@ -56,7 +56,7 @@ static void layout(MwWidget handle) { } else { wsz = sz * n / sum; } - wsz -= ((i != (arrlen(handle->children) - 1)) ? MwGetInteger(handle, MwNspacing) : 0); + wsz -= ((i != (arrlen(handle->children) - 1)) ? MwGetInteger(handle, MwNmargin) : 0); MwVaApply(handle->children[i], horiz ? MwNx : MwNy, sk, /* this is what gets changed */ @@ -64,7 +64,7 @@ static void layout(MwWidget handle) { horiz ? MwNwidth : MwNheight, wsz, /* this is what gets changed */ horiz ? MwNheight : MwNwidth, fsz, /* fixed between widgets */ NULL); - sk += wsz + ((i != (arrlen(handle->children) - 1)) ? MwGetInteger(handle, MwNspacing) : 0); + sk += wsz + ((i != (arrlen(handle->children) - 1)) ? MwGetInteger(handle, MwNmargin) : 0); } }