gtk4.git
4 years agoMerge branch 'wip/otte/for-master' into 'master'
Benjamin Otte [Sun, 21 Nov 2021 03:55:28 +0000 (03:55 +0000)]
Merge branch 'wip/otte/for-master' into 'master'

Fixes

Closes #4469

See merge request GNOME/gtk!4182

4 years agobuilder-tool: Don't simplify enums too much
Benjamin Otte [Sun, 21 Nov 2021 00:51:35 +0000 (01:51 +0100)]
builder-tool: Don't simplify enums too much

Store the enum nick, not the enum value. That way the file remains
human-readable.

Updated reftests to new expected output.

4 years agopaned: Compute the right handle size
Benjamin Otte [Sun, 21 Nov 2021 00:46:32 +0000 (01:46 +0100)]
paned: Compute the right handle size

Testcase included

Fixes #4469

4 years agowindow: properly compute desired size
Benjamin Otte [Sun, 21 Nov 2021 00:15:59 +0000 (01:15 +0100)]
window: properly compute desired size

Previously, the code did not expand the size properly when a default
size was already set.

Reftest included.

4 years agoMerge branch 'missing-the-missing-glyphs' into 'master'
Matthias Clasen [Sat, 20 Nov 2021 21:56:37 +0000 (21:56 +0000)]
Merge branch 'missing-the-missing-glyphs' into 'master'

Go back to using pango for glyph rendering

See merge request GNOME/gtk!4181

4 years agoGo back to using pango for glyph rendering
Matthias Clasen [Sat, 20 Nov 2021 16:13:52 +0000 (11:13 -0500)]
Go back to using pango for glyph rendering

Using just cairo makes us lose hexboxes. So, until
we implement that ourselves, go back to using pango.

4 years agosizerequest: Change critical message
Benjamin Otte [Sat, 20 Nov 2021 15:59:50 +0000 (16:59 +0100)]
sizerequest: Change critical message

Printing the affected widget leads people to assume that it is to blame
for the error. However, the widget is the object the function is being
called on, not the caller. And the caller is doing it wrong.

Usually the caller is the parent widget, so we could print that one, but
it's only usually, it can be an issue propagating from a grandparent and
it doesn't tell you from where the function is called (allocation or
measuring), so you need a debugger anyway.

So don't put anything there instead.

4 years agoMerge branch 'wip/fix-randr-race' into 'master'
Matthias Clasen [Sat, 20 Nov 2021 14:43:48 +0000 (14:43 +0000)]
Merge branch 'wip/fix-randr-race' into 'master'

x11: Trap error when getting CRTC info

See merge request GNOME/gtk!4169

4 years agoRevert "a11y: return -1 if parent is NULL"
Samuel Thibault [Sat, 20 Nov 2021 09:59:00 +0000 (10:59 +0100)]
Revert "a11y: return -1 if parent is NULL"

This reverts commit 22847563cecb59c6f120a08bb49284599dbb6232.

4 years agoMerge branch 'wip/chergert/fix-a11y-critical' into 'master'
Samuel Thibault [Sat, 20 Nov 2021 08:14:35 +0000 (08:14 +0000)]
Merge branch 'wip/chergert/fix-a11y-critical' into 'master'

a11y: return -1 if parent is NULL

See merge request GNOME/gtk!4179

4 years agoUpdate Basque translation
Asier Sarasua Garmendia [Sat, 20 Nov 2021 07:52:06 +0000 (07:52 +0000)]
Update Basque translation

4 years agoMerge branch 'wip/otte/for-master' into 'master'
Benjamin Otte [Sat, 20 Nov 2021 06:06:08 +0000 (06:06 +0000)]
Merge branch 'wip/otte/for-master' into 'master'

Lots of sizing fixes

See merge request GNOME/gtk!4180

4 years agowidget: Remove a check
Benjamin Otte [Fri, 19 Nov 2021 23:44:47 +0000 (00:44 +0100)]
widget: Remove a check

That consistency check is entirely outdated and just prints confusing
stuff.

4 years agosizerequestcache: Increase size
Benjamin Otte [Fri, 19 Nov 2021 22:22:39 +0000 (23:22 +0100)]
sizerequestcache: Increase size

This is a quickfix to avoid infinite runtime in nested boxes with
wrapped labels.

Test included

4 years agosizerequest: Use g_printerr() for debug messages
Benjamin Otte [Fri, 19 Nov 2021 22:21:44 +0000 (23:21 +0100)]
sizerequest: Use g_printerr() for debug messages

glib doesn't print debug messages by default anymore.

4 years agopaned: Always query at least min size
Benjamin Otte [Sat, 20 Nov 2021 04:56:14 +0000 (05:56 +0100)]
paned: Always query at least min size

For shrinking children, we would not make sure of this and just throw
the current size at them.

4 years agostack: Make sure to not under-measure children
Benjamin Otte [Sat, 20 Nov 2021 04:42:20 +0000 (05:42 +0100)]
stack: Make sure to not under-measure children

When the stack is homogeneous in only one direction, the other direction
may produce min sizes to small for all children. Make sure to query at
least the min size for those.

4 years agostack: Index the homogeneous array by orientation
Benjamin Otte [Sat, 20 Nov 2021 04:30:43 +0000 (05:30 +0100)]
stack: Index the homogeneous array by orientation

4 years agostack: Turn the homogenenous variables into an array
Benjamin Otte [Sat, 20 Nov 2021 01:23:53 +0000 (02:23 +0100)]
stack: Turn the homogenenous variables into an array

that way, we can index them by orientation.

4 years agowidget: force adjustment method is one size is FILL
Benjamin Otte [Fri, 19 Nov 2021 23:46:08 +0000 (00:46 +0100)]
widget: force adjustment method is one size is FILL

If halign=fill, force adjustment to height-for-width.
If valign=fill, force adjustment to width-for-height.
Otherwise look at request mode.

This way we don't try to adapt the filled dimension and only adjust
the one that is not set to fill.

4 years agowidget: Don't forget margins when adjusting
Benjamin Otte [Fri, 19 Nov 2021 22:19:14 +0000 (23:19 +0100)]
widget: Don't forget margins when adjusting

This could lead to the wrong values being passed and computing invalid
sizes which would then lead to very unhappy code.

Test included.

4 years agosizerequest: Add a critical when for_size is too small
Benjamin Otte [Fri, 19 Nov 2021 20:58:09 +0000 (21:58 +0100)]
sizerequest: Add a critical when for_size is too small

It's not expensive to check it because we'll cache the dfault size
request anyway, and people do it wrong a lot.
As a bonus, don't do any return_if_fail(), just use the min size
instead.

4 years agoUpdate Galician translation
Fran Dieguez [Fri, 19 Nov 2021 22:23:26 +0000 (22:23 +0000)]
Update Galician translation

4 years agoUpdate Galician translation
Fran Dieguez [Fri, 19 Nov 2021 22:23:10 +0000 (22:23 +0000)]
Update Galician translation

4 years agoa11y: return -1 if parent is NULL
Christian Hergert [Fri, 19 Nov 2021 19:59:29 +0000 (11:59 -0800)]
a11y: return -1 if parent is NULL

4 years agoMerge branch 'gtk-init-doc-update' into 'master'
Emmanuele Bassi [Fri, 19 Nov 2021 13:40:07 +0000 (13:40 +0000)]
Merge branch 'gtk-init-doc-update' into 'master'

Documentation fix and whitespace cleanup

See merge request GNOME/gtk!4176

4 years agoDocumentation fix and whitespace cleanup
Fred Morcos [Fri, 19 Nov 2021 13:21:56 +0000 (13:21 +0000)]
Documentation fix and whitespace cleanup

- gtk_init() does not parse command-line options anymore.
- Gitlab's  WebIDE automatically cleans up whitespace.

4 years agoMerge branch 'win32-egl-cleanup' into 'master'
Luca Bacci [Fri, 19 Nov 2021 08:42:40 +0000 (08:42 +0000)]
Merge branch 'win32-egl-cleanup' into 'master'

GDK-Win32: Port EGL code to newer common GDK code

See merge request GNOME/gtk!4040

4 years agoUpdate Persian translation
Danial Behzadi [Thu, 18 Nov 2021 22:55:28 +0000 (22:55 +0000)]
Update Persian translation

4 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Thu, 18 Nov 2021 22:42:25 +0000 (22:42 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

node-editor: Don't make paned shrinkable

See merge request GNOME/gtk!4175

4 years agonode-editor: Don't make paned shrinkable
Matthias Clasen [Thu, 18 Nov 2021 22:24:38 +0000 (17:24 -0500)]
node-editor: Don't make paned shrinkable

When the handle is dragged all the way to the left,
it is impossible to get it back. Which is not fun.

4 years agoMerge branch 'fix-aerosnap-4' into 'master'
Luca Bacci [Thu, 18 Nov 2021 12:40:21 +0000 (12:40 +0000)]
Merge branch 'fix-aerosnap-4' into 'master'

GDK-Win32: Fix AeroSnap indicator and positioning

See merge request GNOME/gtk!3795

4 years agoGDK-Win32: Fix AeroSnap indicator and positioning
Chun-wei Fan [Tue, 6 Jul 2021 09:15:39 +0000 (17:15 +0800)]
GDK-Win32: Fix AeroSnap indicator and positioning

Ensure that we take the DPI scaling into account so that surfaces will
be placed at their correct positions upon an AeroSnap operation on HiDPI
displays.

Also, use the X coordinate of the surface as-is during snap up so that
we do not inadvertently move the surface to the very left.  Also fix the
AeroSnap indicator drawing for snap up so that it is drawn at the
correct places.

Since we are updating these functions, make the old GdkWindow-era
variable names to match better the names we use nowadays.

4 years agoMerge branch 'wip/otte/for-master' into 'master'
Benjamin Otte [Thu, 18 Nov 2021 07:38:53 +0000 (07:38 +0000)]
Merge branch 'wip/otte/for-master' into 'master'

label: Don't add a pixel where none should be added

See merge request GNOME/gtk!4173

4 years agolabel: Don't add a pixel where none should be added
Benjamin Otte [Thu, 18 Nov 2021 06:54:16 +0000 (07:54 +0100)]
label: Don't add a pixel where none should be added

When the text width is larger than the measuring width, set the min
width to that value, don't also add 1 to it.

4 years agoMerge branch 'msal4-master-patch-74685' into 'master'
Matthias Clasen [Thu, 18 Nov 2021 04:54:43 +0000 (04:54 +0000)]
Merge branch 'msal4-master-patch-74685' into 'master'

docs: use px unit for font size

See merge request GNOME/gtk!4171

4 years agoMerge branch 'picture-ratio-redraw' into 'master'
Matthias Clasen [Thu, 18 Nov 2021 03:43:54 +0000 (03:43 +0000)]
Merge branch 'picture-ratio-redraw' into 'master'

picture: Setting keep-aspect-ratio requires a redraw

See merge request GNOME/gtk!4172

4 years agopicture: Setting keep-aspect-ratio requires a redraw
Marco Melorio [Thu, 18 Nov 2021 01:39:15 +0000 (02:39 +0100)]
picture: Setting keep-aspect-ratio requires a redraw

4 years agoUpdate section-text-widget.md
Mohammed Salman [Wed, 17 Nov 2021 22:48:14 +0000 (22:48 +0000)]
Update section-text-widget.md

4 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Wed, 17 Nov 2021 11:59:15 +0000 (11:59 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

Don't spam debug messages into TAP output

See merge request GNOME/gtk!4167

4 years agox11: Trap error when getting CRTC info
Jonas Ådahl [Wed, 17 Nov 2021 10:14:00 +0000 (11:14 +0100)]
x11: Trap error when getting CRTC info

This should fix a race happening when RANDR changes quickly, e.g. during
unit testing where tests change monitor configurations rapidly.

4 years agoDon't spam debug messages into TAP output
Matthias Clasen [Tue, 16 Nov 2021 23:45:34 +0000 (18:45 -0500)]
Don't spam debug messages into TAP output

g_log_writer_standard_streams just puts all the logs
out onto stderr and stdout if we don't stop it. Pango
recently grew a bunch of g_debug calls, and those were
now showing up, making all the reftests fail.

4 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Tue, 16 Nov 2021 22:23:31 +0000 (22:23 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

Fix formatting error in demo about dialogs

See merge request GNOME/gtk!4166

4 years agoFix formatting error in demo about dialogs
Matthias Clasen [Sat, 13 Nov 2021 21:27:50 +0000 (16:27 -0500)]
Fix formatting error in demo about dialogs

Try harder to format things nicely.

4 years agoMerge branch 'bilelmoussaoui/since-annotations' into 'master'
Matthias Clasen [Tue, 16 Nov 2021 21:34:58 +0000 (21:34 +0000)]
Merge branch 'bilelmoussaoui/since-annotations' into 'master'

g-i: add missing since annotations

See merge request GNOME/gtk!4154

4 years agoMerge branch 'wip/otte/for-master' into 'master'
Matthias Clasen [Tue, 16 Nov 2021 21:31:48 +0000 (21:31 +0000)]
Merge branch 'wip/otte/for-master' into 'master'

build: Actually use the extra warnings

See merge request GNOME/gtk!4157

4 years agoMerge branch 'wip/carlosg/x11-wm-drags' into 'master'
Matthias Clasen [Tue, 16 Nov 2021 17:21:38 +0000 (17:21 +0000)]
Merge branch 'wip/carlosg/x11-wm-drags' into 'master'

gtkmain: Disable implicit grab active state on CROSSING_GRAB leave events

Closes #4416

See merge request GNOME/gtk!4162

4 years agoMerge branch 'compose-cache-symlinks' into 'master'
Matthias Clasen [Tue, 16 Nov 2021 17:21:04 +0000 (17:21 +0000)]
Merge branch 'compose-cache-symlinks' into 'master'

composetable: invalidate cache based on symlink mtime too

See merge request GNOME/gtk!4163

4 years agoMerge branch 'wip/carlosg/cancelled-gestures' into 'master'
Matthias Clasen [Tue, 16 Nov 2021 17:19:55 +0000 (17:19 +0000)]
Merge branch 'wip/carlosg/cancelled-gestures' into 'master'

gtkwidget: Do not check event sequence state before cancelling gesture

Closes #4387

See merge request GNOME/gtk!4160

4 years agoUpdate Basque translation
Asier Sarasua Garmendia [Tue, 16 Nov 2021 16:28:52 +0000 (16:28 +0000)]
Update Basque translation

4 years agoMerge branch 'ebassi/docs-fixes' into 'master'
Emmanuele Bassi [Tue, 16 Nov 2021 14:04:50 +0000 (14:04 +0000)]
Merge branch 'ebassi/docs-fixes' into 'master'

Small documentation fixes

See merge request GNOME/gtk!4158

4 years agodocs: Add blurb for GtkEditableProperties.
Emmanuele Bassi [Tue, 16 Nov 2021 13:50:52 +0000 (13:50 +0000)]
docs: Add blurb for GtkEditableProperties.

4 years agodocs: Fix description for CellRendererAccelMode
Emmanuele Bassi [Tue, 16 Nov 2021 13:41:52 +0000 (13:41 +0000)]
docs: Fix description for CellRendererAccelMode

Link to the property, instead of copy-pasting its description.

4 years agodocs: Fix link in GtkSymbolicColor description
Emmanuele Bassi [Tue, 16 Nov 2021 13:37:33 +0000 (13:37 +0000)]
docs: Fix link in GtkSymbolicColor description

4 years agocomposetable: invalidate cache based on symlink mtime too
Naïm Favier [Tue, 16 Nov 2021 11:53:38 +0000 (12:53 +0100)]
composetable: invalidate cache based on symlink mtime too

When the compose file is a symbolic link, take the link itself's
modification time into account (in addition to its target's) in
determining whether to invalidate the compose cache.

This is useful e.g. on NixOS systems where the compose file might point
to a store path with an irrelevant modification time, and we want the
cache to expire when the symlink itself changes.

4 years agogtkmain: Disable implicit grab active state on CROSSING_GRAB leave events
Carlos Garnacho [Tue, 16 Nov 2021 09:52:35 +0000 (10:52 +0100)]
gtkmain: Disable implicit grab active state on CROSSING_GRAB leave events

This grab-induced crossing event may come from outer means while there are
buttons pressed (e.g. WM window drags/resizes in X11), the implicit active
state should be undone in that situation.

Also, separate the handling of GDK_LEAVE_NOTIFY, as it's fundamentally
different from GDK_TOUCH_END/CANCEL handling.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4416
4 years agogtkgesture: Do not cancel gesture when setting DENIED state
Carlos Garnacho [Mon, 15 Nov 2021 22:45:47 +0000 (23:45 +0100)]
gtkgesture: Do not cancel gesture when setting DENIED state

Touchpoint state and tracking are tangential, this is mixing up both.
This change was added in the fixes for
https://gitlab.gnome.org/GNOME/gtk/-/issues/3016 but is now unnecessary.

4 years agogtkwidget: Do not check event sequence state before cancelling gesture
Carlos Garnacho [Mon, 15 Nov 2021 22:39:48 +0000 (23:39 +0100)]
gtkwidget: Do not check event sequence state before cancelling gesture

The sequence should be cancelled from the gesture despite its current state.
Also, there was a piece of pointer emulation that was not dropped here,
maybe breaking things further for the pointer emulated touchpoint.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4387
4 years agodocs: Annotate Label.get_selection_bounds() out arguments
Emmanuele Bassi [Mon, 15 Nov 2021 15:33:56 +0000 (15:33 +0000)]
docs: Annotate Label.get_selection_bounds() out arguments

They are optional, and should be marked as such.

See issue: #4452

4 years agodocs: Enable OpenSearch on our references
Emmanuele Bassi [Mon, 15 Nov 2021 15:31:35 +0000 (15:31 +0000)]
docs: Enable OpenSearch on our references

By adding the `docs_url` key in the project configuration file,
gi-docgen will generate an OpenSearch XML file, which allows to add
docs.gtk.org/<reference> as a "search engine" in web browsers.

4 years agobuild: Disable gcc warnings as warnings, too
Benjamin Otte [Mon, 15 Nov 2021 14:34:05 +0000 (15:34 +0100)]
build: Disable gcc warnings as warnings, too

We use -Werror in the build, so even if some warnings are just warnings,
they'd be errors.

4 years agobuild: Actually use the extra warnings
Benjamin Otte [Mon, 15 Nov 2021 13:58:52 +0000 (14:58 +0100)]
build: Actually use the extra warnings

I forgot to remove the '-Werror=' part from all the extra warnings, so
the warning/error flags we generated were '-Werror=-Werror=warning-flag'
or 'W-Werror=warning-flag' - but because our compiler flag checking
infrastructure works so nicely, it just ignored these obviously wrong
flags.

Fixes commit 362e91c40b5036ec0ac0a5a0c231a4b58414509f

4 years agog-i: add missing since annotations
Bilal Elmoussaoui [Sat, 13 Nov 2021 16:33:15 +0000 (17:33 +0100)]
g-i: add missing since annotations

4 years agoUpdate Croatian translation
Goran Vidović [Fri, 12 Nov 2021 13:58:59 +0000 (13:58 +0000)]
Update Croatian translation

4 years agoUpdate Croatian translation
Goran Vidović [Fri, 12 Nov 2021 13:06:50 +0000 (13:06 +0000)]
Update Croatian translation

4 years agoUpdate Hebrew translation
Yaron Shahrabani [Thu, 11 Nov 2021 22:30:08 +0000 (22:30 +0000)]
Update Hebrew translation

4 years agoUpdate Hebrew translation
Yaron Shahrabani [Thu, 11 Nov 2021 22:29:14 +0000 (22:29 +0000)]
Update Hebrew translation

4 years agoUpdate POTFILES.skip
Piotr Drąg [Thu, 11 Nov 2021 13:23:08 +0000 (14:23 +0100)]
Update POTFILES.skip

4 years agoMerge branch 'wip/otte/for-master' into 'master'
Benjamin Otte [Thu, 11 Nov 2021 04:39:58 +0000 (04:39 +0000)]
Merge branch 'wip/otte/for-master' into 'master'

label: Don't do more work than necessary

See merge request GNOME/gtk!4149

4 years agolabel: Don't do more work than necessary
Benjamin Otte [Thu, 11 Nov 2021 04:21:43 +0000 (05:21 +0100)]
label: Don't do more work than necessary

We only want to determine the size pixel-exact, not pango-unit-exact, so
don't spend lots of time wondering if text is half a pixel or a quarter
pixel wider.

4 years agoMerge branch 'wip/otte/no-errors-ever-again' into 'master'
Matthias Clasen [Thu, 11 Nov 2021 00:50:09 +0000 (00:50 +0000)]
Merge branch 'wip/otte/no-errors-ever-again' into 'master'

build: Don't use any -Werror in release builds

Closes #4388

See merge request GNOME/gtk!4148

4 years agobuild: Don't use any -Werror in release builds
Benjamin Otte [Wed, 10 Nov 2021 19:01:36 +0000 (20:01 +0100)]
build: Don't use any -Werror in release builds

Do kep them for debug and debugoptimized builds though.

Keeping -Werror flags in release builds causes issues with forward
compatibility, when new compiler releases or different toolchains
suddenly cause those warnings to be emitted during compilation.

While we certainly want those issues to be investigated and fixed, they
should not prevent anyone from building GTK until they are.

Resolves #4388

4 years agoUpdate Occitan translation
Quentin PAGÈS [Wed, 10 Nov 2021 18:17:30 +0000 (18:17 +0000)]
Update Occitan translation

(cherry picked from commit 7520524aed0272002b121d520df251ef0ea1c8d8)

4 years agoMerge branch 'wip/otte/for-master' into 'master'
Benjamin Otte [Wed, 10 Nov 2021 16:44:56 +0000 (16:44 +0000)]
Merge branch 'wip/otte/for-master' into 'master'

css: Don't crash when color stop offsets descend

Closes #4424

See merge request GNOME/gtk!4143

4 years agocss: Don't crash when color stop offsets descend
Benjamin Otte [Wed, 10 Nov 2021 16:26:13 +0000 (17:26 +0100)]
css: Don't crash when color stop offsets descend

Testcase included.

Fixes #4424

4 years agoUpdated Spanish translation
Daniel Mustieles [Wed, 10 Nov 2021 10:32:36 +0000 (11:32 +0100)]
Updated Spanish translation

4 years agoMerge branch 'flatpak-build-fix' into 'master'
Matthias Clasen [Tue, 9 Nov 2021 20:49:31 +0000 (20:49 +0000)]
Merge branch 'flatpak-build-fix' into 'master'

flatpak: Add pango to manifest

See merge request GNOME/gtk!4142

4 years agoflatpak: Add pango to manifest
Matthias Clasen [Tue, 9 Nov 2021 20:25:48 +0000 (15:25 -0500)]
flatpak: Add pango to manifest

We have a tight coupling with pango, whenever new
pango API appears, our build usually breaks. So
just make our flatpak manifests build pango from git.

4 years agoMerge branch 'wip/otte/for-master' into 'master'
Benjamin Otte [Tue, 9 Nov 2021 19:49:37 +0000 (19:49 +0000)]
Merge branch 'wip/otte/for-master' into 'master'

gtk-demo: Don't use deprecated librsvg API

See merge request GNOME/gtk!4141

4 years agogtk-demo: Don't use deprecated librsvg API
Benjamin Otte [Tue, 9 Nov 2021 19:28:53 +0000 (20:28 +0100)]
gtk-demo: Don't use deprecated librsvg API

New API requires a newer librsvg version, so require that one.

4 years agoMerge branch 'wip/otte/for-master' into 'master'
Benjamin Otte [Tue, 9 Nov 2021 18:31:42 +0000 (18:31 +0000)]
Merge branch 'wip/otte/for-master' into 'master'

label: Handle width-chars > text width

See merge request GNOME/gtk!4139

4 years agolabel: Handle width-chars > text width
Benjamin Otte [Tue, 9 Nov 2021 16:49:40 +0000 (17:49 +0100)]
label: Handle width-chars > text width

This was broken in wrapping labels.

Testcase included.

4 years agoMerge branch 'wip/jimmac/unfocused-selections' into 'master'
Matthias Clasen [Tue, 9 Nov 2021 11:34:37 +0000 (11:34 +0000)]
Merge branch 'wip/jimmac/unfocused-selections' into 'master'

styling: Have unfocused selections

Closes #4393

See merge request GNOME/gtk!4113

4 years agoMerge branch 'master' into 'master'
Matthias Clasen [Tue, 9 Nov 2021 11:28:35 +0000 (11:28 +0000)]
Merge branch 'master' into 'master'

Fix typos

See merge request GNOME/gtk!4132

4 years agoUpdate Occitan translation
Quentin PAGÈS [Tue, 9 Nov 2021 09:45:47 +0000 (09:45 +0000)]
Update Occitan translation

4 years agoUpdate Italian translation
Milo Casagrande [Tue, 9 Nov 2021 08:52:14 +0000 (08:52 +0000)]
Update Italian translation

(cherry picked from commit 3eb1ca3ecbbe4208fc2fb974a25b16a51fdb1b15)

4 years agoUpdate Italian translation
Milo Casagrande [Tue, 9 Nov 2021 08:34:39 +0000 (08:34 +0000)]
Update Italian translation

(cherry picked from commit 4fa318fa194003af9e13199eb3af87b1fd8af86d)

4 years agoMerge branch 'gdksurface-wayland' into 'master'
Jonas Ådahl [Tue, 9 Nov 2021 06:56:27 +0000 (06:56 +0000)]
Merge branch 'gdksurface-wayland' into 'master'

Move some members of `GtkWaylandSurface` to `GtkWaylandToplevel`

See merge request GNOME/gtk!3918

4 years agoMerge branch 'wip/otte/for-master' into 'master'
Benjamin Otte [Tue, 9 Nov 2021 03:15:00 +0000 (03:15 +0000)]
Merge branch 'wip/otte/for-master' into 'master'

lots of sizing fixes

See merge request GNOME/gtk!4131

4 years agoboxlayout: Fix broken min-size-for-opposite-size
Benjamin Otte [Tue, 9 Nov 2021 02:28:29 +0000 (03:28 +0100)]
boxlayout: Fix broken min-size-for-opposite-size

Assume a vbox with 2 wrapping labels saying
  Hello World
  Hi Ho
being measured for their minimum width for 3 rows of text.
This should be layouted like
  Hello
  World
  Hi Ho
and measured accordingly.

However, previously this was layouted as
  Hello World
  Hi Ho
with 1.5 lines being assigned to both labels.
That will obviously not compute the above wrapping which clearly
results in a smaller min width.

A reftest testing exactly this was included.

4 years agoboxlayout: Split loop into if statmement
Benjamin Otte [Tue, 9 Nov 2021 00:59:08 +0000 (01:59 +0100)]
boxlayout: Split loop into if statmement

Turns it into 2 loops, one for the homogeneous part and one for the
complicated part.

4 years agoboxlayout: Don't listen to comments
Benjamin Otte [Mon, 8 Nov 2021 16:49:15 +0000 (17:49 +0100)]
boxlayout: Don't listen to comments

... when they are wrong.

Instead, remove them.

Or in other words: GTK4 does not have a fill child property anymore, so
we don't need to run the measuring loop above to determine the size.

4 years agoRevert "sizerequest: Only check reported baselines if requested"
Benjamin Otte [Sat, 6 Nov 2021 17:26:41 +0000 (18:26 +0100)]
Revert "sizerequest: Only check reported baselines if requested"

This reverts commit cf7fa931d380c6d205478c87f0f3973f496f9d2a.

We store the baseline in the cache and we do not know if baselines might
be queried in the future. So always store them.

No reftest because I don't know how to write one.

premature optimization == √😈

4 years agodemos: Update for climate change and Covid
Benjamin Otte [Sat, 6 Nov 2021 15:39:01 +0000 (16:39 +0100)]
demos: Update for climate change and Covid

4 years agolabel: max-width-chars should be ignored sometimes
Benjamin Otte [Sat, 6 Nov 2021 15:25:11 +0000 (16:25 +0100)]
label: max-width-chars should be ignored sometimes

When a widget is neither wrappable nor ellipsizable, we cannot modify
the label to fit into any size. So we cannot respect max-width-chars.

4 years agolabel: max-width-chars has no effect on smaller text
Benjamin Otte [Sat, 6 Nov 2021 15:17:59 +0000 (16:17 +0100)]
label: max-width-chars has no effect on smaller text

Having a short text and a large max-width-chars should request the
natural width of the text, not the limit from max-width-chars.

This caused huge message dialogs.

Reftests added.

4 years agogdk/wayland/surface: Remove unused argument
Ian Douglas Scott [Fri, 3 Sep 2021 23:37:56 +0000 (16:37 -0700)]
gdk/wayland/surface: Remove unused argument

4 years agogdk/wayland/surface: Move `*idle_inhibitor*` to `GdkWaylandToplevel`
Ian Douglas Scott [Fri, 3 Sep 2021 22:16:59 +0000 (15:16 -0700)]
gdk/wayland/surface: Move `*idle_inhibitor*` to `GdkWaylandToplevel`

4 years agogdk/wayland/surface: Move `*exported` to `GdkWaylandToplevel`
Ian Douglas Scott [Fri, 3 Sep 2021 21:58:18 +0000 (14:58 -0700)]
gdk/wayland/surface: Move `*exported` to `GdkWaylandToplevel`

4 years agogdk/wayland/surface: Move `server_decoration` to `GdkWaylandToplevel`
Ian Douglas Scott [Fri, 3 Sep 2021 21:37:52 +0000 (14:37 -0700)]
gdk/wayland/surface: Move `server_decoration` to `GdkWaylandToplevel`