--- a/ui/qt/container.cpp Fri Jul 18 21:49:29 2025 +0200 +++ b/ui/qt/container.cpp Fri Jul 18 21:54:33 2025 +0200 @@ -60,17 +60,14 @@ ui_reset_layout(layout); } -void UiBoxContainer::add(QWidget* widget, bool fill) { - if(layout.fill != UI_LAYOUT_UNDEFINED) { - fill = ui_lb2bool(layout.fill); - } - +void UiBoxContainer::add(QWidget* widget) { + bool fill = layout.fill; if(hasStretchedWidget && fill) { fill = false; fprintf(stderr, "UiError: container has 2 filled widgets"); } - box->addWidget(widget, fill); + box->addWidget(widget); if(!hasStretchedWidget) { QSpacerItem *newspace = new QSpacerItem(0, 0, QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); @@ -93,7 +90,7 @@ QWidget *widget = new QWidget(); QBoxLayout *box = new QBoxLayout(dir); widget->setLayout(box); - ctn->add(widget, true); + ctn->add(widget); ui_container_add(obj, new UiBoxContainer(box)); @@ -133,16 +130,17 @@ ui_reset_layout(layout); } -void UiGridContainer::add(QWidget* widget, bool fill) { +void UiGridContainer::add(QWidget* widget) { if(layout.newline) { x = 0; y++; } - int hexpand = false; - int vexpand = false; - int hfill = false; - int vfill = false; + bool fill = layout.fill; + bool hexpand = false; + bool vexpand = false; + bool hfill = false; + bool vfill = false; if(!layout.override_defaults) { if(def_hexpand) { hexpand = true; @@ -158,9 +156,6 @@ } } - if(layout.fill != UI_LAYOUT_UNDEFINED) { - fill = ui_lb2bool(layout.fill); - } if(layout.hexpand) { hexpand = true; //hfill = true; @@ -240,7 +235,7 @@ QWidget *widget = new QWidget(); QGridLayout *grid = new QGridLayout(); widget->setLayout(grid); - ctn->add(widget, true); + ctn->add(widget); ui_container_add(obj, new UiGridContainer( grid,