summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/ComboBox.cpp
diff options
context:
space:
mode:
authorthankyouverycool <66646555+thankyouverycool@users.noreply.github.com>2022-09-21 08:07:24 -0400
committerAndreas Kling <kling@serenityos.org>2022-09-22 21:37:26 +0200
commitf86c5b1fa741bd09bb173e10cb16e7bd40cd5545 (patch)
tree16a4e745a6c0f69002d8e4e6ee57b4e54c09428b /Userland/Libraries/LibGUI/ComboBox.cpp
parentaa8e7aba429347b5bd6288c726d5a56cf7f5510d (diff)
downloadserenity-f86c5b1fa741bd09bb173e10cb16e7bd40cd5545.zip
LibGUI: Allow setting max visible items for ComboBoxes
This will govern the maximum number of items ComboBox windows display before scrolling content.
Diffstat (limited to 'Userland/Libraries/LibGUI/ComboBox.cpp')
-rw-r--r--Userland/Libraries/LibGUI/ComboBox.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGUI/ComboBox.cpp b/Userland/Libraries/LibGUI/ComboBox.cpp
index a452fe1c7b..3b265b6ecd 100644
--- a/Userland/Libraries/LibGUI/ComboBox.cpp
+++ b/Userland/Libraries/LibGUI/ComboBox.cpp
@@ -58,6 +58,7 @@ ComboBox::ComboBox()
{
REGISTER_STRING_PROPERTY("placeholder", editor_placeholder, set_editor_placeholder);
REGISTER_BOOL_PROPERTY("model_only", only_allow_values_from_model, set_only_allow_values_from_model);
+ REGISTER_INT_PROPERTY("max_visible_items", max_visible_items, set_max_visible_items);
set_min_size({ 40, 22 });
set_preferred_size({ SpecialDimension::OpportunisticGrow, 22 });