Carlos Garnacho
cf20cfd31e
gtk/gesturestylus: Convert motion history from surface coordinates
...
Motion history coordinates are based on GdkSurface coordinates. Transform
the coordinates from the GtkNative they are received on, accounting for the
possible transforms (e.g. due to window borders and shadows).
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3491
2020-12-24 19:59:51 +01:00
Matthias Clasen
7e579bb59a
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
See merge request GNOME/gtk!2997
2020-12-24 07:13:22 +00:00
Benjamin Otte
96e1b85c2c
gdkarray: Add a "stolen" boolean to splice()
...
If set to TRUE, does not call the free func for the removed items.
This can be used to move items between arrays without having to do the
refcounting dance.
2020-12-24 06:38:45 +01:00
Benjamin Otte
71e616d17e
listview: Use the correct scroll policy
...
Use the horizontal policy for horizontal decisions, not the vertical
one.
This broke in 0011ce949c
.
2020-12-24 06:38:45 +01:00
Benjamin Otte
f85d939e5e
docs: Put render nodes in their own sections
2020-12-24 06:38:45 +01:00
Benjamin Otte
8d014d6cb0
roundedbox: Remove unused API
2020-12-24 06:38:45 +01:00
Benjamin Otte
f7f8990f7a
picture: Fix copy/paste error in docs
2020-12-24 06:38:45 +01:00
Benjamin Otte
d6f288427a
video: When autoplaying, start playing once the video is prepared
...
This fixe video sources with longer loading times not automatically
playing.
2020-12-24 06:38:45 +01:00
Benjamin Otte
2a8f371643
gtk-demo: Don't put the search bar in the scroll area
...
1. That's a bad idea UI wise as you can't see the search after you
scrolled.
2. That's a bad idea code-wise because Listviews need to be put into
a ScrolledWindow or they won't scroll.
2020-12-24 06:38:45 +01:00
Benjamin Otte
dee863dbb2
rendernode: Bail if matrix is invalid
...
Invalid matrices are okay in GSK (and GL), but not in Cairo.
Testcase included.
2020-12-24 06:38:45 +01:00
A S Alam
7d6877ec80
Update Punjabi translation
2020-12-23 19:48:28 +00:00
Danial Behzadi
f426d23690
Update Persian translation
2020-12-23 15:53:07 +00:00
Matthias Clasen
e128a77eed
Merge branch 'matthiasc/for-master' into 'master'
...
window: Release application in destroy
See merge request GNOME/gtk!2994
2020-12-23 03:01:55 +00:00
Matthias Clasen
5cd2ee927a
window: Release application in destroy
...
We used to do this; it was lost in some life-cycle
reshuffling.
2020-12-22 20:34:13 -05:00
Matthias Clasen
e854b90293
Merge branch 'wip/baedert/for-master' into 'master'
...
Wip/baedert/for master
See merge request GNOME/gtk!2990
2020-12-22 04:53:31 +00:00
Matthias Clasen
6d042d9e61
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2988
2020-12-22 02:29:03 +00:00
Matthias Clasen
4310f24a4e
Fix warnings with Vulkan < 162
...
Tiring to watch the Vulkan people stumble through
ABI and API compat, but what can you do.
2020-12-21 20:00:16 -05:00
Matthias Clasen
aebf8e3c29
Merge branch 'mcatanzaro/fix-gtk-builder-tool' into 'master'
...
Fix buffer overruns in 'gtk-builder-tool simplify'
See merge request GNOME/gtk!2987
2020-12-21 22:49:42 +00:00
Matthias Clasen
fcd449f0d4
modelbutton: Remove an unused field
...
We're not using the centered field anymore.
2020-12-21 17:45:01 -05:00
Michael Catanzaro
ab1b117d91
Fix buffer overruns in 'gtk-builder-tool simplify'
...
Oops, here we allocate only one byte for each pointer we want to store.
We need to multiply by the size of a pointer.
2020-12-21 15:39:34 -06:00
Emmanuele Bassi
1253296387
Merge branch 'fix-printbackends' into 'master'
...
Fix the value for the print-backends setting
Closes #3486
See merge request GNOME/gtk!2986
2020-12-21 20:04:26 +00:00
Matthias Clasen
466484176f
Merge branch 'ebassi/docs-for-master' into 'master'
...
Ebassi/docs for master
See merge request GNOME/gtk!2983
2020-12-21 19:22:38 +00:00
Matthias Clasen
20289ad8e1
Fix the value for the print-backends setting
...
This was broken in the meson conversion, causing
us to default to "" instead of the built print
backends.
Fixes : #3486
2020-12-21 14:10:03 -05:00
Matthias Clasen
0abb8c6862
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2984
2020-12-21 19:00:10 +00:00
Matthias Clasen
147386189f
inspector: Show glyphs as in node files
...
Reuse the glyph serialization code from gsk to
show glyphs in the same way here.
2020-12-21 13:11:46 -05:00
Matthias Clasen
9cec9e4ce2
gsk: Export the glyph serialization privately
...
We want to use the same serialization in the inspector,
so export this function.
2020-12-21 13:11:08 -05:00
Matthias Clasen
26119af7a6
gsk: Improve glyph serialization
...
The special case for ASCII glyphs is unfortunately not
working very well, because of an oversight in pango:
When I added subpixel positioning, I made pango_shape()
default to not rounding, and make PangoLayout call
pango_shape_with_flags() and pass the rounding information
down. The upshot is that we need to use the _with_flags
variant here and tell it to round position, so it matches
what the text node contains.
2020-12-21 13:08:34 -05:00
Timm Bäder
478d1f71e3
Merge branch 'fix-node-glyphs' into 'master'
...
gsk: Fix serialization of glyphs
Closes #3496
See merge request GNOME/gtk!2982
2020-12-21 17:16:38 +00:00
Emmanuele Bassi
b1d952b8a2
docs: Add examples for GtkDropTarget
...
Like we did for GtkDragSource.
2020-12-21 17:11:42 +00:00
Emmanuele Bassi
b9bcdbbfdc
docs: Add examples of GtkDragSource use
...
The description is a bit terse; we should help out application
developers some more.
2020-12-21 17:03:59 +00:00
Emmanuele Bassi
6c31ed53f4
docs: Fix typo and whitespace
2020-12-21 17:03:42 +00:00
Matthias Clasen
aa95ae774f
gsk: Fix serialization of glyphs
...
We were forgetting to put a space between two numbers
in some cases, confusing the parser.
Test included.
Fixes : #3496
2020-12-21 10:49:56 -05:00
Emmanuele Bassi
65adfd9243
Merge branch 'box_docs' into 'master'
...
box: improve documentation
Closes #3499
See merge request GNOME/gtk!2981
2020-12-21 15:40:07 +00:00
Yetizone
c4a8c0893b
box: improve documentation
...
Rephrase a function parameter description and remove "." from all function parameters descriptions
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3499
2020-12-21 17:26:23 +02:00
Timm Bäder
e90f5e8a20
gskpango: Don't copy fg color
...
No need to do that here, we copy it in to the individual render nodes
anyway.
2020-12-21 15:23:25 +01:00
Timm Bäder
526c76181e
gl renderer: Check for pointer equality in rounded_rect_equal
2020-12-21 15:22:08 +01:00
Timm Bäder
cf352374ae
gskpango: Correct a comment
...
Not all other draw calls will use cairo.
2020-12-21 13:23:28 +01:00
Timm Bäder
98b99201b0
gskpango: Remove bounds rect
...
We only need this to render shapes and trapezoids, i.e. only when
falling back to cairo. Remove code to measure the layout and convert the
ink_rect to a graphene_rect_t from gtk_snapshot_append_layout() and do
it when drawing shapes and trapezoids instead.
2020-12-21 12:56:38 +01:00
Timm Bäder
bce4d669ee
gskpango: Fix a potential cairo_t leak
...
The previous early return did not cairo_destroy() it.
2020-12-21 12:49:06 +01:00
Timm Bäder
e7a326e230
label: Refactor get_layout_location()
...
Rename a few local variables to be clearer about whether they belong to
the widget or to the layout.
Remove a workaround for an old bug that is no longer valid. We don't
underallocate the layout anymore. Aways center vertically, with respect
to the yalign.
2020-12-21 12:44:01 +01:00
Timm Bäder
9eaeaa8452
label: Refactor snapshot()
...
Use two early-out style if statements to reduce indentation in this
entire function.
2020-12-21 12:32:32 +01:00
Timm Bäder
2031c5bf90
textlayout: Remove dead offset_y code
2020-12-21 10:26:03 +01:00
Timm Bäder
9fefa7b44c
rendernode: Different uniformity in border nodes
...
Means they are different and a diff is impossible.
2020-12-21 10:26:03 +01:00
Timm Bäder
a2a70c3b65
rendernode: Sort diff() requirements by complexity
2020-12-21 10:26:03 +01:00
Timm Bäder
0b4ed8d791
renderborder: Avoid 0 width outline color nodes
2020-12-21 10:26:03 +01:00
Timm Bäder
c34f98931e
layoutoverlay: Avoid adding transparent color nodes
...
We have a region for the border here, but the color is defined as
transparent black because we don't want to render anything for it.
This way, the generated .node file for the listbox demo in gtk4-demo
with enabled layout borders is 3.5MB instead of 3.8MB.
2020-12-21 10:26:03 +01:00
Timm Bäder
2feac2772f
layoutoverlay: Avoid adding 0 sized color nodes
...
This way, the output node file of the listbox demo in gtk4-demo with
enabled layout borders is only 3.8MB instead of 12MB.
2020-12-21 10:26:03 +01:00
Timm Bäder
fdda4e4e99
GskTransform: Add nullable annotations to _equals()
...
Both can be NULL here.
2020-12-21 10:26:03 +01:00
Timm Bäder
e1cf0cff26
gl renderer: Proper state tracking for color matrix ops
2020-12-21 10:26:03 +01:00
Timm Bäder
634fa772c9
gl renderer: Add missing debug output for repeat ops
2020-12-21 10:26:03 +01:00