Commit Graph

76144 Commits

Author SHA1 Message Date
Benjamin Otte
e1ed9f10c6 theme: Add some random CSS for section headers 2023-05-09 17:00:40 +02:00
Benjamin Otte
46adfbef4f listitemmanager: Create header items for sections
Now, finally, listitemmanager has all the necessary support to make
section headers work.
2023-05-09 17:00:40 +02:00
Benjamin Otte
53bfcf7f0a listview: GtkListHeader and gtk_list_view_set_header_factory()
Adds infrastructure for handling factories for list headers.

For now, listitemmanager doesn't instantiate them, so they aren't used.
2023-05-09 17:00:40 +02:00
Benjamin Otte
76d601631d listitemmanager: Add GtkListItemChange
... for tracking widgets during changes.

This just pulls all the different disjointed parts into one struct with
a sensible API.
2023-05-09 17:00:40 +02:00
Benjamin Otte
38844fef4d listitemmanager: Add GtkListHeaderBase and vfuncs
This is plumbing for section handling.

The vfuncs don't do anything, this is just the infrastructure.
2023-05-09 17:00:40 +02:00
Benjamin Otte
03ac6611c1 listitembase: exit early
When update() is called but no values are changed, exit early.
2023-05-09 17:00:40 +02:00
Benjamin Otte
0ff88346cd listitemmanager: Make sections configurable
Add a gtk_list_item_manager_set_has_sections() (default: FALSE) that
requires explicit turning on for the listitemmanager to gain section
support.
2023-05-09 17:00:40 +02:00
Benjamin Otte
a73256e5c9 listitemmanager: Add/remove sections as needed
When ensuring widgets, ensure that their section is known. This will
be relevant when we use section widgets.

Also ensure that sections that don't cover any widget get destroyed.
2023-05-09 17:00:40 +02:00
Benjamin Otte
5d2605a151 testsuite: assert widgets are in matched sections
All widgets that we display should have their sections known, so assert
that that is the case.
2023-05-09 17:00:40 +02:00
Benjamin Otte
40a7ec73a9 testsuite: Add a print function for the listitemmanager
This is very useful when debugging.
2023-05-09 17:00:40 +02:00
Benjamin Otte
ccbe762103 listitemmanager: Add gtk_list_tile_get_next_skip()
... and gtk_list_tile_get_previous_skip() and use them.

Allows skipping over REMOVED and FILLER tiles which makes the code a lot
more readable.
2023-05-09 17:00:40 +02:00
Benjamin Otte
88d5c9a5e1 listitemmanager: Add gtk_list_tile_set_type() 2023-05-09 17:00:39 +02:00
Benjamin Otte
6df8eafc3a testsuite: Add verbose output to listitemmanager test 2023-05-09 17:00:39 +02:00
Benjamin Otte
8e69c5c89c listitemmanager: Properly handle sections during add/remove
We don't insert sections ourselves yet, but we handle the existing one
when items get added or removed.
2023-05-09 17:00:39 +02:00
Benjamin Otte
8bf6498265 listitemmanager: Augment header/footer info 2023-05-09 17:00:39 +02:00
Benjamin Otte
e680abc723 listitemmanager: Add section tiles
For now, we just have a HEADER at the start and a FOOTER at the end.
That's hard enough to get right.
2023-05-09 17:00:39 +02:00
Benjamin Otte
cecaede610 testsuite: Improve listitemmanager test
It now has trackers!
2023-05-09 17:00:39 +02:00
Benjamin Otte
81e7e67cef listitemmanager: Add tile types
We have a FILLER and a REMOVED type now.

Also makes gc() more sensitive to types.
2023-05-09 17:00:39 +02:00
Benjamin Otte
35543f60d9 listitemmanager: Add a type to tiles
There's only one type for now, but hey, you have to start somewhere.
2023-05-09 17:00:39 +02:00
Benjamin Otte
7856c52882 testsuite: Add tests for sections to filterlistmodel 2023-05-09 17:00:39 +02:00
Matthias Clasen
568023e6e6 Add a test for filterlistmodel sections 2023-05-09 17:00:39 +02:00
Matthias Clasen
cabb2625f5 filterlistmodel: Support sections
Propagate sections from the child model to
the filter model.
2023-05-09 17:00:39 +02:00
Benjamin Otte
5f64f1c8df sortlistmodel: add a fast path for get_section() 2023-05-09 17:00:39 +02:00
Benjamin Otte
41faddea40 testsuite: Add section tests to sortlistmodel test 2023-05-09 17:00:39 +02:00
Matthias Clasen
a09146df5a Add a test for sortlistmodel sections 2023-05-09 17:00:39 +02:00
Benjamin Otte
bd7ee3f3e1 sortlistmodel: Implement GtkSectionModel
The get_section() implementation is a slow and steady implementation
that has to be careful to not screw up when an incremental sort is only
partially sorted.
2023-05-09 17:00:39 +02:00
Benjamin Otte
ff6c5ad710 flattenlistmodel: Implement GtkSectionModel
Each child model is reported as one section.
2023-05-09 17:00:39 +02:00
Benjamin Otte
bd999c72c9 Implement GtkSectionModel for all selection models 2023-05-09 17:00:39 +02:00
Benjamin Otte
45c9e7aff4 Add GtkSectionModel
Prototyping the interface to be used for sections in listview, so people
can review and play with it.
2023-05-09 17:00:39 +02:00
Benjamin Otte
d24291db98 testsuite: Add a listitemmanager test 2023-05-09 17:00:39 +02:00
Matthias Clasen
61ff647f71 Merge branch 'node-editor-smarts' into 'main'
node-editor: Add some editor smarts

See merge request GNOME/gtk!5934
2023-05-07 13:59:42 +00:00
Matthias Clasen
823f56d263 Cleanup 2023-05-07 09:32:09 -04:00
Matthias Clasen
87332920d5 node-editor: Add some editor smarts
Allow control-clicks on some fields to bring up
a more specific UI. This functionality is also
available via Ctrl-E and the context menu.

At this point, it can edit colors, fonts and
files in some places, as well as a few enums.
2023-05-07 09:19:44 -04:00
Matthias Clasen
d2a358206c Fix a typo in the node format definition 2023-05-07 09:19:44 -04:00
Matthias Clasen
51ea08aa9c Merge branch 'wip/exalm/action-fixes' into 'main'
modelbutton: Fix a use after free when unsetting accel

See merge request GNOME/gtk!5933
2023-05-07 12:12:57 +00:00
Alice Mikhaylenko
380b63fede modelbutton: Fix a use after free when unsetting accel
gtk_widget_remove_controller() already destroys the controller.
2023-05-07 15:21:16 +04:00
Matthias Clasen
df93875c0c Merge branch 'matthiasc/for-main' into 'main'
rendernodeparser: Handle shader nodes better

See merge request GNOME/gtk!5930
2023-05-07 00:58:05 +00:00
Matthias Clasen
5a156e6b5f rendernodeparser: Handle shader nodes better
Avoid criticals when editing shader nodes in
the node editor.
2023-05-06 14:33:45 -04:00
Matthias Clasen
0e488b3dfe Merge branch 'headless-test-logging' into 'main'
ci: Improve headless test logging

See merge request GNOME/gtk!5929
2023-05-06 13:28:06 +00:00
Matthias Clasen
8495e0e412 Add a test for quick key events 2023-05-06 09:09:13 -04:00
Matthias Clasen
c9b0ca0de7 ci: Improve headless test logging 2023-05-06 09:02:25 -04:00
Benjamin Otte
2a950dec71 Merge branch 'wip/otte/update-texture' into 'main'
Add texture update regions

See merge request GNOME/gtk!5880
2023-05-06 00:59:25 +00:00
Matthias Clasen
d6c80d4f35 Merge branch 'tiled-states' into 'main'
Fix a corner-case in window states

Closes #5809

See merge request GNOME/gtk!5926
2023-05-05 23:58:08 +00:00
Matthias Clasen
e41cc99474 Merge branch 'wip/kabus/column-id-leak' into 'main'
gtk/columnviewcolumn: Fix id leak

See merge request GNOME/gtk!5927
2023-05-05 23:55:34 +00:00
Matthias Clasen
61fe5ac684 Handle the opposite case too
Just in case.
2023-05-05 19:40:42 -04:00
Khalid Abu Shawarib
1cf3f492b8 gtk/columnviewcolumn: Fix id leak
Add a free that was missing in commit 3e2b962a
2023-05-05 22:18:16 +00:00
Matthias Clasen
54fed96f8c Fix a corner-case in window states
Remove detailed tiled states when not tiled.

Fixes: #5809
2023-05-05 16:47:43 -04:00
Matthias Clasen
e2d659d5c2 Merge branch 'matthiasc/for-main' into 'main'
ci: Bump timeouts for headless tests

See merge request GNOME/gtk!5925
2023-05-05 20:34:39 +00:00
Matthias Clasen
8ad1189b0b ci: Bump timeouts for headless tests 2023-05-05 16:21:54 -04:00
Matthias Clasen
b5b7e1f2b4 Merge branch 'matthiasc/for-main' into 'main'
Add a masked variation to gsk tests

See merge request GNOME/gtk!5924
2023-05-05 20:12:12 +00:00