summaryrefslogtreecommitdiff
path: root/iup/src/iup_box.c
diff options
context:
space:
mode:
Diffstat (limited to 'iup/src/iup_box.c')
-rwxr-xr-xiup/src/iup_box.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/iup/src/iup_box.c b/iup/src/iup_box.c
index 54e56d9..111cab4 100755
--- a/iup/src/iup_box.c
+++ b/iup/src/iup_box.c
@@ -172,9 +172,9 @@ static int iBoxSetCMarginAttrib(Ihandle* ih, const char* value)
iupdrvFontGetCharSize(ih, &charwidth, &charheight);
iupStrToIntInt(value, &cmargin_x, &cmargin_y, 'x');
if (cmargin_x!=-1)
- ih->data->margin_x = iupHEIGHT2RASTER(cmargin_x, charheight);
+ ih->data->margin_x = iupWIDTH2RASTER(cmargin_x, charwidth);
if (cmargin_y!=-1)
- ih->data->margin_x = iupWIDTH2RASTER(cmargin_y, charwidth);
+ ih->data->margin_y = iupHEIGHT2RASTER(cmargin_y, charheight);
return 0;
}
@@ -227,8 +227,12 @@ Iclass* iupBoxClassBase(void)
/* boxes only */
iupClassRegisterAttribute(ic, "GAP", iBoxGetGapAttrib, iBoxSetGapAttrib, IUPAF_SAMEASSYSTEM, "0", IUPAF_NOT_MAPPED);
iupClassRegisterAttribute(ic, "CGAP", iBoxGetCGapAttrib, iBoxSetCGapAttrib, IUPAF_SAMEASSYSTEM, "0", IUPAF_NOT_MAPPED);
+ iupClassRegisterAttribute(ic, "NGAP", iBoxGetGapAttrib, iBoxSetGapAttrib, IUPAF_SAMEASSYSTEM, "0", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT);
+ iupClassRegisterAttribute(ic, "NCGAP", iBoxGetCGapAttrib, iBoxSetCGapAttrib, IUPAF_SAMEASSYSTEM, "0", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "MARGIN", iBoxGetMarginAttrib, iBoxSetMarginAttrib, IUPAF_SAMEASSYSTEM, "0x0", IUPAF_NOT_MAPPED);
iupClassRegisterAttribute(ic, "CMARGIN", iBoxGetCMarginAttrib, iBoxSetCMarginAttrib, IUPAF_SAMEASSYSTEM, "0x0", IUPAF_NOT_MAPPED);
+ iupClassRegisterAttribute(ic, "NMARGIN", iBoxGetMarginAttrib, iBoxSetMarginAttrib, IUPAF_SAMEASSYSTEM, "0x0", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT);
+ iupClassRegisterAttribute(ic, "NCMARGIN", iBoxGetCMarginAttrib, iBoxSetCMarginAttrib, IUPAF_SAMEASSYSTEM, "0x0", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "EXPANDCHILDREN", iBoxGetExpandChildrenAttrib, iBoxSetExpandChildrenAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "HOMOGENEOUS", iBoxGetHomogeneousAttrib, iBoxSetHomogeneousAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT);