1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:47:44 +00:00

LibGUI: Fix broken TreeView rendering with more than two columns

The computation of the tree column x offset was not taking padding into
account. This patch fixes that and collects the logic in a helper.
This commit is contained in:
Andreas Kling 2020-03-02 21:36:01 +01:00
parent 2719d6d502
commit 8e8e8c801c
2 changed files with 18 additions and 13 deletions

View file

@ -59,6 +59,7 @@ private:
int icon_spacing() const { return 2; }
int toggle_size() const { return 9; }
int text_padding() const { return 2; }
int tree_column_x_offset() const;
virtual void toggle_index(const ModelIndex&) override;
virtual void update_column_sizes() override;