diff options
-rw-r--r-- | src/ui/widget.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/ui/widget.c b/src/ui/widget.c index 18f98050..4749de23 100644 --- a/src/ui/widget.c +++ b/src/ui/widget.c | |||
@@ -699,25 +699,23 @@ static void arrange_Widget_(iWidget *d) { | |||
699 | TRACE(d, "END"); | 699 | TRACE(d, "END"); |
700 | } | 700 | } |
701 | 701 | ||
702 | #if 0 | 702 | static void resetArrangement_Widget_(iWidget *d) { |
703 | void resetSize_Widget(iWidget *d) { | ||
704 | if (~d->flags & fixedWidth_WidgetFlag) { | ||
705 | d->rect.size.x = d->minSize.x; | ||
706 | } | ||
707 | if (~d->flags & fixedHeight_WidgetFlag) { | ||
708 | d->rect.size.y = d->minSize.y; | ||
709 | } | ||
710 | iForEach(ObjectList, i, children_Widget(d)) { | 703 | iForEach(ObjectList, i, children_Widget(d)) { |
711 | iWidget *child = as_Widget(i.object); | 704 | iWidget *child = as_Widget(i.object); |
712 | if (isArrangedSize_Widget_(child)) { | 705 | resetArrangement_Widget_(child); |
713 | resetSize_Widget(child); | 706 | if (isArrangedPos_Widget_(child)) { |
707 | if (d->flags & arrangeHorizontal_WidgetFlag) { | ||
708 | child->rect.pos.x = 0; | ||
709 | } | ||
710 | if (d->flags & arrangeVertical_WidgetFlag) { | ||
711 | child->rect.pos.y = 0; | ||
712 | } | ||
714 | } | 713 | } |
715 | } | 714 | } |
716 | } | 715 | } |
717 | #endif | ||
718 | 716 | ||
719 | void arrange_Widget(iWidget *d) { | 717 | void arrange_Widget(iWidget *d) { |
720 | //resetSize_Widget_(d); /* back to initial default sizes */ | 718 | resetArrangement_Widget_(d); /* back to initial default sizes */ |
721 | arrange_Widget_(d); | 719 | arrange_Widget_(d); |
722 | } | 720 | } |
723 | 721 | ||