Commit Graph

77321 Commits

Author SHA1 Message Date
Benjamin Otte
50287601b7 demos: Add cute maze demo 2023-08-06 11:54:07 -04:00
Benjamin Otte
272484fe81 demos: Add a text-on-path demo 2023-08-06 11:54:07 -04:00
Benjamin Otte
37188d3b77 demos: Add a simple demo filling a path 2023-08-06 11:54:07 -04:00
Benjamin Otte
153c43c93d WIP: css: Replace border rendering code with GskPath
The weight is wrong still, I need to compute the correct one to get real
45deg circle corners and not just roughly correct ones.
2023-08-06 11:54:07 -04:00
Matthias Clasen
85712acc82 gsk: Add tests for gsk_path_dash 2023-08-06 11:54:07 -04:00
Matthias Clasen
ce121de1f8 Add gsk_path_dash
This is a function like gsk_path_foreach, but
it provides a dashed version of the path instead
of the original.
2023-08-06 11:54:07 -04:00
Benjamin Otte
e7ff6e2547 snapshot: Add gtk_snapshot_push_stroke()
This is the obvious GtkSnapshot API to go
along with the new stroke nodes.
2023-08-06 11:54:07 -04:00
Benjamin Otte
5b672e6b99 gsk: Add GskStrokeNode
Take a rendernode as source and a GskPath and GskStroke,
and fill the area that is covered when stroking the path
with the given stroke parameters, like cairo_stroke() would.
2023-08-06 11:54:07 -04:00
Matthias Clasen
a715e69640 Add gsk_path_get_stroke_bounds
This is a help to compute the bounds for
stroke nodes. We keep it private for now.
2023-08-06 11:54:07 -04:00
Matthias Clasen
5a54b764bd Add GskStroke
A GskStroke struct collects the parameters that are
needed for stroking a path.
2023-08-06 11:54:07 -04:00
Matthias Clasen
60561edc78 Add another curve decomposition test
This one uses GskPathMeasure to check that
our conic approximations look roughly right.
2023-08-06 11:54:07 -04:00
Matthias Clasen
889f4525fe Add tests for GskPathMeasure 2023-08-06 11:54:07 -04:00
Matthias Clasen
b40d3f73c5 Add GskPathMeasure
GskPathMeasure is an auxiliary object for
measuring path lengths.
2023-08-06 11:54:07 -04:00
Benjamin Otte
dc7a4651c1 gtk: Add gtk_snapshot_push_fill()
This is the obvious GtkSnapshot API to go
along with the new fill nodes.
2023-08-06 11:54:07 -04:00
Benjamin Otte
dffcc31ecc gsk: Add GskFillNode
Take a rendernode as source and a GskPath and fill
the region inside the path with the source, just like
cairo_fill() would.
2023-08-06 11:54:07 -04:00
Matthias Clasen
7e623b307b gsk: Add tests for GskPath 2023-08-06 11:54:07 -04:00
Matthias Clasen
dc29d15f59 gsk: Add tests for GskCurve 2023-08-06 11:54:07 -04:00
Matthias Clasen
712e706739 gsk: Add GskPath
This commit adds the basic infrastructure for paths.
The public APIs consists of GskPath, GskPathPoint and
GskPathBuilder.

GskPath is a data structure for paths that consists
of contours, which in turn might contain Bézier curves.

The Bezier data structure is inspired by Skia, with separate
arrays for points and operations. One advantage of this
arrangement is that start and end points are shared
between adjacent curves.

In addition to the usual contours comprised of Bézier
segments, GskPath supports specialized contours directly,
such as rectangles, rounded rectangles and circles.
2023-08-06 11:54:06 -04:00
Matthias Clasen
83834ca57b Add a bounding box type
graphene_rect_t is not well-suited for this purpose,
since you end up with floating-point precision problems
at the upper bound (x + width, y + height).
2023-08-06 11:53:17 -04:00
Piotr Drąg
7511d4e281 Update Polish translation 2023-08-06 14:22:51 +02:00
Asier Sarasua Garmendia
53ea97decb Update Basque translation 2023-08-06 07:20:22 +00:00
Matthias Clasen
28190ded71 Merge branch 'matthiasc/for-main' into 'main'
Update tests

See merge request GNOME/gtk!6244
2023-08-05 19:32:56 +00:00
Matthias Clasen
8083cb0e47 Merge branch 'smaller-than' into 'main'
section-accessibility: Close tag

See merge request GNOME/gtk!6243
2023-08-05 19:21:44 +00:00
Matthias Clasen
d241ec4f3e Update tests 2023-08-05 15:02:00 -04:00
Hari Rana
544320a961 section-accessibility: Close tag 2023-08-05 12:25:23 -04:00
Florentina Musat
ee5a95ba24 Update Romanian translation 2023-08-05 15:54:45 +00:00
Jordi Mas
232260b86b Update Catalan translation 2023-08-05 17:30:28 +02:00
Matthias Clasen
857f50649c Merge branch 'microoptimize-label-wfh' into 'main'
Microoptimize GtkLabel width-for-height computation

See merge request GNOME/gtk!6219
2023-08-05 15:15:55 +00:00
Matthias Clasen
a39d9d60a7 Merge branch 'bilelmoussaoui/tree-deprecated' into 'main'
gi: Mark more GtkTreeModel types as deprecated

See merge request GNOME/gtk!6241
2023-08-05 12:09:25 +00:00
Bilal Elmoussaoui
5f9bc97291 gi: Mark more GtkTreeModel types as deprecated
They show up in rust docs as not deprecated without this
2023-08-05 13:10:52 +02:00
Matthias Clasen
01b3b096fe Post-release version bump 2023-08-05 05:42:32 -04:00
Matthias Clasen
fef69881a7 4.12.0 4.12.0 2023-08-05 00:01:26 -04:00
Matthias Clasen
be0eaa64ed Merge branch 'matthiasc/for-main' into 'main'
build: Rename docs build options

See merge request GNOME/gtk!6239
2023-08-05 03:37:05 +00:00
Matthias Clasen
62087b1ab5 README: Some updates 2023-08-04 22:30:13 -04:00
Matthias Clasen
6af55a31d7 build: Rename docs build options
Rename gtk_doc to documentation and update_screenshots
to screenshots. The old names are still accepted.
2023-08-04 22:30:13 -04:00
Matthias Clasen
8e57818a52 Merge branch 'wip/otte/scroll-to' into 'main'
a scroll_to() for list widgets

See merge request GNOME/gtk!6227
2023-08-05 02:20:38 +00:00
Benjamin Otte
a447c439f4 inspector: Use scroll_to() in the object tree search 2023-08-05 03:51:55 +02:00
Benjamin Otte
2120ef38d9 columnview: Implement gtk_column_view_scroll_to()
It's basically the listview version, but with an (optional) column to do
cell-based scrolling/focusing.
2023-08-05 03:51:54 +02:00
Matthias Clasen
6077ea4f48 Add gtk_grid_view_scroll_to
This does the same as gtk_list_view_scroll_to, just
for a grid view.
2023-08-05 03:51:53 +02:00
Benjamin Otte
c278c78378 gtk-demo: Make arrowing in suggestionentry scroll the dropdown 2023-08-05 03:51:53 +02:00
Benjamin Otte
b64dc75e3a listview: Implement gtk_list_view_scroll_to()
This adds a flags enum so we can also do select/focus at the same time.

It's implemented in GtkListBase, so adding support forgridview should be
easy.
2023-08-05 03:51:53 +02:00
Benjamin Otte
447c07bf5e viewport: Use gtk_viewport_scroll_to() for focus scrolling 2023-08-05 03:51:51 +02:00
Benjamin Otte
2a5f1dc6c7 viewport: Add gtk_viewport_scroll_to()
First implementation of GtkScrollInfo
2023-08-05 03:51:50 +02:00
Benjamin Otte
105be5a457 gtk: Add GtkScrollInfo
This struct carries information about scrolling a scrollable, so that
individual scrollables can share this struct for their scrolling APIs.

For now, there's not much information here, we're still trying to cook
up an API that works well.
2023-08-05 03:51:50 +02:00
Matthias Clasen
0b6b6b0984 Merge branch 'format' into 'main'
adjustment: Properly use <code> tag

See merge request GNOME/gtk!6238
2023-08-05 00:20:21 +00:00
Hari Rana
a0429c8218 adjustment: Properly use <code> tag 2023-08-04 19:51:22 -04:00
Yuri Chornoivan
56649007d0 Update Ukrainian translation 2023-08-04 19:43:39 +00:00
Matthias Clasen
42d0590d80 Merge branch 'more-deprecation-cleanup' into 'main'
Drop old style deprecation handling

See merge request GNOME/gtk!6237
2023-08-04 14:57:30 +00:00
Matthias Clasen
ce4fbcef8e examples: More deprecation cleanup
Remove GtkDialog use from bloatpad.
2023-08-04 09:47:49 -04:00
Matthias Clasen
7c8171f069 Drop old style deprecation handling
We don't use this anymore.
2023-08-04 08:38:55 -04:00