Commit Graph

10 Commits

Author SHA1 Message Date
sin-ack
ca2c81251a Everywhere: Replace Model::update() with Model::invalidate()
Most of the models were just calling did_update anyway, which is
pointless since it can be unified to the base Model class. Instead, code
calling update() will now call invalidate(), which functions identically
and is more obvious in what it does.

Additionally, a default implementation is provided, which removes the
need to add empty implementations of update() for each model subclass.

Co-Authored-By: Ali Mohammad Pur <ali.mpfard@gmail.com>
2021-08-06 19:14:31 +02:00
Andreas Kling
df96380121 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.
2021-07-10 18:30:46 +02:00
Andreas Kling
148e72bfa0 LibGUI: Add AbstractView::editing_rect() to allow custom editing rects
This allows view classes to customize the editing rect for an index.
2021-07-10 18:30:46 +02:00
Matthew B. Jones
e7cfa9bf8e
LibGUI: Properly wrap multiple lines in IconView search highlighting 2021-06-03 08:32:31 +01:00
Jelle Raaijmakers
2c772d1848 LibGUI/AbstractView: Remove on_selection
Since the introduction of multi-select, we have had both `on_selection`
and `on_selection_change`, the latter of which was only invoked when a
change in selection came in through the model.

This removes `AbstractView::on_selection` and replaces it usage with
the more explicit `on_selection_change` everywhere.
2021-05-26 17:39:13 +04:30
Andreas Kling
d47f15ab8b LibGUI: Rename ScrollableWidget => AbstractScrollableWidget 2021-05-03 21:03:13 +02:00
Brian Gianforcaro
1682f0b760 Everything: Move to SPDX license identifiers in all files.
SPDX License Identifiers are a more compact / standardized
way of representing file license information.

See: https://spdx.dev/resources/use/#identifiers

This was done with the `ambr` search and replace tool.

 ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-22 11:22:27 +02:00
iCristalrope
8bb4409a5d
LibGUI: Track selection starting index in AbstractView (#6515)
Modifying the selection while holding the shift button and selecting
with the mouse or the arrow keys no longer results in broken selections.

Fixes #6279.
2021-04-21 17:09:04 +02:00
Tom
6cdb657493 LibGUI: Improve IconView rubberband performance
Rather than invalidating the entire window, which is very expensive on
the transparent desktop widget, just invalidate the areas that actually
need updating.
2021-02-25 18:04:06 +01:00
Andreas Kling
13d7c09125 Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00