Fix containers Indent property.
[GB.GTK] * BUG: Fix containers Indent property. [GB.GTK3] * BUG: Fix containers Indent property. [GB.QT4] * BUG: Fix containers Indent property. [GB.QT5] * BUG: Fix containers Indent property.
This commit is contained in:
parent
ff3335e108
commit
66e1539a4f
5 changed files with 15 additions and 18 deletions
|
@ -159,9 +159,9 @@ END_PROPERTY
|
|||
BEGIN_PROPERTY(Container_Indent)
|
||||
|
||||
if (READ_PROPERTY)
|
||||
GB.ReturnInteger(WIDGET->indent());
|
||||
GB.ReturnBoolean(WIDGET->indent());
|
||||
else
|
||||
WIDGET->setMargin(VPROP(GB_INTEGER));
|
||||
WIDGET->setIndent(VPROP(GB_BOOLEAN));
|
||||
|
||||
END_PROPERTY
|
||||
|
||||
|
@ -536,10 +536,10 @@ END_PROPERTY
|
|||
BEGIN_PROPERTY(UserContainer_Indent)
|
||||
|
||||
if (READ_PROPERTY)
|
||||
GB.ReturnInteger(WIDGET_CONT->indent());
|
||||
GB.ReturnBoolean(WIDGET_CONT->indent());
|
||||
else
|
||||
{
|
||||
WIDGET_CONT->setIndent(VPROP(GB_INTEGER));
|
||||
WIDGET_CONT->setIndent(VPROP(GB_BOOLEAN));
|
||||
THIS_UC->save = WIDGET_CONT->fullArrangement();
|
||||
}
|
||||
|
||||
|
|
|
@ -348,11 +348,9 @@ void gContainer::setMargin(bool vl)
|
|||
}
|
||||
}
|
||||
|
||||
void gContainer::setIndent(int vl)
|
||||
void gContainer::setIndent(bool vl)
|
||||
{
|
||||
if (vl < 0)
|
||||
vl = 1;
|
||||
if (vl >= 0 && vl <= 7 && vl != arrangement.indent)
|
||||
if (vl != arrangement.indent)
|
||||
{
|
||||
arrangement.indent = vl;
|
||||
performArrange();
|
||||
|
|
|
@ -34,11 +34,11 @@ struct gContainerArrangement
|
|||
unsigned margin : 1;
|
||||
unsigned spacing : 1;
|
||||
unsigned padding : 8;
|
||||
unsigned indent : 4;
|
||||
unsigned indent : 1;
|
||||
unsigned dirty : 1;
|
||||
unsigned autoresize : 1;
|
||||
unsigned invert : 1;
|
||||
unsigned _reserved: 9;
|
||||
unsigned _reserved: 12;
|
||||
};
|
||||
|
||||
class gContainer : public gControl
|
||||
|
@ -54,7 +54,7 @@ public:
|
|||
int padding() const { return arrangement.padding; }
|
||||
bool spacing() const { return arrangement.spacing; }
|
||||
bool margin() const { return arrangement.margin; }
|
||||
int indent() const { return arrangement.indent; }
|
||||
bool indent() const { return arrangement.indent; }
|
||||
bool invert() const { return arrangement.invert; }
|
||||
|
||||
virtual int clientWidth();
|
||||
|
@ -72,7 +72,7 @@ public:
|
|||
void setPadding(int vl);
|
||||
void setSpacing(bool vl);
|
||||
void setMargin(bool vl);
|
||||
void setIndent(int vl);
|
||||
void setIndent(bool vl);
|
||||
void setInvert(bool vl);
|
||||
|
||||
virtual int childCount() const;
|
||||
|
|
|
@ -1074,12 +1074,11 @@ END_PROPERTY
|
|||
BEGIN_PROPERTY(Container_Indent)
|
||||
|
||||
if (READ_PROPERTY)
|
||||
GB.ReturnInteger(THIS_ARRANGEMENT->indent);
|
||||
GB.ReturnBoolean(THIS_ARRANGEMENT->indent);
|
||||
else
|
||||
{
|
||||
int val = VPROP(GB_INTEGER);
|
||||
if (val < 0) val = 1;
|
||||
if (val != THIS_ARRANGEMENT->indent && val >= 0 && val <= 7)
|
||||
bool val = VPROP(GB_BOOLEAN);
|
||||
if (val != THIS_ARRANGEMENT->indent)
|
||||
{
|
||||
THIS_ARRANGEMENT->indent = val;
|
||||
arrange_now(CONTAINER);
|
||||
|
|
|
@ -44,11 +44,11 @@ typedef
|
|||
unsigned margin : 1;
|
||||
unsigned spacing : 1;
|
||||
unsigned padding : 8;
|
||||
unsigned indent : 4;
|
||||
unsigned indent : 1;
|
||||
unsigned dirty : 1;
|
||||
unsigned autoresize : 1;
|
||||
unsigned invert : 1;
|
||||
unsigned _reserved: 8;
|
||||
unsigned _reserved: 12;
|
||||
}
|
||||
CARRANGEMENT;
|
||||
|
||||
|
|
Loading…
Reference in a new issue