Actions
Bug #10722
openWGridLayout does not calculate width or position correctly
Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
08/04/2022
Due date:
% Done:
0%
Estimated time:
Description
I use the following example to illustrate the problem.
void showDialog()
{
auto layout = std::make_unique<Wt::WGridLayout>();
layout->addWidget(std::make_unique<Wt::WLabel>("Label"), 0, 0);
layout->addWidget(std::make_unique<Wt::WLineEdit>(), 0, 1);
auto dialog = std::make_unique<Wt::WDialog>("Dialog");
dialog->contents()->setLayout(std::move(layout));
dialog->exec();
}
Application::Application(const Wt::WEnvironment& env)
: Wt::WApplication(env)
{
Wt::WLayout::setDefaultImplementation(Wt::LayoutImplementation::JavaScript);
setTheme(std::make_shared<Wt::WBootstrap5Theme>());
showDialog();
}
Layout looks correct on the first monitor.
But not on the second monitor.
Even if I move the browser window between monitors, the layout is displayed correctly/incorrectly. Strange. My monitors have different resolutions. Maybe it's because.
If I disable JavaScript
//Wt::WLayout::setDefaultImplementation(Wt::LayoutImplementation::JavaScript);
setTheme(std::make_shared<Wt::WBootstrap5Theme>()); // optional on or off
it looks like this
Only the JavaScript variant with the default theme
Wt::WLayout::setDefaultImplementation(Wt::LayoutImplementation::JavaScript);
//setTheme(std::make_shared<Wt::WBootstrap5Theme>());
always looks correct
Files
No data to display
Actions