Project

General

Profile

Actions

Bug #11882

closed

Bootstrap theme breaks layout of WGroupBox

Added by Andreas Frolov 10 months ago. Updated 7 months ago.

Status:
Closed
Priority:
Normal
Target version:
Start date:
08/17/2023
Due date:
% Done:

100%

Estimated time:

Description

The problem occurs when a layout of WGroupBox is a WGridLayout and has a nested layout. Widgets are positioned outside the GroupBox and are invisible.

Here is an example:

Wt::WApplication::instance()->setTheme(std::make_shared<Wt::WBootstrap5Theme>()); // comment out to avoid the problem

auto layout = std::make_unique<Wt::WVBoxLayout>();

auto group = layout->addWidget(std::make_unique<Wt::WGroupBox>("Group"));

auto groupLayout = std::make_unique<Wt::WGridLayout>();

groupLayout->addWidget(std::make_unique<Wt::WLabel>("Label"), 0, 0);

auto buttonsLayout = std::make_unique<Wt::WVBoxLayout>();
buttonsLayout->addWidget(std::make_unique<Wt::WPushButton>("Button"));

groupLayout->addLayout(std::move(buttonsLayout), 0, 1);

group->setLayout(std::move(groupLayout));

auto dialog = std::make_unique<Wt::WDialog>("Dialog");
dialog->contents()->setLayout(std::move(layout));
// Without resizing, the layout isn't right even with the default theme, but widgets are at least visible
dialog->resize(500, 500);
dialog->exec();
Actions #1

Updated by Matthias Van Ceulebroeck 9 months ago

  • Target version set to 4.10.2
Actions #2

Updated by Matthias Van Ceulebroeck 9 months ago

  • Status changed from New to InProgress
  • Assignee set to Matthias Van Ceulebroeck
Actions #3

Updated by Matthias Van Ceulebroeck 9 months ago

  • Status changed from InProgress to Review
  • Assignee deleted (Matthias Van Ceulebroeck)
Actions #4

Updated by Matthias Van Ceulebroeck 9 months ago

  • Assignee set to Marnik Roosen
Actions #5

Updated by Matthias Van Ceulebroeck 9 months ago

  • Status changed from Review to Resolved
  • Assignee changed from Marnik Roosen to Matthias Van Ceulebroeck
Actions #6

Updated by Matthias Van Ceulebroeck 8 months ago

  • Status changed from Resolved to Implemented @Emweb
  • % Done changed from 0 to 100
Actions #7

Updated by Matthias Van Ceulebroeck 7 months ago

  • Status changed from Implemented @Emweb to Closed
Actions

Also available in: Atom PDF