Commit Graph

76451 Commits

Author SHA1 Message Date
Matthias Clasen
9880f9d16a Merge branch 'slice-sections' into 'main'
Beef up our section models

Closes #5854

See merge request GNOME/gtk!6009
2023-05-28 01:00:04 +00:00
Matthias Clasen
5c1c22156c sortlistmodel: Optimize signals
When we emit items-changed due to a section
sorter change, don't also emit sections-changed.
Instead make the items-changed signal cover the
whole range.

Tests included.
2023-05-27 20:37:28 -04:00
Matthias Clasen
d7e8c52d37 Merge branch 'fix-section-sorter-keys' into 'main'
sortlistmodel: Fix handling of section sort keys

Closes #5854

See merge request GNOME/gtk!6024
2023-05-27 23:37:35 +00:00
Matthias Clasen
c3d3e2d47b sortlistmodel: Fix handling of section sort keys
When the section sorter changes, we need to update
the keys, otherwise the sorter will continue to report
the old sections.

This code is currently a bit suboptimal, since the
creation of sort keys and section sort keys are
muddled together.

Fixes: #5854
2023-05-27 19:09:05 -04:00
Matthias Clasen
9c1049e710 multiselection: Pass through sections-changed
If our underlying model emits sections-changed,
we need to pass it on.

Add a test for this too.
2023-05-27 17:27:19 -04:00
Matthias Clasen
a1352a88ff singleselection: Pass through sections-changed
If our underlying model emits sections-changed,
we need to pass it on.

Add a test for this too.
2023-05-27 17:27:19 -04:00
Matthias Clasen
8825917140 noselection: Pass through sections-changed
If our underlying model emits sections-changed,
we need to pass it on.

Add a test for this too.
2023-05-27 17:27:19 -04:00
Matthias Clasen
ba8d4902b5 filterlistmodel: Pass through sections-changed
If our underlying model emits sections-changed,
we need to pass it on.

Add a test for this too.
2023-05-27 17:27:19 -04:00
Matthias Clasen
8f3d3ca587 slicelistmodel: Pass through sections
Implement GtkSectionModel in the obvious way.

Tests included.
2023-05-27 17:27:19 -04:00
Matthias Clasen
aeba1e08e8 sortlistmodel: Emit sections-changed
When a new section sorter is set, potentially
all sections have changed. So emit sections-changed
for all items.

Tests included.
2023-05-27 17:27:19 -04:00
Matthias Clasen
9f47bfe193 sortlistmodel: Fix handling of section sort keys
When the section sorter changes, we need to update
    the keys, otherwise the sorter will continue to report
    the old sections.

    This code is currently a bit suboptimal, since the
    creation of sort keys and section sort keys are
    muddled together.

    Fixes: #5854
2023-05-27 17:27:19 -04:00
Benjamin Otte
43417e9e55 Merge branch 'columnview-sections' into 'main'
Columnview sections

See merge request GNOME/gtk!6006
2023-05-27 18:51:12 +00:00
Matthias Clasen
bbb7446e93 Merge branch 'matthiasc/for-main' into 'main'
docs: Cosmetics

See merge request GNOME/gtk!6023
2023-05-27 18:42:34 +00:00
Matthias Clasen
6623baeb52 docs: Cosmetics 2023-05-27 14:40:49 -04:00
Matthias Clasen
d90b09f8c3 Merge branch 'matthiasc/for-main' into 'main'
sortlistmodel: Cosmetics

See merge request GNOME/gtk!6022
2023-05-27 18:30:37 +00:00
Matthias Clasen
bcae6271df Merge branch 'handle-sections-changed' into 'main'
wip: list widgets: handle sections-changed

