1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:17:35 +00:00

GTreeView: Notify the GScrollableWidget about content size changes.

This makes the tree view scrollable at last.
This commit is contained in:
Andreas Kling 2019-03-30 04:57:57 +01:00
parent 6ab55801e2
commit de57628a46
2 changed files with 43 additions and 10 deletions

View file

@ -14,6 +14,7 @@ protected:
virtual void paint_event(GPaintEvent&) override;
virtual void mousedown_event(GMouseEvent&) override;
virtual void did_update_selection() override;
virtual void did_update_model() override;
private:
GModelIndex index_at_content_position(const Point&, bool& is_toggle) const;
@ -24,6 +25,7 @@ private:
int icon_spacing() const { return 2; }
int toggle_size() const { return 9; }
int text_padding() const { return 2; }
void update_content_size();
template<typename Callback>
void traverse_in_paint_order(Callback) const;