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
commit eb182bcafc
Notes: sideshowbarker 2024-07-19 14:54:02 +09:00
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);
}