diff options
author | Andreas Kling <kling@serenityos.org> | 2021-07-10 17:11:04 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-07-10 18:30:46 +0200 |
commit | df9638012197fc3a15ad1ece7a875ed805a9bce5 (patch) | |
tree | 119b0408e56f7eefce690d04e7368114718100a4 /Userland/Libraries/LibGUI/AbstractView.h | |
parent | 148e72bfa0a93e7ec5467b4dae7701f4ab9201f5 (diff) | |
download | serenity-df9638012197fc3a15ad1ece7a875ed805a9bce5.zip |
LibGUI: Tighten paint invalidation rects in item views :^)
AbstractView now has a paint_invalidation_rect(index) function that
subclasses can override to provide a tighter invalidation rect for
an index.
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 b2b1293d97..69f734c87f 100644 --- a/Userland/Libraries/LibGUI/AbstractView.h +++ b/Userland/Libraries/LibGUI/AbstractView.h @@ -90,6 +90,7 @@ public: virtual Gfx::IntRect content_rect(const ModelIndex&) const { return {}; } virtual Gfx::IntRect editing_rect(ModelIndex const& index) const { return content_rect(index); } + virtual Gfx::IntRect paint_invalidation_rect(ModelIndex const& index) const { return content_rect(index); } virtual ModelIndex index_at_event_position(const Gfx::IntPoint&) const { return {}; } void begin_editing(const ModelIndex&); |