Commit Graph

77678 Commits

Author SHA1 Message Date
Matthias Clasen
51a44ddd1d Merge branch 'bilelmoussaoui/gi-docgen-links' into 'main'
docs: Stop using C symbols as links

See merge request GNOME/gtk!6310
2023-08-21 04:14:57 +00:00
Benjamin Otte
29cdac18e8 rendernodeparser: Handle dashing in strokes
That part of the original MR got lost while refactoring.

Put it back.
2023-08-21 05:23:44 +02:00
Benjamin Otte
418f6b35af gsk: Add gsk_rect_to_float()
... and use it.
2023-08-21 05:23:42 +02:00
Benjamin Otte
96a6e05f0b build: Add -Woverride-init
That's a gcc warning (clang has the equivalent -Winitializer-overrides,
but that one is included in -Wall) that complains about things like:

  VkOffset3D offset = { .x = pt.x, .x = pt.y, .y = 0 };

So you don't have to spend a few hours trying to understand what's going
on before realizing your copy/paste skills are substandard.
2023-08-21 05:20:31 +02:00
Benjamin Otte
d665d2fb89 vulkan: Add nonuniformEXT() where needed
The magical term to know about (because the GLSL compiler or the
validation layers sure as hell don't) is:

  "dynamically uniform expression"

because if you don't have that when indexing a texture or buffer array,
you need to add nonuniformEXT() around the index variable.

Fixes the close icon on AMD having glitches of the previous icon visible
in some pixels.
2023-08-21 05:19:44 +02:00
Benjamin Otte
8862666b5a build: GSK doesn't depend on gdk-pixbuf 2023-08-21 05:19:37 +02:00
Benjamin Otte
3adf02445f build: Don't use configure_file() when custom_target() works
These two files don't need to be built when configuring, they are only
needed during build.
2023-08-21 05:19:37 +02:00
Benjamin Otte
bfdd325d36 widget: Remove unused headers from gtkwidget.h
... and put them back in places where they are needed.
2023-08-21 05:19:37 +02:00
Jürgen Benvenuti
ac76cadf32 Update German translation
(cherry picked from commit f237c85c8f)
2023-08-20 17:47:37 +00:00
Bilal Elmoussaoui
5516ff6a02 docs: Stop using C symbols as links
They are much harder for the bindings to figure out the type back from it and usually just break
2023-08-20 10:59:49 +02:00
Baurzhan Muftakhidinov
f2578fcfb9 Update Kazakh translation 2023-08-19 18:04:04 +00:00
Piotr Drąg
4da80520b8 Update Polish translation 2023-08-19 17:18:25 +02:00
Matthias Clasen
b12a27083d path: Drop special contour parsing
This is not used currently, since we don't
have custom contours.
2023-08-18 18:06:44 -04:00
Matthias Clasen
07ec266a00 curve: Add a get_derivative vfunc 2023-08-18 13:46:42 -04:00
Sabri Ünal
965b3025d9 Update Turkish translation 2023-08-18 17:35:14 +00:00
Matthias Clasen
88e74ca21e path: Don't accept 'O' as path command
We don't have conics atm.
2023-08-18 13:19:48 -04:00
Matthias Clasen
148da12cfc Cosmetics 2023-08-18 13:19:33 -04:00
Matthias Clasen
3ded6ada0c Merge branch 'matthiasc/for-main' into 'main'
contour: Optimize bounds

See merge request GNOME/gtk!6304
2023-08-18 14:35:09 +00:00
Matthias Clasen
0c39890e0f contour: Optimize bounds
Cache the bounds in the contour, and compute
the stroke bounds based on it as well.
2023-08-18 10:02:14 -04:00
Sergey Bugaev
e45cba13ed paintable: Implement gdk_paintable_default_get_current_image ()
Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
2023-08-18 11:10:22 +03:00
G.Willems
b4977decc1 gtktexthistory: restore 'modified' flag on redo
When redoing a history entry, its `is_modified` flag is not
reflected to the history state tracker. So GtkTextBuffers may
expose a modified=FALSE status, despite a change was actually
applied to the buffer.

For the undo case, an `is_modified_set` flag was set on the last
entry of the undo queue when a change of the modified state of
the history is requested. This commit does the same on the first
entry of the redo queue.

Closes #5777
2023-08-17 22:26:00 +02:00
Jiri Grönroos
2da9d5862f Update Finnish translation 2023-08-17 17:51:26 +00:00
Matthias Clasen
b948e03e8a Merge branch 'dboles/popover-menu-flags-property' into 'main'
PopoverMenu: Make :flags a property for use in UI…

Closes #6030

See merge request GNOME/gtk!6298
2023-08-17 10:26:16 +00:00
Daniel Boles
2c90cadef4 PopoverMenu: Make :flags a property for use in UI…
…files, or other cases other than calling new_from_model_full(), which
generally makes it far easier to experiment with the effect of flags,
including by changing the value of the property in the Inspector.

fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/6030#note_1818229
2023-08-17 10:52:35 +01:00
Matthias Clasen
08c064d79a Merge branch 'matthiasc/for-main' into 'main'
Rename an internal function

See merge request GNOME/gtk!6301
2023-08-16 20:40:12 +00:00
Matthias Clasen
73853f1a6b contour: Add an assertion 2023-08-16 16:18:38 -04:00
Matthias Clasen
8634d67cff Some fixes for gsk_path_builder_add_segment
We must be careful with single-point contours
that contain just a move. These never occur in
practice, but our randomized tests produce them
regularly.
2023-08-16 16:15:26 -04:00
Matthias Clasen
125ea90894 Rename an internal function
We want the number of ops, not the number of points.
2023-08-16 15:54:46 -04:00
Matthias Clasen
ffba5a3f42 Merge branch 'matthiasc/for-main' into 'main'
build: Drop some unused variables

See merge request GNOME/gtk!6297
2023-08-16 19:28:12 +00:00
Matthias Clasen
60df21213b Merge branch 'dboles/popover-css-nodes' into 'main'
Popover: Fix & add to CSS nodes documentation

See merge request GNOME/gtk!6300
2023-08-16 19:16:12 +00:00
Sabri Ünal
14ba577acb Update Turkish translation 2023-08-16 18:31:30 +00:00
Benjamin Otte
7d5ef1117e Merge branch 'color-matrix' into 'main'
Color matrix node fixes & clarifications

See merge request GNOME/gtk!6290
2023-08-16 17:07:35 +00:00
Daniel Boles
af0e2bff94 Popover: Fix & add to CSS nodes documentation
* The `.background` class gets put on `popover`, not `content`
* Use backticks to style node and class names with monospace
* Link to GtkPopoverMenu
* Add to PopoverMenu a bit outlining how items and sections look in CSS.
2023-08-16 17:11:45 +01:00
Matthias Clasen
7d65f81d7f Merge branch 'path-world-resource' into 'main'
Fix MSVC build (turn world map path into a resource)

See merge request GNOME/gtk!6296
2023-08-16 13:51:32 +00:00
Matthias Clasen
b08ecfcf9e build: Drop some unused variables
We are not using gtk_private_packages at all,
so drop it.
2023-08-16 09:43:34 -04:00
Matthias Clasen
e2cd362f24 Merge branch 'fg_color_docs' into 'main'
gsk: Update docs for gtk_snapshot_append_layout

See merge request GNOME/gtk!6295
2023-08-16 12:52:43 +00:00
Yuri Chornoivan
1a1b6fe66b Update Ukrainian translation 2023-08-16 11:37:47 +00:00
Sergey Bugaev
122176a3a1 gtk-demo: Turn world map path into a resource
The C string literal way way too long for MSVC.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
2023-08-16 14:35:35 +03:00
Matthias Clasen
5beccc8208 Merge branch 'fix-pc-files' into 'main'
meson: Add wayland-client to gtk4-wayland requires

See merge request GNOME/gtk!6293
2023-08-16 11:29:39 +00:00
Matthias Clasen
6715a3267a Merge branch 'remove-out-caller-allocates-from-pod-types' into 'main'
introspection: Remove 'caller-allocates' from POD types

See merge request GNOME/gtk!6294
2023-08-16 11:29:25 +00:00
Alexandros Theodotou
313078b77c
gsk: Update docs for gtk_snapshot_append_layout
Mention how to get the current theme's foreground color.
2023-08-16 20:09:15 +09:00
Sergey Bugaev
246a7cfeab rendernode, snapshot: Slightly expand color matrix docs
Based on reverse engineering the color node and contrary to my
expectations, the matrix/offset is expressed in, and applied to,
unpremultiplied colors. The colors are being explicitly
unpremultiplied, transformed according to the matrix/offset, and
premultiplied back (see color_matrix.glsl). The matrix is getting
transposed.

Also, copy the same blurb to the corresponding GtkSnapshot function.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
2023-08-16 13:55:04 +03:00
Sergey Bugaev
082fdfdb24 snapshot: Fix merging color matrix nodes
The code was appliying the matrices in the wrong order: we have to apply
the inner node's matrix first, and the outer one second. Due to the
matrices being implicitly transposed, the matrix multiplication was done
in the right order, yet the wrong matrix was being mutliplied by the
wrong offset vector.

To make the code a little easier to follow, create explicit variables
for the resulting matrix and offset (instead of reusing matrix2 and
offset2), and fix & expand the comment to document how matrix
transposition factors into this.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
2023-08-16 13:54:54 +03:00
Philip Chimento
823cb714ec introspection: Remove 'caller-allocates' from POD types
The (out caller-allocates) and (out callee-allocates) annotations are
meant for structured or pointer types. Plain old data types are just
regular out parameters and don't need the annotation about who allocates
them.

See glib!2005, gjs#570
2023-08-15 22:30:27 -07:00
Ekaterine Papava
cc93347fe6 Update Georgian translation 2023-08-16 03:36:32 +00:00
Xavier Claessens
d6a07cd617 meson: Add x11_dep to gtk4-x11 requires 2023-08-15 21:17:39 -04:00
Fran Dieguez
858bd9f84c Update Galician translation 2023-08-15 23:40:15 +00:00
Matthias Clasen
be7e5c866f Merge branch 'matthiasc/for-main' into 'main'
gsk: Add more details to the docs

See merge request GNOME/gtk!6292
2023-08-15 19:27:59 +00:00
Matthias Clasen
93a90bafc3 Add some statistics to the map demo 2023-08-15 13:55:46 -04:00
Xavier Claessens
090e01b383 meson: Add wayland-client to gtk4-wayland requires 2023-08-15 13:35:46 -04:00