summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/IconView.cpp
AgeCommit message (Collapse)Author
2021-08-31Userland: Use Rect::centered_within() where usefulAndreas Kling
2021-07-30LibGui: Add bounding of rubber band to IconViewFrHun
This ensures the selection rubber band in icon views stays within the visible area.
2021-07-27LibGUI: Add ModelRole::IconOpacity and support it in all views :^)Andreas Kling
This role allows you to specify a custom opacity for icon painting. Note that the opacity is not in effect when the item is either selected and/or hovered.
2021-07-12LibGUI: Use wrapped text rect for paint invalidationLuK1337
This fixes an issue where after anything past first line would not get invalidated after unhovering an icon.
2021-07-10LibGUI: Tighten paint invalidation rects in item views :^)Andreas Kling
AbstractView now has a paint_invalidation_rect(index) function that subclasses can override to provide a tighter invalidation rect for an index.
2021-06-03LibGUI: Properly wrap multiple lines in IconView search highlightingMatthew B. Jones
2021-06-01Everywhere: codepoint => code pointAndreas Kling
2021-05-20LibGUI: Add widget registration for GUI::IconViewAndreas Kling
2021-05-03LibGUI: Rename ScrollableWidget => AbstractScrollableWidgetAndreas Kling
2021-05-02LibGfx: Unify Rect, Point, and SizeMatthew Olsson
This commit unifies methods and method/param names between the above classes, as well as adds [[nodiscard]] and ALWAYS_INLINE where appropriate. It also renamed the various move_by methods to translate_by, as that more closely matches the transformation terminology.
2021-04-29Everywhere: "indexes" => "indices"Andreas Kling
I've wasted a silly amount of time in the past fretting over which of these words to use. Let's just choose one and use it everywhere. :^)
2021-04-24LibGUI: Remove some unused cruft from GUI::IconViewAndreas Kling
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
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-13Everywhere: It's now "Foobar", not "FooBar", and not "foo bar"Andreas Kling
I hereby declare these to be full nouns that we don't split, neither by space, nor by underscore: - Breadcrumbbar - Coolbar - Menubar - Progressbar - Scrollbar - Statusbar - Taskbar - Toolbar This patch makes everything consistent by replacing every other variant of these with the proper one. :^)
2021-04-03LibGUI: Don't try to paint items in model-less IconView :^)Andreas Kling
Fixes #6079.
2021-03-30LibGUI: Don't inflate icon text rects beyond available widththankyouverycool
Fixes wrapped text candidates not first eliding
2021-03-29LibGUI: Fix IconView selection with FlowDirection::TopToBottomTom
While iterating the items contained by the rubberband we need to skip the correct number of items either vertically or horizontally, depending on which direction the items flow. Fixes #5993
2021-03-07LibGUI: Scroll selection into view when the IconView is first laid outspeles
If we set selection before the IconView is laid out, it has no size. So it can't correctly calculate where to scroll. Forcing scroll after the first resize fixes that.
2021-02-25LibGUI: Improve IconView rubberband performanceTom
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-23Everywhere: Rename ASSERT => VERIFYAndreas Kling
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED) Since all of these checks are done in release builds as well, let's rename them to VERIFY to prevent confusion, as everyone is used to assertions being compiled out in release. We can introduce a new ASSERT macro that is specifically for debug checks, but I'm doing this wholesale conversion first since we've accumulated thousands of these already, and it's not immediately obvious which ones are suitable for ASSERT.
2021-02-20LibGUI: Set IconView content width to actual content onlythankyouverycool
Fixes incorrect excess size reporting when updating scrollbars and allows horizontal scrolling if IconView is resized smaller than a single column
2021-02-13LibGUI: add 'always_wrap_item_labels' property to IconView.Nick Vella
In some circumstances (like template selection dialogs,) displaying as much item label as possible, on all items, may be desired. The default setting is 'false', which matches the default behaviour from before; only wrapping on hover or selection.
2021-01-25Everywhere: Remove unnecessary debug comments.asynts
It would be tempting to uncomment these statements, but that won't work with the new changes. This was done with the following commands: find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec awk -i inplace '$0 !~ /\/\/#define/ { if (!toggle) { print; } else { toggle = !toggle } } ; $0 ~/\/\/#define/ { toggle = 1 }' {} \; find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec awk -i inplace '$0 !~ /\/\/ #define/ { if (!toggle) { print; } else { toggle = !toggle } } ; $0 ~/\/\/ #define/ { toggle = 1 }' {} \;
2021-01-12Libraries: Move to Userland/Libraries/Andreas Kling