mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 07:44:57 +00:00
GTableView: Paint with white background when model-less
This matches the behavior of GTreeView.
This commit is contained in:
parent
489c6ac05c
commit
e52fe07d2e
1 changed files with 4 additions and 3 deletions
|
@ -250,15 +250,16 @@ void GTableView::paint_event(GPaintEvent& event)
|
|||
{
|
||||
GFrame::paint_event(event);
|
||||
|
||||
if (!model())
|
||||
return;
|
||||
|
||||
GPainter painter(*this);
|
||||
painter.add_clip_rect(frame_inner_rect());
|
||||
painter.add_clip_rect(event.rect());
|
||||
painter.fill_rect(event.rect(), Color::White);
|
||||
painter.translate(frame_thickness(), frame_thickness());
|
||||
painter.translate(-horizontal_scrollbar().value(), -vertical_scrollbar().value());
|
||||
|
||||
if (!model())
|
||||
return;
|
||||
|
||||
int exposed_width = max(content_size().width(), width());
|
||||
int y_offset = header_height();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue