mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:27:35 +00:00
LibGUI: Dynamically resize editing content rect in IconView
This makes IconView aware of the text width of the ModelEditingDelegate widget when editing an index and allows us to resize the content rect as needed. This also removes the border from the textbox since it could collide with the icon in ColumnsView. While editing we also skip painting the inactive selection rect since it would otherwise show when the content rect gets smaller.
This commit is contained in:
parent
207319ecf1
commit
0583f75926
6 changed files with 42 additions and 4 deletions
|
@ -152,6 +152,7 @@ protected:
|
|||
virtual void toggle_selection(const ModelIndex&);
|
||||
virtual void did_change_hovered_index([[maybe_unused]] const ModelIndex& old_index, [[maybe_unused]] const ModelIndex& new_index) { }
|
||||
virtual void did_change_cursor_index([[maybe_unused]] const ModelIndex& old_index, [[maybe_unused]] const ModelIndex& new_index) { }
|
||||
virtual void editing_widget_did_change([[maybe_unused]] const ModelIndex& index) { }
|
||||
|
||||
void draw_item_text(Gfx::Painter&, const ModelIndex&, bool, const Gfx::IntRect&, const StringView&, const Gfx::Font&, Gfx::TextAlignment, Gfx::TextElision, size_t search_highlighting_offset = 0);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue