mirror of
https://github.com/RGBCube/serenity
synced 2025-05-19 03:05:06 +00:00
LibGUI: Draw a 1px line tree alongside the GTreeView icons.
This commit is contained in:
parent
f6b48ecd47
commit
eb182bcafc
4 changed files with 30 additions and 12 deletions
|
@ -49,3 +49,13 @@ GModelIndex GModel::create_index(int row, int column, void* data) const
|
|||
{
|
||||
return GModelIndex(*this, row, column, data);
|
||||
}
|
||||
|
||||
GModelIndex GModel::sibling(int row, int column, const GModelIndex& parent) const
|
||||
{
|
||||
if (!parent.is_valid())
|
||||
return { };
|
||||
int row_count = this->row_count(parent);
|
||||
if (row < 0 || row > row_count)
|
||||
return { };
|
||||
return index(row, column, parent);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue