Benjamin Otte
bf5350e13c
Merge branch 'label-sizing' into 'master'
...
Make label-sizing reftest pass
See merge request GNOME/gtk!4076
2021-10-19 00:19:52 +00:00
Benjamin Otte
3742fabae0
widget: Don't overadjust allocations
...
When adjusting allocations, don't query height for the current width,
but query it for the adjusted width.
And adjust width not to the width-for-any-height, but to
width-for-allocated-height.
2021-10-19 01:55:59 +02:00
Benjamin Otte
192e554f3e
testsuite: don't XFAIL label-sizing anymore
...
It's fixed now.
2021-10-19 01:10:59 +02:00
Benjamin Otte
00214cbb4a
testsuite: Add test specifically for recent fix
...
label-sizing.ui tests this, too - but that test tests lots of other
things, and if this ever happens again, we want to debug it in a small
test.
2021-10-19 01:10:59 +02:00
Benjamin Otte
ba44e7a228
label: Never measure more than max-width-chars
...
Even when we have tons of width available, still do the wrapping at
max-width-chars.
This is what happened in GTK3, too, but it happened automatically
because GTK3 did for_size = MIN (for_size, nat_size) and GTK4 does not.
So we do this manually in the label now.
Fixes the label-sizing.ui reftest.
2021-10-19 01:04:25 +02:00
Benjamin Otte
cad979b734
reftest: On failure, save the node files, too
...
Doesn't hurt to have them available, so it's easy to figure out if a
failure is due to the renderer or if we're generating wrong node files.
2021-10-19 01:01:36 +02:00
Emmanuele Bassi
ad46e65dff
Merge branch 'wip/cdavis/flowbox-add-functions' into 'master'
...
gtkflowbox: Add prepend() and append()
Closes #4277
See merge request GNOME/gtk!4013
2021-10-18 21:09:10 +00:00
Matthias Clasen
5dec1b0cc0
Merge branch 'wip/baedert/for-master' into 'master'
...
Some fixes, hmm yes
See merge request GNOME/gtk!4068
2021-10-18 20:58:46 +00:00
Matthias Clasen
5ff9f4a435
Merge branch 'matthiasc/for-master' into 'master'
...
Small fixes
Closes #4248
See merge request GNOME/gtk!4072
2021-10-18 18:00:33 +00:00
Matthias Clasen
bd1649e5f4
Merge branch 'feature/calendar-first-day' into 'master'
...
calendar: Fix abbreviated day names
Closes #4338
See merge request GNOME/gtk!4061
2021-10-18 15:08:35 +00:00
Matthias Clasen
b7cab5c5eb
ci: Allow macos to fail
...
The macos runner is out of commission atm
2021-10-18 11:00:27 -04:00
Jonas Ådahl
6067a556d7
Merge branch 'work/reset_opaque' into 'master'
...
wayland: Mark opaque_region as dirty on hide
See merge request GNOME/gtk!4020
2021-10-18 13:45:32 +00:00
Jonas Ådahl
6a07a853b0
Merge branch 'work/tidy' into 'master'
...
wayland: miscellaneous minor tidy ups
See merge request GNOME/gtk!4066
2021-10-18 13:44:52 +00:00
Benjamin Otte
886f435fc8
Merge branch 'wip/otte/for-master' into 'master'
...
glcontext: reinstate another missing "!"
See merge request GNOME/gtk!4070
2021-10-18 13:32:02 +00:00
Matthias Clasen
96e837ae9f
Improve a msgid
...
Instead of gl-context, say "GL Context".
Fixes : #4248
2021-10-18 08:35:54 -04:00
Matthias Clasen
bddf9f9ca3
docs: Cosmetics
...
Do a round of "the the" removal.
2021-10-18 08:35:54 -04:00
Matthias Clasen
5f3062aff0
docs: Cosmetics
2021-10-18 08:35:54 -04:00
Benjamin Otte
a859471960
testsuite: Add workarounds for non-gl backends
...
read: Fix tests for broadway
2021-10-18 14:17:11 +02:00
Benjamin Otte
5b47391162
broadway: Use gdk_texture_save_to_png_bytes()
...
Instead of using Cairo, save the texture directly.
2021-10-18 12:08:57 +02:00
Benjamin Otte
dcba783389
gdk: Rework gdk_pixbuf_get_from_texture()
...
Make it use gdk_memory_texture_from_texture().
Also make gdk_memory_format_alpha() privately available so that we can
detect if an image contains an alpha channel.
2021-10-18 12:08:57 +02:00
Benjamin Otte
7eceed8d4d
jpeg: Use gdk_memory_texture_from_texture()
2021-10-18 12:08:57 +02:00
Benjamin Otte
800246402f
tiff: Refactor
...
Now we support all the formats.
2021-10-18 12:08:57 +02:00
Benjamin Otte
c7e36bcf22
gltexture: Fix conditions for glGetTexImage() call
...
The conditions were inverted, plus we failed to limit this call to
non-GLES.
2021-10-17 22:28:44 +02:00
Benjamin Otte
79d2a14061
glcontext: reinstate another missing "!"
...
A leftover from aa0c22b648
.
2021-10-17 22:28:44 +02:00
Timm Bäder
085f0171c1
Ensure blur nodes have a positive blur radius
2021-10-17 12:15:34 +02:00
Timm Bäder
e7ac8275ea
main: Flip set_widget_active_state() logic
...
The function used to take a boolean, just to set the active state of the
widget to the exact opposite of that boolean. Fix that.
2021-10-17 11:21:00 +02:00
Timm Bäder
03d4ac1863
theme: enable tabular numbers in GtkCalendar
...
It aligns numbers a lot so this makes sense.
2021-10-17 11:12:14 +02:00
Timm Bäder
a61999170e
fontrendering: Protect against NULL hints
2021-10-17 11:12:14 +02:00
Timm Bäder
beda50f631
cssparser: Make a signed expression unsigned
2021-10-17 11:12:14 +02:00
Benjamin Otte
cf7ee82755
Merge branch 'fix-dnd-coordinates-on-windows' into 'master'
...
Fix DND coordinates on Windows
See merge request GNOME/gtk!3930
2021-10-16 17:04:26 +00:00
Benjamin Otte
f6e5a33952
Merge branch 'wip/otte/for-master' into 'master'
...
glcontext: Reinstate missing "!"
Closes #4349
See merge request GNOME/gtk!4067
2021-10-16 14:11:00 +00:00
Benjamin Otte
7a50ebaa3f
gdk: Move GdkMemoryFormat enum to gdktypes.h
...
It's used in too many places now.
2021-10-16 15:49:37 +02:00
Benjamin Otte
aa0c22b648
glcontext: Reinstate missing "!"
...
Replacing the return_if_fail()s in commit f584d4f500
lost the
inversions.
Fixes #4349
2021-10-16 15:49:02 +02:00
David Edmundson
aa258fa17f
wayland: port code to g_clear_pointer
2021-10-15 12:03:57 +01:00
David Edmundson
66de8f33fb
wayland: drop unused member variables
2021-10-15 11:53:18 +01:00
Benjamin Otte
a7ef4c75ea
Merge branch 'wip/otte/memoryformat' into 'master'
...
Refactor various texture machinery
See merge request GNOME/gtk!4057
2021-10-13 12:51:37 +00:00
Benjamin Otte
9a2e9c5be4
gl: Use gdk_memory_texture_new_from_texture()
...
Way less code to prepare the texture in a proper format.
2021-10-13 14:33:44 +02:00
Benjamin Otte
ddc4a40c33
gl: Refactor texture uploading
...
Don't pass texture + rect, but instead have
gdk_memory_texture_new_subtexture()
and use it to generate subtextures and pass them.
This has the advantage of downloading the a too large texture only once
instead of N times.
2021-10-13 14:33:44 +02:00
Benjamin Otte
52e88ed4c8
gltexture: Determine format in current thread
...
Close widget-factory and observe:
Thread 1:
* acquire main loop
* handle close button
* close window
* dispose video and media stream
* stop GstPlayer
WAIT on pipeline stopping
Thread 2:
* prepare next image in pipeline
* hand image to GtkGstSink
* create GdkTexture from image
* gdk_gl_texture_new() determines format
WAIT on acquiring main loop
Sounds like a deadlock?
Indeed, so don't do that.
2021-10-13 14:33:44 +02:00
Benjamin Otte
5199bebdb5
gl: Move texture uploading to the renderer
...
It does not belong in GdkGLContext, it's a renderer thing.
It's also the only user of that API.
Introduce gdk_gl_context_check_version() private API to make version
checks simpler.
2021-10-13 14:33:44 +02:00
Benjamin Otte
31e9072906
gl: Fix downloading textures *again*
...
It turns out glReadPixels() cannot convert pixels and you are only
allowed to pass a single value into the function arguments. You need to
know which ones or things will explode.
GL is great.
2021-10-13 14:33:44 +02:00
Benjamin Otte
c2368cc605
png: Refactor png saving
...
Do all the memory format shenanigans in GTK now and support all the PNG
formats.
2021-10-13 14:33:44 +02:00
Benjamin Otte
1e7fb52b21
Add memory formats used by libpng
...
Add unpremultiplied high-depth formats. They are used in the real world,
so let's support them.
2021-10-13 14:33:44 +02:00
Sveinn í Felli
71eece2f35
Update Icelandic translation
...
(cherry picked from commit 83b3c7d826
)
2021-10-12 22:48:16 +00:00
Christopher Davis
454ca897bb
gtkflowbox: Add prepend() and append()
...
These functions are common across container implementations,
but GtkFlowBox was missing them.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4277
2021-10-12 11:07:17 -07:00
Niels De Graef
41ca09d645
calendar: Add an explanatory comment
...
On the magic numbers used to get the abbreviated day names.
2021-10-12 19:37:13 +02:00
Rafael Fontenelle
24b7eec687
Update Brazilian Portuguese translation
...
(cherry picked from commit 4b9260608a
)
2021-10-12 17:34:01 +00:00
Niels De Graef
dcbfd61558
calendar: Fix abbreviated day names
...
... if the current locale has a different starting day than Sunday.
This needed 2 fixes:
* We need to take into account `calendar->week_start` when
creating/adding the appropriate `day_name_labels` field
* we were only calculating `calendar->week_start` _after_ attaching the
`day_name_labels`, so it was still set to 0 (the default value).
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4338
2021-10-12 19:29:26 +02:00
Emmanuele Bassi
e98b83dade
Merge branch 'bilelmoussaoui/gtk-snapshot' into 'master'
...
gtk: fix Snapshot.push_shadow annotation
See merge request GNOME/gtk!4060
2021-10-12 11:09:13 +00:00
Bilal Elmoussaoui
257adb4464
gtk: fix Snapshot.push_shadow annotation
2021-10-12 09:00:03 +00:00