See merge request GNOME/gtk!6011
2023-05-27 17:55:00 +00:00
Matthias Clasen
fc524ed346 Cosmetics
Fix copy-paste errors in line 1.
2023-05-27 13:51:39 -04:00
Matthias Clasen
c80a0c0e85 sortlistmodel: Cosmetics
Make the set_[section]_sorter functions a bit more symmetric.
2023-05-27 13:47:46 -04:00
Matthias Clasen
7572f2ed87 columnview: Add section plumbing
Add a header-factory property, and pass it through
to the listview.
2023-05-27 13:39:55 -04:00
Matthias Clasen
54ec750238 Merge branch 'matthiasc/for-main' into 'main'
gtk: Annotate new enum values

See merge request GNOME/gtk!6021
2023-05-27 13:35:27 +00:00
Matthias Clasen
5d78cf6546 Merge branch 'wip/kabus/popover-direction' into 'main'
gtk/popover: Flip anchoring direction in RTL

Closes #5847

See merge request GNOME/gtk!6020
2023-05-27 13:19:28 +00:00
Khalid Abu Shawarib
d329b00bda gtk/popover: Flip anchoring direction in RTL 2023-05-27 13:19:28 +00:00
Matthias Clasen
ddf1ea9917 gtk: Annotate new enum values
We have decorators now to tell compilers when
enum values were added, so lets use them for the
new GtkAlign values.
2023-05-27 08:02:15 -04:00
Matthias Clasen
215f60e450 listitemmanager: Listen to sections-changed
And recreate header and footer tiles as needed.

This commit was tested using a sortlistmodel, changing
the section sorter from sorting only by first char
to sorting by the first two chars, which changes
the number of sections, but leaves the alphabetic
order of items unchanged.
2023-05-27 06:33:50 -04:00
Sabri Ünal
87070e0bdd Update Turkish translation 2023-05-26 22:48:53 +00:00
Matthias Clasen
19f51b5de2 Merge branch 'docs/gdk-RGBA-parse' into 'main'
docs: add HSL to Gdk.RGBA.parse

See merge request GNOME/gtk!6017
2023-05-25 17:40:08 +00:00
FineFindus
2d8c112f08
docs: add HSL to Gdk.RGBA.parse
Update the Gdk.RGBA.parse docs to reflect the ability to parse HSL, which has been added in 4.5.0.
2023-05-25 17:16:55 +02:00
Matthias Clasen
f1901081a6 NEWS: Updates 2023-05-24 22:03:48 -04:00
Benjamin Otte
d912628583 Merge branch 'wip/otte/for-main' into 'main'
2 GDK GL XWayland improvements

See merge request GNOME/gtk!6014
2023-05-24 22:22:48 +00:00
Benjamin Otte
c7b62d89e3 glx: Implement support for EXT_swap_control
XWayland (at least on gnome-shell) does not support SGI_swap_control,
which we were using to unset the swap interval.

It does support EXT_swap_control though, which is the more modern
version of the same thing, so this commit adds support for that.

And now GDK_DEBUG=no-vsync gives me >1000fps instead of just 60fps,
2023-05-24 21:44:43 +02:00
Benjamin Otte
46e3454eb7 gl: Update tracked buffers from 2 to 4
With XWayland and direct scanout it is possible that some apps get into
a situation where more than 2 buffers are in flight and in that case we
want to be able to still track the change regions for those buffers.

Usually 3 buffers are in use, so we go one higher, just to be safe.
2023-05-24 21:44:43 +02:00
Benjamin Otte
7573a9d2a7 gl: Rewrite update area tracking code
Make it more generic. That way we could dynamically change the number of
buffers we track.

We don't do that yet though.
2023-05-24 21:44:29 +02:00
Carlos Garnacho
d24d193301 Merge branch 'lores-scroll-mid-detent' into 'main'
Send low-res scroll event in the middle of the wheel detent

See merge request GNOME/gtk!5128
2023-05-24 14:23:47 +00:00
José Expósito
e61938793a gtkeventcontrollerscroll: Send lores scroll in the middle of the detent
Some mice send a value slightly lower than 120 for some detents. The
current approach waits until a value of 120 is reached before sending a
low-resolution scroll event.

