Commit Graph

77784 Commits

Author SHA1 Message Date
Matthias Clasen
2d121c07c9 Merge branch 'default_theme_relative_font_sizes' into 'main'
theme: use relative font sizes

See merge request GNOME/gtk!6372
2023-09-18 11:16:10 +00:00
Matthias Clasen
cc904698a6 Merge branch 'matthiasc/for-main' into 'main'
contour: Make circles and rounded rects match

See merge request GNOME/gtk!6405
2023-09-18 11:14:39 +00:00
Matthias Clasen
a5fdd1228f Merge branch 'focus-on-click' into 'main'
Focus-on-click improvements

See merge request GNOME/gtk!6336
2023-09-18 10:41:52 +00:00
Sergey Bugaev
271d7632cb text: Respect focus-on-click property
It does make sense to have GtkText not focus on click in some cases,
such as when its editable property is set to false.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
2023-09-18 12:03:54 +03:00
Sergey Bugaev
a8613377a5 colorbutton, fontbutton: Propagate focus-on-click to inner buttons
These widgets wrap a GtkButton internally. Make it possible to prevent
the inner button from grabbing focus on click by propagating the value
of the focus-on-click property from the widget to the inner button.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
2023-09-18 12:03:54 +03:00
Benjamin Otte
d7cf5c2b1b Merge branch 'wip/otte/for-main' into 'main'
gl: gradients should transition in unpremultiplied space

See merge request GNOME/gtk!6406
2023-09-18 06:20:32 +00:00
Benjamin Otte
95865cb1bf gsk: Fix clipping error when drawing shadows
When shadows were offset - in particular when offset so the original
source was out of bounds of the result - the drawing code would create a
pattern for it that didn't include enough of it to compose a shadow.

Fix that by not creating those patterns anymore, but instead drawing the
source (potentially multiple times) at the required offsets.

While that does more drawing, it simplifies the shadow node draw code,
and that's the primary goal of the Cairo rendering.

Test included.
2023-09-18 07:53:03 +02:00
Benjamin Otte
0b813de72a gl: gradients should transition in unpremultiplied space
So make the gradient shaders do that.
2023-09-18 07:53:03 +02:00
Matthias Clasen
9c159cf129 path: Tweak printing a bit more
We are dealing with floats here, so using
g_ascii_dtostr isn't really the best.

Update affected tests.
2023-09-17 22:35:33 -04:00
Matthias Clasen
957d494090 contour: Make circles and rounded rects match
Make sure that we print the weights in the
same way (as floats).

Update affected tests.
2023-09-17 20:32:32 -04:00
Matthias Clasen
968b4237a9 Merge branch 'matthiasc/for-main' into 'main'
path: Fix parsing rounded rects

See merge request GNOME/gtk!6404
2023-09-17 21:19:42 +00:00
Matthias Clasen
f67c57b1f8 path: Fix parsing rounded rects
We were messing up the bottom left corner.

Test included.
2023-09-17 17:01:44 -04:00
Matthias Clasen
84f8c2d91d Merge branch 'matthiasc/for-main' into 'main'
inspector: Don't set a NULL fontdesc

Closes #5988

See merge request GNOME/gtk!6403
2023-09-17 19:17:28 +00:00
Matthias Clasen
8f1d8d7cb5 path: Split off gskpathparse.c
This is a standalone piece of code,
and nicely fits into its own source file.
2023-09-17 12:29:46 -04:00
Matthias Clasen
e98d9d62eb inspector: Don't set a NULL fontdesc
The font dialog button does not like that.

Fixes: #5988
2023-09-17 10:19:05 -04:00
Matthias Clasen
5a0b65c611 Merge branch 'path-builder-simplify' into 'main'
pathbuilder: Simplify degenerate curves

See merge request GNOME/gtk!6402
2023-09-17 13:55:32 +00:00
Matthias Clasen
5777587e7a docs: Add details for GskPathBuilder
Mention that GskPathBuilder will simplify
added Bézier curves.
2023-09-17 09:31:59 -04:00
Matthias Clasen
ecfc661054 Adapt tests to new path builder behavior
Some tests were expecting to get elevated curves
from GskPathBuilder. But they won't, anymore.
2023-09-17 08:53:10 -04:00
Emmanuele Bassi
e00722dee6 Merge branch 'submenu_reporting' into 'main'
a11y: When a menu item opens a submenu, set its expandable state

See merge request GNOME/gtk!5850
2023-09-17 11:02:33 +00:00
Piotr Drąg
5af21e70ec Update Polish translation 2023-09-17 12:15:52 +02:00
Matthias Clasen
7e13cfea91 path builder: Handle degenerate cubics
Replace cubics by lines or quadratics
when possible, and split at cusps.
2023-09-17 00:23:53 -04:00
Matthias Clasen
68b4d9c35e Add gsk_curve_get_cusps 2023-09-17 00:23:53 -04:00
Matthias Clasen
1f3b69e7db path builder: Handle degenerate conics
Do the same we do for quads here. Also,
conics with weight 1 are just quads.
2023-09-17 00:23:53 -04:00
Matthias Clasen
ca63552cf8 path builder: Handle degenerate quads
Quads that have a cusp need to be replaced by
two lines.
2023-09-17 00:23:53 -04:00
Matthias Clasen
a6d2d983b8 Add gsk_bounding_box_get_corner
This will be used in the following commits.
2023-09-16 21:57:31 -04:00
Matthias Clasen
7cd97192e5 pathbuilder: Simplify degenerate curves
When a quadratic or conic has identical points,
replace it with a line.
2023-09-16 14:32:12 -04:00
Matthias Clasen
8ac8bca52a Fix an indentation mishap 2023-09-16 13:39:21 -04:00
Benjamin Otte
cf8f6d254e Merge branch 'wip/otte/for-main' into 'main'
treemodelfilter: Yes gcc, both if branches are empty

See merge request GNOME/gtk!6401
2023-09-16 17:07:10 +00:00
Benjamin Otte
a267dfac5d treeview: No gcc, node is not NULL
... so I'll add an assertion just for you.
2023-09-16 12:18:58 -04:00
Benjamin Otte
745b28ef38 treemodelfilter: Yes gcc, both if branches are empty
... if assertions are disabled.
2023-09-16 12:17:57 -04:00
Matthias Clasen
5c27899efa Merge branch 'matthiasc/for-main' into 'main'
NEWS: Updates

See merge request GNOME/gtk!6400
2023-09-16 15:23:02 +00:00
Matthias Clasen
fd006592b5 Merge branch 'wip/corey/file-chooser-columns' into 'main'
File Chooser Move Column Visible to Column Header Menu

See merge request GNOME/gtk!6377
2023-09-16 14:27:52 +00:00
Matthias Clasen
201f27fe19 NEWS: Updates 2023-09-16 09:52:18 -04:00
Matthias Clasen
36c4dc8aea Merge branch 'contour-cosmetics' into 'main'
contour: Fixes for circles

See merge request GNOME/gtk!6399
2023-09-16 13:18:29 +00:00
Matthias Clasen
f0bd0c3e50 contour: Add more tests for circles
Cover the radius 0 case, in particular.
2023-09-16 08:31:52 -04:00
Matthias Clasen
4d71ff6da1 contour: Fixes for circles
Make circle contours use 'foreach coordinates' for
its points. This works here, but not for general
conics. As with the other custom contours, avoid
emitting collapsed conics.
2023-09-16 08:27:18 -04:00
Matthias Clasen
6d16776e27 tests: Cosmetics 2023-09-16 08:27:08 -04:00
Piotr Drąg
7cdff6bbb3 Update Polish translation 2023-09-16 13:34:39 +02:00
Martin
bf43859bdc Update Slovenian translation
(cherry picked from commit f0e0332ada)
2023-09-16 10:12:14 +00:00
Matthias Clasen
4b45f8415f Merge branch 'contour-cosmetics' into 'main'
contour: Fixes for rects and rounded rects

See merge request GNOME/gtk!6397
2023-09-15 22:30:13 +00:00
Matthias Clasen
86e0d5c13e Merge branch 'switch-rtl' into 'main'
switch: Respect text direction

Closes #1489

See merge request GNOME/gtk!6396
2023-09-15 21:59:15 +00:00
Matthias Clasen
d21ee115d0 Update private path tests
Our parser only recognizes 'complete' rounded
rects, so don't test roundtrips for incomplete
ones.
2023-09-15 16:46:23 -04:00
Matthias Clasen
2dd8e3b0eb contour: Add more tests for rounded rects
This is covering special cases where some
of the curves are omitted.
2023-09-15 16:46:23 -04:00
Matthias Clasen
6d001f79f9 contour: Fixes for rounded rects
Similar to the fixes for rect contours:
Handle all the special cases where empty curves
are omitted, and omit 'empty' curves in foreach.
2023-09-15 16:31:09 -04:00
Matthias Clasen
eb6ca8f39a contour: Add more tests for rects
Spot-check the special cases:
rects with zero height or width.
2023-09-15 16:31:09 -04:00
Matthias Clasen
abebd92b19 contour: Fixes for rect contours
Handle all the special cases (zero width and/or height),
and omit 'empty' curves in foreach.
2023-09-15 16:31:09 -04:00
Matthias Clasen
014ca76334 docs: Add details
Spell out what gsk_path_point_get_tangent does
if there is no tangent: we return 0,0.
2023-09-15 16:31:09 -04:00
Matthias Clasen
a520f9fcf7 pathbuilder: Skip trivial curves
Don't add quads, cubics or conics that collapse
to a single point. This matches what we do for
lines.
2023-09-15 16:31:09 -04:00
Matthias Clasen
de724b2a57 contour: Fix some corner cases
Adding segments of rects or rounded rects was
not working right in cases where some of the
curves are trivial. Fix that.
2023-09-15 16:31:09 -04:00
Matthias Clasen
061637f4eb contour: Small refactoring
Move some utilities out.
2023-09-15 16:31:09 -04:00