diff options
author | Marcus Nilsson <brainbomb@gmail.com> | 2021-09-05 13:32:23 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-06 17:38:26 +0200 |
commit | 0583f75926b0842f582efdcc4870116bc3c79382 (patch) | |
tree | 8664502c87e1e8f11d12052618556d06b08008d2 /Userland/Libraries/LibGUI/AbstractView.h | |
parent | 207319ecf1d5b6ba6e5c0df820bb542e9c2dce92 (diff) | |
download | serenity-0583f75926b0842f582efdcc4870116bc3c79382.zip |
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.
Diffstat (limited to 'Userland/Libraries/LibGUI/AbstractView.h')
-rw-r--r-- | Userland/Libraries/LibGUI/AbstractView.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGUI/AbstractView.h b/Userland/Libraries/LibGUI/AbstractView.h index 2fbb86ae64..fce68e8bc7 100644 --- a/Userland/Libraries/LibGUI/AbstractView.h +++ b/Userland/Libraries/LibGUI/AbstractView.h @@ -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); |