mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-13 22:52:52 +00:00
LibGUI: Make GTreeView inherit from GAbstractColumnView
This makes GTreeView able to support multi-column models! Only one column can be the "tree column", this is column 0 by default but can be changed by overriding GModel::tree_column().
This commit is contained in:
parent
b909d991f1
commit
0ac74d3778
Notes:
sideshowbarker
2024-07-19 10:52:19 +09:00
Author: https://github.com/awesomekling
Commit: 0ac74d3778
7 changed files with 248 additions and 121 deletions
Libraries/LibGUI
|
@ -35,8 +35,9 @@ void GTableView::paint_event(GPaintEvent& event)
|
|||
int exposed_width = max(content_size().width(), width());
|
||||
int y_offset = header_height();
|
||||
|
||||
int first_visible_row = index_at_event_position(frame_inner_rect().top_left()).row();
|
||||
int last_visible_row = index_at_event_position(frame_inner_rect().bottom_right()).row();
|
||||
bool dummy;
|
||||
int first_visible_row = index_at_event_position(frame_inner_rect().top_left(), dummy).row();
|
||||
int last_visible_row = index_at_event_position(frame_inner_rect().bottom_right(), dummy).row();
|
||||
|
||||
if (first_visible_row == -1)
|
||||
first_visible_row = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue