Commit Graph

76091 Commits

Author SHA1 Message Date
Daniel Boles
0736fef585 Merge branch 'dboles/expander-css-nodes-doc' into 'main'
Expander: Clarify/format “CSS nodes” documentation

See merge request GNOME/gtk!5896
2023-04-30 11:37:55 +00:00
Daniel Boles
0442fc2b55 Expander: Clarify/format CSS nodes documentation
Use backticks to highlight the node names, mention the box, and clarify
that the arrow referred to in the last sentence is the `expander` node.
2023-04-30 11:56:07 +01:00
Matthias Clasen
27c621695e Merge branch 'deprecated-get-allocated-width' into 'main'
Deprecated get allocated width

See merge request GNOME/gtk!5894
2023-04-29 18:55:45 +00:00
Matthias Clasen
1a237ef6a8 Merge branch 'box-baseline-child' into 'main'
boxlayout: Add a baseline child property

See merge request GNOME/gtk!5891
2023-04-29 18:30:59 +00:00
Matthias Clasen
e7ba8e7e9a Deprecate gtk_widget_get_allocated_width 2023-04-29 14:30:21 -04:00
Matthias Clasen
14279785e6 tests: Stop using gtk_widget_get_allocated_width 2023-04-29 14:30:21 -04:00
Matthias Clasen
5b6f8d7002 gtk4-demo: Stop using gtk_widget_get_allocated_size 2023-04-29 14:30:21 -04:00
Matthias Clasen
71a752490a popover: Stop using gtk_widget_get_allocated_width 2023-04-29 14:30:21 -04:00
Matthias Clasen
3f4f37661c placesview: Stop using gtk_widget_get_allocated_width 2023-04-29 14:30:21 -04:00
Matthias Clasen
5bc5a6f2cd placessidebar: Stop using gtk_widget_get_allocated_width 2023-04-29 14:30:21 -04:00
Matthias Clasen
1a90724de9 columnview: Stop using gtk_widget_get_allocated_width 2023-04-29 14:30:21 -04:00
Matthias Clasen
f8f91095a3 Merge branch 'matthiasc/for-main' into 'main'
widget: Cosmetics

See merge request GNOME/gtk!5892
2023-04-29 18:29:14 +00:00
Benjamin Otte
6cc1548c5f Merge branch 'wip/carlosg/x11-artifacts' into 'main'
gdk/x11: Invalidate whole surface after size change

See merge request GNOME/gtk!5857
2023-04-29 18:11:21 +00:00
Matthias Clasen
30b12ff890 docs: Mention baselines
Add a paragraph about baselines to the coordinates overview.
2023-04-29 13:48:03 -04:00
Matthias Clasen
b9931e9573 widget: Cosmetics
Rename allocated_size_baseline to allocated_baseline,
to match better with the other allocated_ fields.
2023-04-29 13:47:51 -04:00
Matthias Clasen
cab8981c57 spinbutton: Use GtkBoxLayout:baseline-child
This makes it so that vertical spin buttons are
properly aligned to the baseline.
2023-04-29 13:28:55 -04:00
Matthias Clasen
b6786b8a49 Revert "spinbutton: Use a grid layout"
This reverts commit d648a7721e.
2023-04-29 13:28:55 -04:00
Matthias Clasen
2d9ae241d5 boxlayout: Add a baseline child property
In horizontal layout, we line up the baselines of all children to find
how much space we need above and below the box baseline.

In vertical layout, we need to pick one child to inherit the baseline
from, which is what the new GtkBoxLayout:baseline-child property is
about. It is the equivalent of GtkGridLayout:baseline-row.
2023-04-29 13:28:55 -04:00
Daniel Boles
a24a924a6b EventController: Fix type "even propagation"→event 2023-04-29 18:12:30 +01:00
Matthias Clasen
825eb93509 Remove more debug spew 2023-04-29 11:46:16 -04:00
Matthias Clasen
a8a0850b64 Merge branch 'matthiasc/for-main' into 'main'
entry: Ignore the baseline when centering

See merge request GNOME/gtk!5889
2023-04-29 14:16:42 +00:00
Matthias Clasen
03f388d099 widget: Don't set baselines when unused
When we are not doing baseline alignment, don't pass
a baseline to the allocated widget. This helps because
a number of widgets (GtkLabel, GtkEntry, etc) always
position their text on the given baseline.
2023-04-29 09:52:34 -04:00
Matthias Clasen
92205744d2 entry: Ignore the baseline when centering
GtkEntry was always placing its text on the baseline,
even when the valign said something else.
2023-04-29 09:52:34 -04:00
Matthias Clasen
f6f3a78dd9 Merge branch 'matthiasc/for-main' into 'main'
theme: Reinstate switch labels in hc

See merge request GNOME/gtk!5888
2023-04-29 12:27:23 +00:00
Matthias Clasen
76698e5de8 testbaseline2: Don't set height-requests
Widget with height requests have their baselines
ignored. Oops.
2023-04-29 08:01:11 -04:00
Matthias Clasen
21260e8ed4 theme: Reinstate switch labels in hc
Since we show them in GNOME shell, show them here too.

The comment that says "only show these in the a11y
theme" was still there, but we were always hiding them.
2023-04-29 08:01:03 -04:00
Carlos Garnacho
24302315fb gdk/x11: Invalidate whole surface after size change
The Expose events following a ConfigureNotify may arrive at
a time that we did not resize the surface yet, making these
expose events a no-op. Even though gsk/gtk take care of the
window content itself, this might lead to unrendered portions
of the window shadow.

This may be seen with GSK_RENDERER=cairo and GDK_BACKEND=x11,
attempting to tile a window (e.g. gtk4-demo) left or right.
The window will show black rectangles or other artifacts in
the window shadow areas that correspond to the newly painted
portions (as the window needs to expand vertically).

In order to fix this with a similar behavior to Wayland,
consider ourselves the whole surface invalidated after resize,
in order to ensure everything is painted from scratch.
2023-04-29 11:51:32 +02:00
Fabio Tomat
fc9642ce2a Update Friulian translation 2023-04-29 08:57:53 +00:00
Benjamin Otte
c542351a73 Merge branch 'wip/otte/for-main' into 'main'
wayland: Use wl_surface_damage_buffer() in Cairo

See merge request GNOME/gtk!5886
2023-04-29 03:43:45 +00:00
Benjamin Otte
3198330188 rendernode: Add diffing for affine transforms
This will be needed most importantly for inverted textures,
like in GLArea.
2023-04-29 05:10:51 +02:00
Benjamin Otte
11aaa29a69 wayland: Use wl_surface_damage_buffer() in Cairo
... when it is available.

Also introduce the new function gdk_rectangle_transform_affine(), which
looks like overkill for this purpose, but I'm about to use it elsewhere.
2023-04-29 05:07:03 +02:00
Matthias Clasen
d1a25178fd Merge branch 'matthiasc/for-main' into 'main'
shortcutswindow: Avoid criticals

See merge request GNOME/gtk!5885
2023-04-29 01:15:58 +00:00
Matthias Clasen
092745161c shortcutswindow: Avoid criticals
No point in resetting accessible relations
when we are in finalize.
2023-04-28 20:44:18 -04:00
Matthias Clasen
0da4a92298 Merge branch 'clarify-swapped-default-object-signal' into 'main'
builder: Clarify default "swapped" value when "object" is set for signals

See merge request GNOME/gtk!4514
2023-04-28 23:00:31 +00:00
Matthias Clasen
8b816d3b03 Merge branch 'gtkshortcutswindow_a11y' into 'main'
GtkShortcutsWindow: Allow a screen reader user to browse the available shortcuts

See merge request GNOME/gtk!5042
2023-04-28 22:57:10 +00:00
Matthias Clasen
63b50f48a9 Merge branch 'harmonize-would_drop' into 'main'
Harmonize would_drop() replacement for g_log_writer_default_would_drop()

See merge request GNOME/gtk!4935
2023-04-28 22:55:42 +00:00
Matthias Clasen
8b91762c42 Merge branch 'deprecate-get-allocation' into 'main'
Deprecate get allocation

See merge request GNOME/gtk!5882
2023-04-28 22:49:42 +00:00
Matthias Clasen
01f39d8522 README: Updates
Drop the section that talked about main and how to update
local checkouts - its been 2 years, people should have gotten
around to it by now. Add some general git hints instead.
2023-04-28 17:31:12 -04:00
Benjamin Otte
e94416054c Merge branch 'wip/otte/for-main' into 'main'
Fix hangs on Wayland

Closes #5761

See merge request GNOME/gtk!5884
2023-04-28 21:22:12 +00:00
Benjamin Otte
b4c859c011 wayland: Set EGL swap interval to 0.
There's no need for EGL to do any timing, we do it in GTK already.

This fixes hangs in Mesa when we hide a surface after a SwapBuffers()
but before the frame callback arrives.
If we then reshow the surface and immediately render to it, Mesa would
still have a frame callback from before the hiding and forever poll()
waiting for the compositor to send the callback.

Fixes #5761
2023-04-28 22:40:39 +02:00
Benjamin Otte
45216e1c88 wayland: Disconnect the frame callback when hiding
Do not leave spurious frame callbacks around wen hiding surfaces.
Instead, store the callback and remove it.
2023-04-28 22:21:42 +02:00
Daniel Boles
7bea2685e1 migrating-3to4: Don't mention removed Box method &
donʼt mention its renamed successor either, as that has its own section
later. We could have another sentence paragraph like ‘In the case of
GtkBox, the pack methods have been renamed to X and lost the trailing
arguments Y’, but that wonʼt help people prepare still on GTK3, which is
the point in the affected section… so just remove the misleading relic.
2023-04-28 21:14:37 +01:00
Matthias Clasen
b7d1774c56 Merge branch 'matthiasc/for-main' into 'main'
Cosmetics

See merge request GNOME/gtk!5883
2023-04-28 20:09:17 +00:00
Matthias Clasen
3afd91ea06 Updates 2023-04-28 16:02:18 -04:00
Matthias Clasen
d7dd6ca552 Cosmetics 2023-04-28 15:36:37 -04:00
Matthias Clasen
9c40e8b873 Deprecate gtk_widget_get_allocated_baseline 2023-04-28 15:26:16 -04:00
Matthias Clasen
b201d66981 Stop using gtk_widget_get_allocated_baseline
Use gtk_widget_get_baseline instead.
2023-04-28 15:25:58 -04:00
Matthias Clasen
3ea289751d Add gtk_widget_get_baseline
This is just a renaming of gtk_widget_get_allocated_baseline
that fits better with gtk_widget_get_width/height.
2023-04-28 15:18:13 -04:00
Matthias Clasen
8205c7032a Deprecate gtk_widget_get_allocation 2023-04-28 15:05:39 -04:00
Matthias Clasen
ba379c928b flowbox: Use deprecation guards around get_allocation 2023-04-28 15:05:39 -04:00