Christian Hergert
cd2debdfc6
dropdown: fix extraneous * in documentation
2021-10-06 09:56:11 -07:00
Christian Hergert
cd45e6edee
dropdown: add GtkDropDown:show-arrow property
...
This allows hiding the arrow on the dropdown which cannot otherwise be
controlled via CSS.
2021-10-06 09:55:40 -07:00
Matthias Clasen
4a0d3d7acc
docs: Reduce redundancy
...
Remove a boatload of "or %NULL" from nullable parameters
and return values. gi-docgen generates suitable text from
the annotation that we don't need to duplicate.
This adds a few missing nullable annotations too.
2021-05-20 20:45:06 -04:00
Matthias Clasen
7fe0610b68
introspection: Stop using allow-none
...
allow-none has been deprecated for a long time
already. Instead use optional and nullable everywhere.
2021-05-20 19:17:49 -04:00
Matthias Clasen
8ba16eb4f1
Documentation fixes
...
Mostly fixing up indentation of continuation lines,
and other small cleanups.
2021-05-20 19:17:49 -04:00
Matthias Clasen
ad9849bf26
dropdown: Small doc tweak
2021-03-11 16:37:35 +00:00
Matthias Clasen
947ebee7d4
dropdown: Add property annotations
...
Connect properties, getters, and setters with annotations
2021-03-11 16:37:33 +00:00
Matthias Clasen
6884a1a5c6
dropdown: Convert docs
...
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
nana-4
538cf9e294
dropdown: Improve search bar styling
...
As per the mockup. See:
https://gitlab.gnome.org/Teams/Design/os-mockups/-/blob/master/dropdown-lists/dropdown-lists.png
2020-12-14 05:08:59 +09:00
Jonas Ådahl
2cddec7798
gtk/popover: Use gtk_popover_present() instead of going via GtkNative
...
This makes it more explicit that managers of popovers make it "present".
2020-12-07 20:37:29 +01:00
Matthias Clasen
25d2efeabe
dropdown: Add a checkmark to the selected item
...
Make the default factory add a checkmark to the
currently selected item (not the hovered item)
in the popup. This will unfortunately have to be
done in non-default factories too.
Related: #3291
2020-10-27 16:13:38 -04:00
Matthias Clasen
fdb1fa4d08
Give all search entries an icon
...
This was first requested for the search entry in
GtkDropDown, but it is better to be consistent and
give every search entry an icon.
Related: #3291
2020-10-23 12:19:31 -04:00
Matthias Clasen
3a08706e40
dropdown: Add an icon the search entry
...
A small detail for #3291 .
2020-10-22 14:33:41 -04:00
Matthias Clasen
9c28ecb0da
Merge branch 'a11y/atspi' into 'master'
...
A11y/atspi
See merge request GNOME/gtk!2698
2020-10-15 14:59:24 +00:00
Timm Bäder
eca3eab96f
Remove unneeded gtkstylecontext.h includes
2020-10-14 15:06:12 -04:00
Matthias Clasen
9955d900db
dropdown: Use the combox accessible role
...
Its really just a combobox with another name.
2020-10-13 18:31:53 -04:00
Matthias Clasen
cb2b0688ca
Merge branch 'filter-constructors' into 'master'
...
Filter constructors
See merge request GNOME/gtk!2360
2020-09-08 12:58:27 +00:00
Andreas Persson
e0134aaf15
docs: Update list widgets docs
...
Removed sentence that claimed the view will wrap the model in a
GtkSingleSelection, as it's no longer true. Fixed the code example in
GtkListView for the same reason. Fixed a small typo in GtkDropDown docs.
2020-09-06 17:19:24 +02:00
Matthias Clasen
dfabe74c59
Make filter constructors return exact types
...
Make functions like gtk_custom_filter_new() return
the actual type they construct.
Update all callers.
2020-09-05 21:43:42 -04:00
Matthias Clasen
8d79a32c50
list widgets: Use selection models in the api
...
Change the apis in GtkListView, GtkColumnView and
GtkGridView to be explicitly about GtkSelectionModel,
to make it obvious that the widgets handle selection.
Update all users.
2020-08-31 17:15:05 -04:00
Matthias Clasen
20c1fb0a0a
docs: Tweak documentation for list widgets
...
Fix numerous cases of : vs :: for signal references,
add some more details here and there.
2020-08-03 18:43:25 -04:00
Matthias Clasen
d187ff858c
Merge branch 'drop-down-constructor' into 'master'
...
GtkDropDown api revisions
See merge request GNOME/gtk!2286
2020-07-26 23:57:48 +00: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
ccb9dcc86b
singleselection: Make constructor transfer full
...
This is for consistency with other wrapping list constructors.
We want them all to be transfer full, allow-none.
Update all callers.
2020-07-26 18:04:40 -04:00
Matthias Clasen
706d464ae6
filterlistmodel: Make constructor transfer full
...
This is for consistency with other wrapping list constructors.
We want them all to be transfer full, allow-none.
Update all callers.
2020-07-26 18:04:40 -04:00
Matthias Clasen
c85e424279
dropdown: Fix popup sizing
...
Setting a width request is not quite enough, since
gtk_widget_set_size_request() only queues a resize
when the widget is visible. Explicitly force one
here. Without this, the popup sometimes shows up
too small.
2020-07-24 14:15:04 -04:00
Matthias Clasen
353d4d161c
Cosmetic docs change
2020-07-16 22:08:15 -04:00
Benjamin Otte
e518c1f2f3
stringfilter: Make the constructor take an expression
...
An expression is critically important for a string filter and people
should be made aware of it when constructing the filter.
2020-07-16 20:43:16 +02:00
Emmanuele Bassi
18c87faaa5
Annotate string array
...
Fixes : #2915
2020-07-07 12:06:28 +01:00
Benjamin Otte
f75a3a0e95
stringlist: Take a const char const * argument
...
Sucks that we need to cast a char**, but otherwise we need to cast
{"foo", "bar", "baz" } arrays.
2020-07-05 02:34:42 +02:00
Corentin Noël
721396b6d6
dropdown: Annotate the get_selected_item method
...
We need to specify the type as we already know that it is at least a GObject and in case of no selection, NULL is returned.
2020-06-26 10:00:59 +02:00
Matthias Clasen
e8210d5865
Add GtkStringList as public api
...
This is a list model holding strings, initialized
from a char **. String lists are buildable as well,
and that replaces the buildable support in GktDropDowns.
2020-06-23 16:11:46 -04:00
Benjamin Otte
45167d5c0d
dropdown: emit notify for selected from the changed callback
...
Otherwise we don't emit it when the selection itself changes it - for
exaple because the model changed.
2020-06-21 02:23:46 +02:00
Matthias Clasen
ad98e72884
dropdown: Add GtkDropDown:selected-item
...
This is the same readonly property we have in
GtkSingleSelection.
Fixes : #2861
2020-06-20 13:11:48 -04:00
Matthias Clasen
90b78132d4
dropdown: Make the popup as wide as the button
...
Having narrow popups on a wide button looks awkward.
Do the same as the combo box, and ensure the popup
is at least as wide as the button.
2020-06-11 18:29:58 -04:00
Matthias Clasen
b0bb413faa
dropdown: Use our own CSS name
...
Use the name dropdown for the css node, and document it.
2020-06-07 09:01:20 -04:00
Matthias Clasen
3412f0554f
gtk: Documentation fixups
...
Document missing symbols, and other cleanups.
2020-06-05 22:50:30 -04:00
Emmanuele Bassi
ebaa96c0fa
Turn GtkExpression into a GTypeInstance
...
Since it's a type with sub-classes, we need to use GTypeInstance (at the
very least), otherwise we won't be able to address each sub-class as
such.
This is similar to how GskRenderNode and GdkEvent are handled, with the
added difficulty that GtkExpression is meant to be used in properties,
in order to be deserialised by GtkBuilder. This requires adding a
GParamSpec sub-class that we can match on from within GtkBuilder,
alongside some convenience API for storing a GtkExpression inside a
GValue.
2020-06-01 21:07:53 +01:00
Matthias Clasen
371dab51bb
Add GtkDropDown
...
This is a simple drop down control using list models.
2020-05-30 19:31:38 -04:00