1
Fork 0
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:
Andreas Kling 2019-03-29 19:48:15 +01:00
parent f6b48ecd47
commit eb182bcafc
4 changed files with 30 additions and 12 deletions

View file

@ -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);
}