1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 18:10:56 +09:00

LibGUI: Support double-click resizing column headers

Columns can now be best-fit resized by double-clicking their
grabbable edges. When a default width is set and all data is empty,
double-clicking will restore the column to its original state.
This commit is contained in:
thankyouverycool 2021-03-17 20:11:44 -04:00 committed by Andreas Kling
parent 663fd9abb4
commit 3cc7862487
Notes: sideshowbarker 2024-07-18 21:15:12 +09:00
4 changed files with 93 additions and 0 deletions

View file

@ -58,6 +58,7 @@ public:
int column_width(int column) const;
void set_column_width(int column, int width);
void set_default_column_width(int column, int width);
Gfx::TextAlignment column_header_alignment(int column) const;
void set_column_header_alignment(int column, Gfx::TextAlignment);
@ -106,6 +107,7 @@ protected:
virtual void toggle_index(const ModelIndex&) { }
void update_content_size();
virtual void auto_resize_column(int column);
virtual void update_column_sizes();
virtual void update_row_sizes();
virtual int item_count() const;