For example, the MX Master 3 sends a value of 112 in some detents:

              detent                   detent
    |                        |                       |
                        ^    ^                    ^
                        112  REL_WHEEL            224

As illustrated, only one event was sent but two were expected. However,
sending the low-resolution scroll event in the middle plus the existing
heuristics to reset the accumulator solve this issue:

              detent                   detent
    |                        |                       |
                ^          ^             ^          ^
                REL_WHEEL  112           REL_WHEEL  224

Send low-resolution scroll events in the middle of the detent to solve
this problem.

Related to https://gitlab.gnome.org/GNOME/mutter/-/issues/2469
2023-05-24 13:42:49 +00:00
Matthias Clasen
2f584c16f0 Merge branch 'reomveunused' into 'main'
widget: Don't include gtkpopover.h

See merge request GNOME/gtk!6012
2023-05-23 23:49:25 +00:00
Maximiliano Sandoval R
2565a28e59
widget: Don't include gtkpopover.h
It is not used.
2023-05-23 23:43:15 +02:00
Emmanuele Bassi
793a2b2a70 Merge branch 'zbrown/marshallers' into 'main'
marshallers: fix up some mistypes in drags

See merge request GNOME/gtk!6010
2023-05-23 13:50:26 +00:00
Matthias Clasen
146223cd74 Merge branch 'fix-menu-padding' into 'main'
menus: Avoid unnecessary right padding

Closes #5839

See merge request GNOME/gtk!6008
2023-05-22 20:50:56 +00:00
Daniel Boles
d8e7f0a8a9 MenuButton: Fix small grammar-o/match related syms 2023-05-22 21:39:36 +01:00
Matthias Clasen
a9adf7163f menus: Avoid unnecessary right padding
We are using placeholders in the 'check' column
that are put in a size group, so that they all
take the same space once a check or radio is shown.

Unfortunately, for the inline-buttons option, we
were using a GtkBuiltinIcon as placeholder, and those
respect the -gtk-icon-size CSS property and take
a minimum size of 16px. Use a GtkGizmo instead to
get the expected result of no extra padding unless
there's a check or radio.

Fixes: #5839
2023-05-22 16:16:45 -04:00
Matthias Clasen
10825cdc72 Merge branch 'matthiasc/for-main' into 'main'
widget-factory: Align some widgets better

See merge request GNOME/gtk!6007
2023-05-22 13:17:58 +00:00
Matthias Clasen
3b105a637c widget-factory: Align some widgets better 2023-05-22 08:36:13 -04:00
Matthias Clasen
fdbc203690 Merge branch 'wip/kabus/date-leak' into 'main'
gtk/recentmanager: Fix date leak

Closes #5842

See merge request GNOME/gtk!6005
2023-05-22 12:25:24 +00:00
Khalid Abu Shawarib
26c583227e gtk/recentmanager: Fix date leak 2023-05-22 12:25:24 +00:00
Арсений Засыпкин
1ea0bebf15 Update Russian translation 2023-05-22 12:18:13 +00:00
Matthias Clasen
ca0e27ec9d Merge branch 'matthiasc/for-main' into 'main'
Improve section model docs

See merge request GNOME/gtk!6003
2023-05-21 23:57:48 +00:00
Matthias Clasen
5edf9fc449 Merge branch 'fm-showitems' into 'main'
filelauncher: Use ShowItems to show in File Manager

Closes #5842

See merge request GNOME/gtk!5997
2023-05-21 23:22:57 +00:00
Matthias Clasen
534f11e317 Improve section model docs
Mention sections in the list widget overview,
and document the list models that support sections.
2023-05-21 19:20:08 -04:00
Zander Brown
d8cffa9350
marshallers: fix up some mistypes in drags
Fix: ff330668cf
2023-05-21 19:14:45 +01:00
Matthias Clasen
60dfa777f0 Merge branch 'gdk-introspection-fix' into 'main'
introspection: Include deprecated gdk api in gir

See merge request GNOME/gtk!5999
2023-05-21 14:25:59 +00:00