Project

General

Profile

Actions

Improvements #13574

open

checkbox in WTableView header is not exactly in the center

Added by Korneel Dumon about 1 month ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
02/25/2025
Due date:
% Done:

0%

Estimated time:

Description

When the first column consists entirely of checkboxes then the header is not aligned with the rest of the column:

I tested it in the widgetgallery by modifying SmallTableView.cpp like this:

...
auto model = csvToModel(WApplication::appRoot() + "table.csv");
model->setHeaderFlags(0, Wt::Orientation::Horizontal, Wt::HeaderFlag::UserCheckable);
model->setHeaderData(0, Wt::Orientation::Horizontal, {});
model->setHeaderData(0, Wt::Orientation::Horizontal, Wt::CheckState::Checked, Wt::ItemDataRole::Checked);
for (std::size_t i=0; i < model->rowCount(); ++i) {
  auto item = model->item(i, 0);
  item->setText("");
  item->setCheckable(true);
}
tableView->setModel(model);
...

Files

clipboard-202502251454-zptin.png (12.5 KB) clipboard-202502251454-zptin.png Korneel Dumon, 02/25/2025 02:54 PM

No data to display

Actions

Also available in: Atom PDF