Commit Graph

6 Commits

Author SHA1 Message Date
Matthias Clasen
a2897e1868 gtk-demo: Add suggestion entry demos
Add a possible replacement for GtkEntryCompletion
as a demo.

Move the Dropdowns demo to Lists/Selections, and make
it show both GtkDropDown and the suggestion entry, with
some variations.
2020-11-11 15:54:43 -05:00
Matthias Clasen
907fc30fac gtk-demo: Add checkmarks to all dropdown demos
This follows the mockups that these demos are
copied from. Unfortunately, it has to be implemented
for every item factory, so we repeat it here.

Fixes: #3291
2020-10-27 16:13:44 -04:00
Matthias Clasen
f7ab6f665d dropdown: Revise constructors
A dropdown without a model is useless, so accept a model
and expression in the constructor. Allow them to be NULL,
but consume them if given. This makes chained constructors
convenient without breaking language bindings.

Drop gtk_drop_down_set_from_strings() and instead add
gtk_drop_down_new_from_strings().

Update all users.
2020-07-26 18:09:54 -04:00
Matthias Clasen
c0e2d7c62f Drop unnecessary uses of gtk_style_context_add_class
We can use gtk_widget_add_css_class instead, most places.
2020-06-30 17:42:30 -04:00
Matthias Clasen
180a5a1ad7 gtk-demo: Cosmetic changes to the dropdown demo
Match the window title and the sidebar.
2020-06-06 20:08:50 -04:00
Matthias Clasen
0b1c91dc7c gtk-demo: Add a dropdown demo
This shows a few examples of GtkDropDown.
Mostly taken from tests/testdropdown.c.
2020-06-03 11:34:06 -04:00