summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/ComboBox.cpp
AgeCommit message (Collapse)Author
2021-11-30LibGUI+FontEditor: Allow ComboBox on_change callback to be toggledthankyouverycool
When calling set_selected_index() on ComboBox, allow its on_change callback to be disabled. Fixes FontEditor window state erroneously switching to modified when initializing between different slopes and weights.
2021-11-11Everywhere: Pass AK::StringView by valueAndreas Kling
2021-11-08LibGfx: Use ErrorOr<T> for Bitmap::try_load_from_file()Andreas Kling
This was used in a lot of places, so this patch makes liberal use of ErrorOr<T>::release_value_but_fixme_should_propagate_errors().
2021-11-03LibGUI: Make ComboBox text editor release focus when Escape is pressedkleines Filmröllchen
2021-11-03LibGUI: Make ComboBox report on_change for set_selected_indexkleines Filmröllchen
As navigate and navigate_relative also do this, it seems reasonable to have it here.
2021-09-02Userland: Migrate to argument-less deferred_invokesin-ack
Only one place used this argument and it was to hold on to a strong ref for the object. Since we already do that now, there's no need to keep this argument around since this can be easily captured. This commit contains no changes.
2021-09-01LibGUI:: Style Combo and SpinBox buttons as ThickCapsthankyouverycool
These suffered the same visual defect as scrollbars when styled as normal buttons: against backgrounds with the same color as their highlighting, aspect was lost.
2021-07-21LibGfx: Use "try_" prefix for static factory functionsAndreas Kling
Also mark them as [[nodiscard]].
2021-07-06LibGUI: Fix `go_upwards_instead` check in ComboBoxLuK1337
This change addresses an issue where ComboBox list window would always be drawn upwards if the number of elements is lower or equal 3.
2021-06-03LibGUI: ComboBox now goes upwards when running out of room to renderMatthew Jones
2021-06-03LibGUI: ComboBox now correctly sizes height in relation to taskbarMatthew Jones
2021-05-26LibGUI/AbstractView: Remove `on_selection`Jelle Raaijmakers
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-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-03-25WindowServer+LibGUI: Remove the global menubar :^)Andreas Kling
This leaves menu applets running but invisible, and that's a regression we need to take care of obviously. But not today, because it's getting too late.
2021-03-16LibGUI: Remove has_visible_list members from TextEditorthankyouverycool
This was a kludge to paint ComboBox editors before the advent of accessory windows, isn't being used anymore, and was inadvertently letting two ComboBoxes paint as if both had focus.
2021-03-12LibGUI: Register more GML properties and widgetsthankyouverycool
Register "placeholder" for TextEditor and ComboBox; "models_only" for ComboBox; Vertical/HorizontalSeparator for SeparatorWidget
2021-02-27LibGUI: Remove ControlBoxButton widgetthankyouverycool
ComboBoxes and SpinBoxes were still relying on ascii-to-bitmap icons instead of PNGs. This makes it easier to theme in the future.
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-17LibGUI: Correctly handle ComboBox list windows of less than three items ↵Nick Vella
(~50px) in height. By default, a Window has a minimum size of 50x50 - ComboBox lists aren't always this tall. We now set the minimum height of the ComboBox Window according to the height of three items, or the total height of all the items in the list, whichever is smaller. This means there is no longer any unpainted space in the list window due to the shortfall between the ListBox widget and Window heights, and the ComboBox list window always remains a comfortable height for viewing. :^)
2021-01-12Libraries: Move to Userland/Libraries/Andreas Kling