Matthias Clasen
137eef6465
Fix get_closest_point for rectangles
...
This was still returning wrong offsets for one of the four
sides. Add a testcase for rectangles and circles to prevent
this happening again in the future.
2020-12-12 10:05:38 -05:00
Benjamin Otte
dfb25771a7
xxx path)_fill
2020-12-11 01:42:17 +01:00
Benjamin Otte
b286b04b7d
testsuite: Add tests for the dasher
2020-12-11 01:42:17 +01:00
Benjamin Otte
22aa12ade5
path: Add a foreach function that dashes a path
2020-12-11 01:42:17 +01:00
Benjamin Otte
79ba157664
path: Deal with non-uniformness of progress parameter
...
The progress is non-uniform, so simple translation of progress doesn't work.
So check if larger and smaller values inch closer towards minimal distance.
2020-12-10 20:18:05 +01:00
Benjamin Otte
c21c63c357
path: Always decompose conics into at least 2 segments
...
Conics are evil in that their parameter skews towards the center, and if
it's a very flat conic (weight almost equal to 0), then we'd approximate
it with a single segment and not subdivide, which would cause the
parameter to be wildly off around 0.25 or 0.75.
And that would cause offset calculations to fail.
2020-12-10 20:18:05 +01:00
Matthias Clasen
78f04ae486
testsuite Add curve tangent tests
2020-12-10 20:18:05 +01:00
Benjamin Otte
bd4dcc54fb
testsuite: Add a test for the conic that got us segment()
2020-12-10 20:18:05 +01:00
Benjamin Otte
580d3057ce
path: Add gsk_curve_segment()
...
Using split() twice with scaled t values does not work with conics.
2020-12-10 20:18:05 +01:00
Benjamin Otte
0060734103
testsuite: Add a test for gsk_curve_decompose()
2020-12-10 20:18:05 +01:00
Benjamin Otte
95ce8aafb4
testuite: Add tests for gsk_curve_get_tangent()
2020-12-10 20:18:05 +01:00
Matthias Clasen
0603bc2f45
testuite: Add tests for gsk_curve_get_point()
...
Add a few tests for gsk_curve_get_point().
Since GskCurve is not public api, we add gskcurve.c
as source to the test binary.
2020-12-10 20:18:05 +01:00
Benjamin Otte
07864c3070
curve: Split eval() into get_point() and get_tangent()
...
That's more in line with the get_start/end_point/tangent() functions.
Plus, those calls are independent and we usually want one or the other.
2020-12-10 20:18:05 +01:00
Matthias Clasen
95d5b9a057
Add gsk_curve_get_{start,end}_tangent
...
Add a way to get the tangents at the start and end of the curve.
This will be used in stroking.
2020-12-10 20:18:05 +01:00
Benjamin Otte
d5fe88a787
testsuite: Add conics to the random paths
2020-12-10 20:18:05 +01:00
Benjamin Otte
343324c205
path: Add GskCurve
...
GskCurve is an abstraction for path operations. It's essentially a
collection of vfuncs per GskPathOperation.
GskStandardContour has been ported to use it where appropriate.
2020-12-10 20:18:05 +01:00
Benjamin Otte
12dde7b4a1
path: Introduce gskpathop
...
A gskpathop is a pointer to a graphene_point_t* with the low bits used
to encode the GskPathOperation. It's an easy way to introduce API for
operations.
So far it's just used to replace GskStandardOperation.
2020-12-10 20:18:05 +01:00
Benjamin Otte
c07afdf1d7
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.
2020-12-10 20:18:05 +01:00
Benjamin Otte
7959ed96e2
WIP: pathbuilder: Add gsk_path_builder_add_rounded_rect()
...
It works, but does not use a custom contour yet.
2020-12-10 20:02:13 +01:00
Benjamin Otte
43360a1cfa
path: Add conic curves
...
So far this just adds the API, if you use it, you'll get lots of
g_warnings().
This will be fixed in future commits.
2020-12-08 21:33:46 +01:00
Benjamin Otte
22753c685e
path: Rename to gtk_path_builder_add_segment()
...
It's about bulding paths, not about measuring them.
2020-12-06 18:54:01 +01:00
Benjamin Otte
40ae74e03d
path: Split contours into their own file
...
I'm not sure I want to keep all contours in one file, but for now that's
how it is.
2020-12-06 18:54:01 +01:00
Benjamin Otte
95b71d47c9
path: Make all private contour APIs take a GskContour
...
... instead of a path, index tuple.
2020-12-06 18:54:01 +01:00
Benjamin Otte
cfd8855676
stroke: Add support for dashes
...
... and hook it up in the node parser and for Cairo rendering.
2020-12-06 18:54:01 +01:00
Matthias Clasen
7c7bb31d93
gsk: Implement parsing fill and stroke nodes
...
Make serialization and deserialization work for stroke and
fill nodes.
2020-12-06 18:54:01 +01:00
Benjamin Otte
a0c9e33865
path: Add flags to gsk_path_foreach()
...
This way we can default to the siplest possible foreach() output - like
cairo_copy_path_flat() decomposing everything into lines - and add flags
to get more and more fancy.
This will be useful to have conics automatically decomposed for Cairo
drawing or if we want to add more line types in the future.
2020-12-06 18:54:01 +01:00
Benjamin Otte
dccec4ced2
testsuite: Add an in_fill() test
2020-12-06 18:54:01 +01:00
Matthias Clasen
8f3f16d251
Implement gsk_path_measure_in_fill
...
Implement this in the obvious way, using the decomposed form
of standard contours. Since the decomposed form is part of the
measure object, this api moves from gsk_path_in_fill to
gsk_path_measure_in_fill.
2020-12-06 18:54:01 +01:00
Benjamin Otte
d0ce83e853
testsuite: Add a parsing test
...
This test includes an implementation of a gsk_path_equal() func with
a tolerance that is necessary because parsing does not always work
100% exactly due to floating point rounding, so we can't just
compare the to_string() output.
2020-12-06 18:54:01 +01:00
Matthias Clasen
91dd2e449e
path: Special-case rects and circles
...
Write out the commands for rects and circles in a special
way, and add code in the parser to recognize this, so we
can successfully round-trip these through the SVG path format.
The special way - for people who want to use it for debugging -
for now is that we use uppercase "Z" to close standard paths, but
lowercase "z" to close our special paths.
A test is included, but the random path serializations should take care
of it, too.
2020-12-06 18:54:01 +01:00
Matthias Clasen
6ff7c67c67
path: Fix serialization for circles
...
The svg A can not do a full circle, since it is a two point
parametrization - if the start and end point are the same,
it draws nothing. So, use two arcs.
2020-12-06 18:54:01 +01:00
Benjamin Otte
de1213cbb2
testsuite: Add librsvg path tests
2020-12-06 18:54:01 +01:00
Matthias Clasen
217921ff22
path: Implement gsk_path_parse
...
Implement the SVG path syntax to read back the strings
that we generate when serializing paths. The tests for
this code are taken from librsvg.
This includes an elliptical arc implementation according
to the SVG spec. The code is mostly taken from librsvg,
but pretty directly follows the SVG spec implementation
notes. We don't export this, since the parametrization
is inconvenient. We do want an arc_to API, but
these are not the arcs we are looking for.
2020-12-06 18:54:01 +01:00
Matthias Clasen
13153e4b30
path: Implement SVG arcs
...
This is elliptical arc implementation according to the SVG spec.
The code is mostly taken from librsvg, but pretty directly
follows the SVG spec implementation notes.
We don't export this, since the parametrization is inconvenient.
We do want an arc_to API, but these are not the arcs we are
looking for.
It will be used in parsing SVG path syntax.
2020-12-06 18:54:01 +01:00
Matthias Clasen
1eca63e442
stroke: Add miter limit
...
Add a miter limit to GskStroke. This will be needed to
fully implement line joins.
Also introduce the GSK_LINE_JOIN_MITER_CLIP value,
following SVG 2.0. cairo does not have it, so translate
it to plain miter when using cairo.
2020-12-06 18:54:01 +01:00
Matthias Clasen
2ed55da45c
Documentation typo fixes
2020-12-06 18:54:01 +01:00
Benjamin Otte
ab77041437
testsuite: Add relative path functions
...
They're making the paths slightly weirder, but they test public API, so
woohoo!
2020-12-06 18:54:01 +01:00
Benjamin Otte
1ef2a39c4d
pathbuilder: Add relative path commands
...
And gsk_path_builder_get_current_point().
They will be needed by the string parser.
2020-12-06 18:54:01 +01:00
Benjamin Otte
bccada91b6
path: Add GSK_CIRCLE_POINT_INIT() to initialize points on the circle
...
This is just splitting out a commonly done operation into a macro.
2020-12-06 18:54:01 +01:00
Benjamin Otte
bed254cc7a
pathbuilder: Redo semantics for starting curves
...
We now always have a "current point" which is either the last point an
operation was made to, or (0, 0) if no drawing operation has
been made yet.
Adding a contour of any kind to the builder will always update the
current point to that contour's end point.
2020-12-06 18:54:00 +01:00
Benjamin Otte
bb224682c1
xxx: demo
2020-12-06 18:53:24 +01:00
Benjamin Otte
8e2f90c887
path: Split GskPathBuilder into its own file
...
... and add missing API docs.
2020-12-06 18:53:17 +01:00
Benjamin Otte
705617a6d5
testsuite: Add a test using get_point() and get_closest_point()
2020-12-06 18:51:55 +01:00
Benjamin Otte
bc019bd1fc
testsuite: Add a test for get_point()
2020-12-06 18:51:55 +01:00
Benjamin Otte
c9edcb1009
testsuite: Update create_random_path()
...
1. Allow specifying the max number of contours
2. Be smarter about creating the paths:
With 10% chance, create a "weird" path like the empty one or only
points or things like that.
Otherwise create a bunch of contours, with 2/3 a standard contour,
with 1/3 a predetermined one.
2020-12-06 18:51:55 +01:00
Benjamin Otte
967968fb0b
gtk-demo: Add cute maze demo
2020-12-06 18:51:55 +01:00
Benjamin Otte
9e7d3b4473
testsuite: Add tests for gsk_path_measure_get_closest_point()
2020-12-06 18:51:54 +01:00
Benjamin Otte
5819bfeca7
path: Add gsk_path_measure_get_closest_point()
...
... and gsk_path_measure_get_closest_point_full().
Those 2 functions allow finding the closest point on a path to a given
point.
2020-12-06 18:51:54 +01:00
Benjamin Otte
e611becb9f
spline: Use Skia's tolerance checks
...
This avoids measuring being too far off (it's still off, but it's less
than a percent now.
2020-12-06 18:51:54 +01:00
Benjamin Otte
541f7aa2bb
testsuite: Add tests for gsk_path_measure_add_segment()
2020-12-06 18:51:54 +01:00
Benjamin Otte
7163015b1a
gtk-demo: Add a text-on-path demo
2020-12-06 18:51:54 +01:00
Benjamin Otte
8422d7965f
xxx: path_fill demo
2020-12-06 18:51:54 +01:00
Benjamin Otte
0092f55bd1
path: Add gsk_path_measure_get_point()
...
Allows querying the coordinates and direction of any specific point on a
path.
2020-12-06 18:51:54 +01:00
Matthias Clasen
3e8fcf4831
path: Add gsk_path_add_circle()
...
Adds a circle contour, too.
2020-12-06 18:51:54 +01:00
Benjamin Otte
a0c680011c
pathmeasure: Implement support for beziers
...
Instead of treating bezier curves as lines, we properly decompose them
into line segments now so that we can treat those as lines.
2020-12-06 18:51:54 +01:00
Benjamin Otte
b8ddef040d
path: Implement gsk_path_to_cairo() using foreach()
2020-12-06 18:51:54 +01:00
Benjamin Otte
a1f759336c
path: Add gsk_path_foreach()
2020-12-06 18:51:54 +01:00
Benjamin Otte
acfcb9da6c
path: Collect flags
...
We don't need them yet, but maybe later.
2020-12-06 18:51:50 +01:00
Benjamin Otte
b2fdb10aaa
testsuite: Add path tests
2020-12-04 02:58:34 +01:00
Benjamin Otte
f92dbb8caa
pathmeasure: Add gsk_path_measure_add_segment()
...
This allows chunking paths, weeee.
2020-12-04 02:58:34 +01:00
Benjamin Otte
484b7dd5f2
path: Add gsk_path_builder_add_path()
2020-12-04 02:58:34 +01:00
Benjamin Otte
307eccc451
gsk: Add GskPathMeasure
...
An object to do measuring operations on paths - determining their
length, cutting off subpaths, things like that.
2020-12-04 02:58:34 +01:00
Benjamin Otte
57227e8f64
path: Change data structure for standard path
...
Instead of the Cairo method and imitating cairo_path_data_t, use the
Skia method and keep points and operations separate.
That way we get a points array that includes the starting point -
because it's always the end point of the previous operation.
2020-12-04 02:58:34 +01:00
Benjamin Otte
a5b1842acf
popover: Use fill and stroke nodes instead of Cairo
...
... to render the arrow.
The arrow should really be turned into a real thing - maybe an icon?
2020-12-04 02:58:34 +01:00
Benjamin Otte
e482dd739f
snapshot: Add gtk_snapshot_push_stroke()
2020-12-04 02:58:34 +01:00
Benjamin Otte
c1b8eb50ed
gsk: Add GskStrokeNode
2020-12-04 02:58:34 +01:00
Benjamin Otte
12c5bb6f8c
gsk: Add GskStroke
...
It's unused in this commit. This just prepares the new object.
2020-12-04 02:58:34 +01:00
Benjamin Otte
16d504a78c
demos: Add a simple demo filling a path
2020-12-04 02:58:34 +01:00
Benjamin Otte
e22a12bb42
snapshot: Add gtk_snapshot_push_fill()
2020-12-04 02:58:34 +01:00
Benjamin Otte
4fc6ef1a5f
gsk: Add GskFillNode
...
Take a rendernode as source and a GskPath and fill the region in the
path just like cairo_fill() would.
2020-12-04 02:58:31 +01:00
Benjamin Otte
5bda1e0d4b
gsk: Add GskPath
2020-12-04 02:56:18 +01:00
Benjamin Otte
aca2f15f05
listview: Use the correct scroll policy
...
Use the horizontal policy for horizontal decisions, not the vertical
one.
This broke in 0011ce949c
.
2020-12-04 02:56:18 +01:00
Benjamin Otte
b69e956d60
docs: Put render nodes in their own sections
2020-12-04 02:56:17 +01:00
Benjamin Otte
feaff8825c
roundedbox: Remove unused API
2020-12-04 02:55:57 +01:00
Emmanuele Bassi
f1ff8f9aad
Merge branch 'wip/chergert/macos-decelerate' into 'master'
...
macos: fix typo when creating scroll events
Closes #3418
See merge request GNOME/gtk!2916
2020-12-03 22:54:46 +00:00
Christian Hergert
115ea624d9
macos: fix typo when creating scroll events
...
This fixes an issue where we would ignore events with Y delta
and no X delta while scrolling due to a typo when checking for
any delta.
This fixes deceleration of kinetic scrolling on the macOS backend.
Fixes #3418
2020-12-03 13:46:47 -08:00
Matthias Clasen
6ecae6c5f8
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
...
macos: fix motion event delivery after closing transient window
Closes #3419
See merge request GNOME/gtk!2910
2020-12-03 20:07:16 +00:00
Matthias Clasen
6d76b587cf
Merge branch 'wip/chergert/shadertoy-macos-fix' into 'master'
...
demos: make alienplanet demo work on macOS OpenGL
See merge request GNOME/gtk!2915
2020-12-03 19:00:39 +00:00
Christian Hergert
8e62ff50fe
demos: make alienplanet demo work on macOS OpenGL
...
On the macOS OpenGL implementation, the use of noise2 as a
function within the glsl shader collides with the builtin noise2 of a
different signature.
This changes the name to something similar (noize2) so that we
do not risk colliding names when linking.
With this commit, the shadertoy alienplanet demo works on mac
OpenGL (albeit still with the Cairo renderer).
2020-12-03 10:23:13 -08:00
Matthias Clasen
0daa905a27
Merge branch 'wip/otte/conic' into 'master'
...
Implement a GL shader for conic gradients
See merge request GNOME/gtk!2913
2020-12-03 17:14:01 +00:00
Emmanuele Bassi
d1a4ad3db6
Merge branch 'wip/tintou/gdk-backends-header' into 'master'
...
build: Use the correct path to the header of the wayland and x11 backends
See merge request GNOME/gtk!2914
2020-12-03 12:32:24 +00:00
Benjamin Otte
2c1bd399d2
glrenderer: Implement a shader for conic gradients
2020-12-03 13:07:17 +01:00
Benjamin Otte
fac5fba0dc
rendernode: Fix some wrong constants for conic gradients
...
copy/paste from other nodes left some wrong values in there and that
screwed things up quite a bit.
2020-12-03 13:07:17 +01:00
Benjamin Otte
c907ad83b0
glrenderer: Emit more useful error messages
...
Catch the error when it happens, so that we can emit a specific and more
helpful error message.
Also verify that all branches in the code now do indeed set a proper
GError when they fail, so that the final catch-all is no longer needed.
Instead, assert that the error is set so that we catch future code
additions early that do not set the GError.
2020-12-03 13:07:17 +01:00
Corentin Noël
585ba777c2
build: Use the correct path to the header of the wayland and x11 backends
2020-12-03 10:02:03 +01:00
Matthias Clasen
f8ee4cfea5
NEWS: Updates
2020-12-02 23:10:39 -05:00
Matthias Clasen
35d2cbefe6
Merge branch 'wip/otte/conic' into 'master'
...
Add support for conic gradients
See merge request GNOME/gtk!2911
2020-12-03 03:54:24 +00:00
Christian Hergert
004f0a6596
macos: plug leak of application windows
...
This ensures that we don't leak window references inside the action muxer.
Otherwise, we risk not disposing the windows upon gtk_window_destroy()
and blocking the main loop from quitting.
Fixes #3419
2020-12-02 19:44:02 -08:00
Christian Hergert
b68e0bb3fb
muxer: add helper to get group by name
...
This is useful when you need to read a group back out of the muxer.
2020-12-02 19:44:02 -08:00
Christian Hergert
92f0216605
macos: ensure element is part of queue
...
We don't want to risk decrementing length field unless this is actually
part of the queue.
2020-12-02 19:44:02 -08:00
Christian Hergert
e317b9be00
macos: maintain GList element consistency
...
We need to keep this consistent so that we can look things up
faster in other places. Therefore, just take the hit here and clear
the entire list ensuring prev/next poniters are cleared.
2020-12-02 19:44:01 -08:00
Christian Hergert
2e52386be5
macos: send focus-out event to windowing
2020-12-02 19:44:01 -08:00
Christian Hergert
9431c70a6a
macos: freeze updates until surface is mapped
...
This more closely matches the X11 backend in terms of freezing
updates on the surface initially until we get mapped.
2020-12-02 19:44:01 -08:00
Matthias Clasen
6e67d44aa3
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3429
See merge request GNOME/gtk!2912
2020-12-03 03:43:19 +00:00
Benjamin Otte
e622013f7e
css: Add support for conic-gradient()
...
This comes complete with animation support. For a good time, try:
@keyframes conic {
100% { background-image: conic-gradient(from 1turn, red, lime, blue, yellow, red); }
}
window {
background-image: conic-gradient(red, lime, blue, yellow, red);
animation: conic infinite linear 5s;
}
2020-12-03 04:13:33 +01:00
Benjamin Otte
3886f0c530
Merge branch 'wip/otte/diediedie' into 'master'
...
Remove GtkFileChooserButton
See merge request GNOME/gtk!2909
2020-12-03 01:31:39 +00:00
Benjamin Otte
eb9c204535
gtk: Remove GtkFileChooserButton
...
... as discussed in the meeting.
2020-12-03 02:02:27 +01:00
Matthias Clasen
ab9e99218f
docs: Remove mentions of <accelerator>
...
That is no longer supported, keyboard shortcuts
are done with GtkShortcut now.
Fixes : #3429
2020-12-02 19:59:44 -05:00
Matthias Clasen
714c610d6b
gtk-demo: Add a search button
...
Easter eggs are great, but search shouldn't be one.
2020-12-02 19:53:55 -05:00
Benjamin Otte
8706d69e60
snapshot: Add gsk_snapshot_append_conic_gradient()
2020-12-03 01:15:53 +01:00
Benjamin Otte
55a242bd81
gsk: Add GskConicGradientNode
2020-12-03 00:47:54 +01:00
Matthias Clasen
61b40c47f9
Merge branch 'fix/keyboard-input' into 'master'
...
Gdk4/Win32: Correct calls to gdk_key_event_new()
See merge request GNOME/gtk!2903
2020-12-02 22:14:27 +00:00
Matthew Jakeman
710d0620a4
Gdk4/Win32: Correct call to gdk_key_event_new()
...
The keycode and modifier (state) parameters are in the wrong order
for gdk_key_event_new() in the gdk win32 backend, which causes
key up/down events to be populated incorrectly.
2020-12-02 22:14:27 +00:00
Benjamin Otte
71cb7c2063
rendernodeparser: Split out a function
2020-12-02 21:48:35 +01:00
Matthias Clasen
a482d870dd
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
...
Revert "macos: specify a window level for surfaces"
See merge request GNOME/gtk!2908
2020-12-02 20:15:51 +00:00
Emmanuele Bassi
bc4992fef9
Merge branch 'ebassi/doc-fixes' into 'master'
...
Ebassi/doc fixes
Closes #3428
See merge request GNOME/gtk!2906
2020-12-02 20:08:05 +00:00
Christian Hergert
b38d0d7d9e
macos: resign main/key when hiding window
...
This isn't done automatically for us, so we need to synthesize it in
our hide helper.
With this commit, we properly re-focus the new main/key window after
we have closed a transient-for window.
2020-12-02 11:36:38 -08:00
Christian Hergert
853a9c7a8c
macos: disconnect frame clock when destroying surface
2020-12-02 11:35:02 -08:00
Christian Hergert
26b9254ac7
macos: track grab serial like other backends
...
This is what is done elsewhere, so copy that here too now that we actually
generate serials for events.
2020-12-02 11:34:31 -08:00
Benjamin Otte
a51f11999a
tests: Remove testsvg
...
That demo lives in gtk-demo now.
2020-12-02 20:17:28 +01:00
Christian Hergert
f11c23f407
Revert "macos: specify a window level for surfaces"
...
This reverts commit ca8b00e871
.
This isn't needed and causes issues with other applications getting
stacked beneath our windows.
2020-12-02 11:15:57 -08:00
Emmanuele Bassi
0c8de4e561
Fix transfer of GtkTreeExpander.get_item()
...
We return a full reference to the item.
Fixes : #3428
2020-12-02 19:10:13 +00:00
Emmanuele Bassi
13f9993007
docs: Add missing fields to GtkTextBufferClass
2020-12-02 19:05:41 +00:00
Emmanuele Bassi
b2b451d762
docs: Hide private files/directories in the GTK reference
2020-12-02 19:05:41 +00:00
Emmanuele Bassi
2e146a56f7
docs: Mark GtkModelButton's section as private
...
The widget is not public any more.
2020-12-02 19:05:41 +00:00
Emmanuele Bassi
34197d4f8a
docs: Add more symbols to the GDK reference
2020-12-02 19:05:41 +00:00
Emmanuele Bassi
39dbd91bb0
docs: Add yet another private header
2020-12-02 19:05:41 +00:00
Emmanuele Bassi
901d99d7c5
docs: More ignored files
2020-12-02 19:05:41 +00:00
Emmanuele Bassi
8f6e3848f6
docs: Remove duplicate symbol
2020-12-02 19:05:41 +00:00
Emmanuele Bassi
3548350dfa
docs: Add missing GdkDragSurfaceInterface gtk-doc annotation
2020-12-02 19:05:41 +00:00
Emmanuele Bassi
caae240bc7
docs: Ignore harder
...
First of all, we must list *all* ignored headers. Since we have public
headers in the x11 and wayland directories, we must explicitly declare
all headers that we consider private under those directories.
The "quartz" subdirectory was renamed "macos", with the new macOS
backend. The "mir" directory was removed, so there's no need to ignore
it.
We are also missing a bunch of ignored headers in the top-level gdk
directory.
Finally, pass the list of ignored files to gtkdoc-mkdb, so we won't get
missing declaration warnings.
2020-12-02 19:05:41 +00:00
Emmanuele Bassi
f5f6ceece5
docs: Remove private symbols from the API reference
2020-12-02 19:05:41 +00:00
Emmanuele Bassi
4caceb5dd4
Remove gtk-doc annotation from private symbols
...
Keep the documentation, just tweak it so that gtk-doc won't try to find
the declarations of these private symbols.
2020-12-02 19:05:41 +00:00
Matthias Clasen
3da41b6021
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
...
macos: fix window stacking
See merge request GNOME/gtk!2907
2020-12-02 18:38:14 +00:00
Christian Hergert
9b9fb4d7a3
macos: place above transient-for when presenting
...
We need to re-attach to the transient-for window whenever we present or
we risk getting placed behind the window by the display server. Apparently
that setting does not persist across a hide of the NSWindow.
2020-12-02 10:21:16 -08:00
Christian Hergert
ca8b00e871
macos: specify a window level for surfaces
2020-12-02 10:15:43 -08:00
Matthias Clasen
4434889e41
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2905
2020-12-02 15:57:39 +00:00
Bilal Elmoussaoui
475352fbc0
StringList: add missing nullability annotations
2020-12-02 10:36:29 -05:00
Bilal Elmoussaoui
ad30ac3932
Shortcut: add missing nullability annotations
2020-12-02 10:29:16 -05:00
Bilal Elmoussaoui
9d52ca1887
StringFilter: get_search fix nullable annotation
2020-12-02 10:28:07 -05:00
Bilal Elmoussaoui
ec537d75e4
Text: add missing nullability annotations
2020-12-02 10:28:07 -05:00
Bilal Elmoussaoui
b47ea9421f
TextView: add missing nullability annotations
2020-12-02 10:28:07 -05:00
Bilal Elmoussaoui
845d2e5433
TreeModel: add missing nullability annotations
2020-12-02 10:28:07 -05:00
Bilal Elmoussaoui
50310f7b14
TreeView: add missing nullability annotations
2020-12-02 10:28:07 -05:00
Matthias Clasen
af944aa74c
widget: Add a missing nullability annotation
2020-12-02 10:08:58 -05:00
Matthias Clasen
b5077d02ed
Clarify the docs for gtk_widget_class_set_css_name
...
Reword, and mention the default css name.
2020-12-02 10:06:01 -05:00
Bilal Elmoussaoui
6a3bd1c4d1
window: default_icon_name can be null
2020-12-02 10:00:18 -05:00
Emmanuele Bassi
2fcd0e21bd
Merge branch 'ebassi/for-master' into 'master'
...
Various documentation fixes
See merge request GNOME/gtk!2900
2020-12-02 13:40:25 +00:00
Daniel Mustieles
5127726bbc
Updated Spanish translation
2020-12-02 13:54:32 +01:00
Daniel Mustieles
db456a70ee
Updated Spanish translation
2020-12-02 09:26:08 +01:00
Emmanuele Bassi
770e848953
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
...
macos: various macos improvements for GTK 4
See merge request GNOME/gtk!2902
2020-12-02 01:14:30 +00:00
Christian Hergert
9e1dd15e31
macos: use Cairo renderer by default
...
Until the GL renderer is working on macOS OpenGL, we need to default
to the Cairo renderer.
2020-12-01 16:24:15 -08:00
Christian Hergert
27b9a9e7ef
macos: glFlush() when switching GL contexts
...
The Mac OpenGL programming guide suggests that you glFlush() before changing
contexts to ensure that the commands have been submitted.
2020-12-01 16:19:04 -08:00
Christian Hergert
a020c901ba
macos: treat some toplevel NSWindow like document windows
...
This makes the window animate in by the window manager like other
application windows on macOS. Currently ignored for transient windows.
2020-12-01 16:19:04 -08:00
Emmanuele Bassi
cdad68e858
docs: Ignore generated Wayland protocol file
2020-12-01 18:03:31 +00:00
Emmanuele Bassi
ef36028526
docs: Ignore more private files
2020-12-01 18:01:33 +00:00
Emmanuele Bassi
69b1b19315
docs: Annotate missing symbols
2020-12-01 17:28:16 +00:00
Emmanuele Bassi
516f71bbdc
Use the appropriate prefix for GtkBuilderClosureFlags
...
Facilitate the job of glib-mkenums, and ensure that the enumeration
nicknames are computed reliably.
2020-12-01 17:26:34 +00:00
Emmanuele Bassi
d820fea7a4
docs: Annotate GtkBuildableParser
2020-12-01 17:21:45 +00:00
Emmanuele Bassi
3e8d157118
docs: Hide GtkBitsetIter fields
2020-12-01 17:18:38 +00:00
Emmanuele Bassi
67f45940ce
docs: Annotate GtkAssistant::escape action signal
2020-12-01 17:18:23 +00:00
Emmanuele Bassi
95400e6451
docs: Annotate GtkAppChooserButton::changed
2020-12-01 17:16:05 +00:00
Emmanuele Bassi
d46fe31f54
docs: Ignore more files
2020-12-01 15:51:52 +00:00
Emmanuele Bassi
4f67be1c8e
docs: Add missing annotations for GtkTextTagTable
2020-12-01 15:51:52 +00:00
Emmanuele Bassi
c13e164f25
Make GtkCenterLayout accessors more idiomatic
...
Add argument validation, and emit a layout-changed signal whenever the
start, center, and end widgets change.
2020-12-01 15:51:52 +00:00
Emmanuele Bassi
eba8f36d4f
docs: Fix annotations in GtkCenterLayout
...
Missing ':' separator.
2020-12-01 15:51:52 +00:00
Emmanuele Bassi
37f11ab77d
docs: Annotate GskRenderer
2020-12-01 15:51:52 +00:00
Emmanuele Bassi
8b898818c2
docs: Annotate the GL shader objects
2020-12-01 15:51:52 +00:00
Emmanuele Bassi
0f62ab6c42
docs: Annotate all render node types
2020-12-01 15:51:52 +00:00
Emmanuele Bassi
c524b72d13
docs: Annotate structure types used by GskRenderNodes
2020-12-01 15:51:52 +00:00
Emmanuele Bassi
b5313dbd4d
docs: Annotate GdkDeviceTool
2020-12-01 15:51:52 +00:00
Emmanuele Bassi
b9a1827da7
docs: Annotate GdkGLTexture
2020-12-01 13:48:07 +00:00
Emmanuele Bassi
1057189ea2
docs: Annotate GdkMemoryTexture
2020-12-01 13:47:56 +00:00
Emmanuele Bassi
879b2845ad
docs: Annotate GdkPaintable
...
The dummy typedef needs a gtk-doc stanza, and the interface
documentation needs to be slightly clarified.
2020-12-01 13:44:51 +00:00
Emmanuele Bassi
ecce3756d4
docs: Annotate GdkPopup
2020-12-01 13:42:07 +00:00
Emmanuele Bassi
6e4dd5811d
docs: Annotate GdkSnapshot
2020-12-01 13:41:28 +00:00
Emmanuele Bassi
598e1304f6
docs: Annotate the GdkToplevel interface
2020-12-01 13:39:48 +00:00
Emmanuele Bassi
e3fbc0ee9c
docs: Fix typo in the GdkTolevelLayout annotation
2020-12-01 13:38:33 +00:00
Emmanuele Bassi
4021734047
docs: Annotate the GdkContentProviderClass structure
2020-12-01 13:38:12 +00:00
Emmanuele Bassi
5a307fa7f3
docs: Ignore more private headers
2020-12-01 13:37:59 +00:00
Matthias Clasen
617d12fd77
Merge branch 'sophie-h/gtk-nullables-2'
...
Merge Sophie's nullable annotations, with some documentation
fixups on top.
2020-11-30 23:43:44 -05:00
Matthias Clasen
837f398a9b
columnviewcolumn: Improve docs
...
Mention what setting sorter to NULL means.
2020-11-30 23:40:03 -05:00
Matthias Clasen
e18211deca
centerlayout: Improve docs
...
Explain what passing NULL does.
2020-11-30 23:36:23 -05:00
Jordi Mas
32a547cc3e
Update Catalan translation
2020-11-30 22:35:47 +01:00
Matthias Clasen
365afa381a
Merge branch 'arnaudb/annotate-set-title' into 'master'
...
Add "nullable" annotation.
See merge request GNOME/gtk!2895
2020-11-30 21:14:28 +00:00
Matthias Clasen
b7d3c073f8
NEWS: Updates
2020-11-30 14:00:26 -05:00
Matthias Clasen
56b0095622
Merge branch 'master' into 'master'
...
broadway: make header name parsing case-insensitve
Closes #3406
See merge request GNOME/gtk!2894
2020-11-30 17:55:27 +00:00
Matthias Clasen
39f0c48eb2
Apply 1 suggestion(s) to 1 file(s)
2020-11-30 17:44:30 +00:00
Matthias Clasen
7d24e1405e
Apply 1 suggestion(s) to 1 file(s)
2020-11-30 17:42:39 +00:00
Matthias Clasen
3680ae220a
Merge branch 'matthiasc/for-master' into 'master'
...
build: Use link_whole for linking our convenience libs
See merge request GNOME/gtk!2899
2020-11-30 15:49:25 +00:00
Matthias Clasen
f309fa21c9
build: Use link_whole for linking our convenience libs
...
Without this, we lose exported symbols from e.g. libgsk
that are not used elsewhere in the code.
2020-11-30 09:56:55 -05:00
Matthias Clasen
61e7326f22
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3364
See merge request GNOME/gtk!2898
2020-11-30 14:44:15 +00:00
Timm Bäder
dc13ff97e2
modelbutton: Reset active menu item on pointer leave
...
We don't want to leave an active menu item behind if the pointer doesn't
enter another menu item.
This matches the old GtkMenu behavior
2020-11-30 09:23:03 -05:00
Timm Bäder
af28237569
popovermenu: Connect to right controller signal
...
leave is emitted before the new contains-pointer value is set, so the
signal handler wasn't working right.
2020-11-30 09:22:57 -05:00
Timm Bäder
ff8de0a93f
eventcontrollermotion: Notify by pspec
2020-11-30 09:22:49 -05:00
Timm Bäder
aefabcc056
popovermenu: Pull variable declaration in closest scope
2020-11-30 09:22:41 -05:00
Timm Bäder
1d6c6fc3b8
shortcutcontroller: Separate trigger/action early returns
...
We take this early return in update_accel over 36k times when starting
the widget factory and always because the action is not a named action.
2020-11-30 09:22:34 -05:00
Timm Bäder
8645773fc6
shortcutcontroller: Pass the muxer to update_accel()
...
We only needed the widget to get its action muxer. And this way we don't
have to call gtk_widget_get_action_muxer() dozens of times, just once in
set_widget().
2020-11-30 09:22:29 -05:00
Timm Bäder
d663909159
shortcutcontroller: Use priv->shortcuts directly in set_widget()
...
Instead of treating the shortcut controller itself as a GListModel,
which just passes everything along from priv->shortcuts.
2020-11-30 09:22:21 -05:00
Timm Bäder
e3ff92bc87
shortcutcontroller: Save signal handler ID
...
gtk_shortcut_controller_finalize() used to take ~13.8% when closing the
complex listbox demo in gtk4-demo. Now it takes nothing.
2020-11-30 09:21:57 -05:00
Timm Bäder
2d43ecf8ca
widget: root child before emitting child observer signals
...
Try to avoid the childen_observer signal handlers screwing up internal
state.
Fixes #3364
2020-11-30 09:21:52 -05:00
Timm Bäder
5f4beb711f
widgetprivate: Remove unused function
2020-11-30 09:21:42 -05:00
Timm Bäder
da514187f5
gl renderer: Make minimal rounded rects more minimal
2020-11-30 09:21:34 -05:00
Matthias Clasen
6bd9ce7b55
docs: Ignore more generated Wayland protocol headers
...
These inject mysterious words like Airbrush, Lense and
Mouse into the list of undocumented apis. No need for that.
2020-11-30 09:21:24 -05:00
Matthias Clasen
ec21d354b9
gsk: doc fixups
2020-11-30 09:21:24 -05:00
Matthias Clasen
8cf4ce5d9e
Merge branch 'ebassi/cell-renderer-get-size' into 'master'
...
Remove GtkCellRendererClass.get_size()
See merge request GNOME/gtk!2896
2020-11-30 14:09:03 +00:00
Emmanuele Bassi
09b6c37e1d
Merge branch 'ebassi/for-master' into 'master'
...
Blend nodes might have NULL top/bottom nodes
See merge request GNOME/gtk!2891
2020-11-30 13:10:25 +00:00
Piotr Drąg
3161dbfff2
Update Polish translation
2020-11-29 12:11:26 +01:00
Yuri Chornoivan
8412928a14
Update Ukrainian translation
2020-11-29 07:53:56 +00:00
Emmanuele Bassi
60a7830ba5
Remove GtkCellRendererClass.get_size()
...
The get_size() vfuncs is deprecated in GTK3, and only used as a
fallback path for cell renderers that do not implement preferred
size virtual functions.
2020-11-28 19:21:24 +00:00
Emmanuele Bassi
ac473282a2
Port CellRendererGraph to preferred size vfuncs
...
Drop use of GtkCellRendererClass.get_size()
2020-11-28 19:21:24 +00:00
Emmanuele Bassi
20f9e0f144
Port GtkCellRendererProgress to preferred size vfuncs
...
Drop the use of GtkCellRendererClass.get_size()
2020-11-28 19:21:24 +00:00
Emmanuele Bassi
71a9e5d8c2
Port GtkCellRendererToggle to preferred size vfuncs
...
Drop the use of GtkCellRendererClass.get_size()
2020-11-28 19:21:24 +00:00
Emmanuele Bassi
a605fcc2bd
Port GtkCellRendererSpinner to preferred size vfuncs
...
Drop the use of GtkCellRendererClass.get_size()
2020-11-28 19:21:23 +00:00
Emmanuele Bassi
3eaebf1e0b
Port GtkCellRendererPixbuf to preferred size vfuncs
...
Drop the GtkCellRendererClass.get_size() override.
2020-11-28 19:21:23 +00:00
Аляксей
e540ccbd34
Update Belarusian translation
2020-11-28 14:30:43 +00:00
Arnaud Bonatti
55ce61d1a8
Add "nullable" annotation.
2020-11-28 12:15:38 +01:00
Jakub Steiner
8e14f43398
Merge branch 'wip/jimmac/dark-prelights' into 'master'
...
wip/jimmac/dark prelights
Closes #3380
See merge request GNOME/gtk!2892
2020-11-27 18:14:09 +00:00
Jakub Steiner
bbbcc72460
Adwaita,HC: use dark prelights
...
- increase :hover visibility by going darker rather than lighter
puppies died.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3380
2020-11-27 18:17:12 +01:00
Anders Jonsson
c2b1b00e52
Update Swedish translation
2020-11-27 13:35:03 +00:00
Anders Jonsson
05c2e35c5d
Update Swedish translation
2020-11-27 13:31:30 +00:00
Benjamin Beichler
8efde9c48c
broadway: make header name parsing case-insensitve
...
since http RFC state that the header names should be processed case in-sensitive, broadway should not rely on the actual case. E.g. the go-language libraries tend to rewrite the header, which cause problems with e.g. Caddy
Fixes #3406
2020-11-27 12:05:51 +01:00
Emmanuele Bassi
247fc2e471
Blend nodes might have NULL top/bottom nodes
...
We have code in place to handle a NULL node in the state when dealing
with blend nodes, but we don't always check for NULL, which leads to
warnings in the CSS Blend modes demo.
2020-11-26 00:21:11 +00:00
Matthias Clasen
9d2ca90b4c
popover: Fix a typo
...
s/Wether/Whether/
Fixes #3393
2020-11-25 13:59:16 -05:00
Emmanuele Bassi
3a5f8b6192
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
Closes #3404 and #3403
See merge request GNOME/gtk!2890
2020-11-25 18:43:53 +00:00
Emmanuele Bassi
16b5a88097
a11y: Check before disconnecting Text signals
...
Use the same initial check for the accessible object type that we use
when connecting the signal, in case we try to disconnect signals on
different widgets. Additionally, check before accessing data that might
have already been removed.
Fixes : #3403
2020-11-25 18:15:04 +00:00
Emmanuele Bassi
fdf2e046c3
a11y: Check before disconnecting selection signals
...
If the selection data has already been cleared we should just bail out.
Fixes : #3404
2020-11-25 18:13:54 +00:00
Jakub Steiner
531d57f30c
Merge branch 'wip/jimmac/menus-darker' into 'master'
...
Adwaita: darker selected menuitem + sidebars
Closes #3390
See merge request GNOME/gtk!2881
2020-11-25 13:42:55 +00:00
Jordi Mas i Hernandez
841bf67bb9
Update Catalan translation
2020-11-25 13:42:11 +00:00
Jakub Steiner
399b457f54
Adwaita: darker selected menuitem + sidebars
...
- without sacrificing the fg/bg contrast too much, increase
selected item visibility
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3390
2020-11-25 14:28:19 +01:00
Sophie Herold
fed734edfc
Fix some nullable return annotations 2
2020-11-24 19:27:33 +01:00
Matthias Clasen
c84c014536
Merge branch 'wip/chergert/for-master' into 'master'
...
textview: fix precondition assertions
Closes #3386
See merge request GNOME/gtk!2886
2020-11-24 17:14:53 +00:00
Christian Hergert
1e994419ee
textview: fix precondition assertions
...
It is a programmer error to call this with a child widget that has not
been placed within the GtkTextView.
Fixes #3386
2020-11-24 08:29:52 -08:00
Matthias Clasen
7b22c44b39
Merge branch 'fix-integer-overflow' into 'master'
...
gdk/win32: fix integer overflow in monitor refresh rate calculation
Closes #3394
See merge request GNOME/gtk!2884
2020-11-24 16:22:49 +00:00
Anders Jonsson
2e744260e0
Update Swedish translation
2020-11-23 22:09:28 +00:00
Volker Rümelin
7190a31b5f
gdk/win32: fix integer overflow in monitor refresh rate calculation
...
In gdk/win32/gdkmonitor-win32.c in function
populate_monitor_devices_from_display_config() refresh->Numerator * 1000
overflows for refresh->Numerator > 4294976.
Cast the factor 1000 to UINT64 to prevent the overflow.
Fixes #3394
2020-11-23 21:42:58 +01:00
Matthias Clasen
729f007379
Merge branch 'no-more-devel-headers' into 'master'
...
Drop devel styling from our windows
See merge request GNOME/gtk!2882
2020-11-23 19:01:44 +00:00
Matthias Clasen
b75b359f19
Drop devel styling from our windows
...
We are about to do a stable release. Time to get used
again to plain old, boring header bars.
2020-11-23 12:10:01 -05:00
Emmanuele Bassi
d7de720275
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
See merge request GNOME/gtk!2876
2020-11-23 15:41:03 +00:00
Emmanuele Bassi
ef86e46238
a11y: Cache the accessibility bus address
...
Just check for it once; doing it every time we failed to create an
ATContext is just going to fill up the logs.
2020-11-23 14:34:46 +00:00
Emmanuele Bassi
0a46baeb56
a11y: Turn critical warnings into debug messages
...
The accessibility bus might not be available, and if it isn't the case,
it means something has failed at a level where the user can't do much
about it. There's no need to emit a critical warning.
2020-11-23 14:34:46 +00:00
Emmanuele Bassi
fd3a6299ce
Merge branch 'ebassi/glib-min-version' into 'master'
...
Ebassi/glib min version
See merge request GNOME/gtk!2880
2020-11-23 14:33:20 +00:00
Emmanuele Bassi
803b147483
Disable deprecation warnings from GLib
...
We don't want to test the latest changes in GLib in our own build.
2020-11-23 13:04:11 +00:00
Emmanuele Bassi
1f44319588
Drop redundant dependencies
...
PangoCairo already depends on Pango; Cairo-gobject already depends on
Cairo.
2020-11-23 13:04:11 +00:00
Emmanuele Bassi
505478bc59
Drop GLib dependency from GTK's declared dependencies
...
We depend on GObject, which already depends on GLib; on older versions
of Meson, this ends up trying to depend on the system copy of GLib,
instead of the sub-project copy, in case the version of GLib we have
installed is too old.
2020-11-23 12:29:32 +00:00
Emmanuele Bassi
de7833b6a0
Use the right GLib macros for version checking
...
There's a typo in the name, and we never noticed.
2020-11-23 12:06:22 +00:00
Emmanuele Bassi
3a1b2083d6
Do not depend on GLib API introduced after 2.66
...
To avoid bleeding edge deprecations we use GLIB_VERSION_MIN_REQUIRED and
GLIB_VERSION_MAX_ALLOWED. Since we depend on GLib 2.66, we cannot use
API introduced in 2.67, even when conditionally compiled.
2020-11-23 12:06:22 +00:00
nana-4
3e996f61ae
icon-browser: Add .sidebar style class in the main window
...
So the sidebar can get the proper background and border colors.
2020-11-23 10:51:58 +01:00
nana-4
56eac4f846
gtk-demo: Add .sidebar style class in the main window
...
So the sidebar can get the proper background and border colors.
2020-11-23 10:51:58 +01:00
nana-4
61dcb685b2
Adwaita: Unify sidebar background-color
...
The sidebar item style is already unified. The sidebar background-color
should be unified as well.
See https://gitlab.gnome.org/GNOME/gtk/-/issues/3382
2020-11-23 10:51:58 +01:00
nana-4
bd0d75e237
Adwaita: Make sidebar row styling better
...
- Reorder declaration blocks for code legibility.
- Don't lighten text color on :hover and :selected for better contrast.
- Add missing :focus-visible:focus-within styling to non-:selected row.
2020-11-23 10:51:58 +01:00
nana-4
179fc68355
Adwaita: Fix some sidebar sizing
...
- Don't set the sidebar padding twice.
- Add padding to the assistant sidebar directly, as it doesn't have
.navigation-sidebar internally.
- Set missing margin to the sidebar separator.
See https://gitlab.gnome.org/GNOME/gtk/-/issues/3382
2020-11-23 10:51:58 +01:00
nana-4
9828756e05
Adwaita: Move placessidebar-specific sizing from .navigation-sidebar
...
The common .navigation-sidebar styling should be more generic.
2020-11-23 10:51:58 +01:00
nana-4
40f2b49c0d
Adwaita: Make treeexpander styling generic
...
The widget can be used outside .navigation-sidebar.
This also fixes the label misalignment in the widget.
2020-11-23 10:51:58 +01:00
nana-4
8e81cbef2c
stacksidebar: Add missing .navigation-sidebar to the inner list
...
Also don't set :show-separators, which is not applied in other sidebars.
See https://gitlab.gnome.org/GNOME/gtk/-/issues/3382
2020-11-23 10:51:58 +01:00
Timm Bäder
47d572834b
Merge branch 'scalebutton' into 'master'
...
properly set ScaleButton's parent_class
Closes #3381
See merge request GNOME/gtk!2877
2020-11-23 07:38:17 +00:00
Bilal Elmoussaoui
46601325f1
properly set ScaleButton's parent_class
...
GtkScaleButton doesn't subclass GtkButton anymore
Fixes #3381
2020-11-23 02:47:12 +01:00
Emmanuele Bassi
0abc7a3361
Merge branch 'nullables-1' into 'master'
...
Fix some nullable return annotations
See merge request GNOME/gtk!2873
2020-11-21 16:11:34 +00:00
Sophie Herold
1e01b9079d
Fix some nullable return annotations
2020-11-21 16:33:40 +01:00
Piotr Drąg
be688c46f2
Update POTFILES.skip
2020-11-21 14:39:17 +01:00
Jakub Steiner
ab163f168d
Merge branch 'wip/jimmac/clipped-menu-shadows' into 'master'
...
Adwaita: avoid clipping menu shadows
Closes #1987
See merge request GNOME/gtk!2872
2020-11-20 12:37:49 +00:00
Jakub Steiner
e937f7eac8
Revert "Adwaita: unified sidebar styles"
...
Doing the same mistake twice :( Even margin is eating from the container,
not expanding outside of it.
This reverts commit 6be575992f
.
2020-11-20 13:24:23 +01:00
Jakub Steiner
b84945e43f
Merge branch 'wip/jimmac/sidebar-backdrop' into 'master'
...
Adwaita: don't backdrop labels
Closes #3377
See merge request GNOME/gtk!2868
2020-11-20 12:08:59 +00:00
Jakub Steiner
b3dba1dca6
Adwaita: avoid clipping menu shadows
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/1987
2020-11-20 13:04:04 +01:00
Jakub Steiner
060cfc713f
Merge branch 'wip/jimmac/unified-sidebar-styles' into 'master'
...
Adwaita: unified sidebar styles
Closes #3382
See merge request GNOME/gtk!2871
2020-11-20 11:40:30 +00:00
Jakub Steiner
6be575992f
Adwaita: unified sidebar styles
...
- stacksidebar focus, separation and color as everything else
- eliminate placessidebar double padding
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3382
2020-11-20 12:24:40 +01:00
Jakub Steiner
4bec75c66b
Adwaita: don't backdrop labels
...
- instead of overriding :backdrop for sidebars, continue pursuing
not to backdrop anything but headerbar items and buttons.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3377
2020-11-20 09:34:23 +01:00
Matthias Clasen
8e4cc59a7a
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2870
2020-11-20 02:02:10 +00:00
Matthias Clasen
c17227966d
Merge branch 'wip/carlosg/for-master' into 'master'
...
gtk/main: Do not unset active state on button release w/o implicit grab
See merge request GNOME/gtk!2869
2020-11-20 01:46:03 +00:00
Matthias Clasen
a2ce6268b2
gtk-demo: Make a more interesting constraints demo
...
Show various ways to influence spacing. This is more or
less modeled on the way Androids constraint layout lets
you set up 'chains'.
2020-11-19 20:35:15 -05:00
Carlos Garnacho
5ab14ff7f6
gtk/main: Do not unset active state on button release w/o implicit grab
...
If an active grab gets undone on button press (e.g. closing a menu), we
will receive a button release on the new target even though it didn't handle
the button press, and disable ::active state.
This causes warnings when handling the button release, as it tries to undo
::active state that is not really there.
In order to fix this, check that the pointer focus actually had an implicit
grab at the time of receiving the button release, before trying to unset
the ::active state.
2020-11-19 22:58:14 +01:00
Emmanuele Bassi
8482b956d6
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
See merge request GNOME/gtk!2867
2020-11-19 16:37:58 +00:00
Matthias Clasen
562c7b1ff3
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
...
GTK4: various fixes
See merge request GNOME/gtk!2864
2020-11-19 16:05:47 +00:00
Jakub Steiner
8099de22f9
Merge branch 'wip/jimmac/industrial-style-menuitems' into 'master'
...
Adwaita: revert edge-to-edge menuitems
Closes #3366
See merge request GNOME/gtk!2866
2020-11-19 15:52:25 +00:00
Emmanuele Bassi
a4c3bee4a1
a11y: Hide children of GtkFishBowl
...
The fishbowl widget is purely presentational, and its children should
not be visible in the accessibility tree.
2020-11-19 15:20:56 +00:00
Emmanuele Bassi
5afa985e85
demo: Make GtkFishBowl a presentation widget
...
It has no accessible content, even if it displays widgets.
2020-11-19 15:20:56 +00:00
Emmanuele Bassi
e600a07237
a11y: Skip atspi.Cache signals for hidden elements
...
If the accessible object is hidden, we can skip the emission of the
AddAccessible and RemoveAccessible signals on the cache, as those
objects won't be visible in the accessibility tree.
2020-11-19 15:20:56 +00:00
Emmanuele Bassi
8fa58c2e17
a11y: Get the accessible role once
...
Simplify getting the accessible role when checking if an accessible
implementation should present itself; this avoids going through
GtkAccessible twice to get the same data.
2020-11-19 15:20:56 +00:00
Emmanuele Bassi
d436c2e839
a11y: Remove weak ref from atspi.Cache
...
The GtkAtSpiContext is responsible for removing itself from the root,
which will remove itself from the cache. Any code path that leads to the
GtkAtSpiContext instance being collected passes through the
unrealization phase, which will also unregister the context from the
accessibility bus and from the cache.
2020-11-19 15:20:56 +00:00
Emmanuele Bassi
b37634dcd5
a11y: Add a fallback for the root base path
...
In case g_get_prgname() returns NULL, which seems to be the case for the
GTK tests.
2020-11-19 15:20:56 +00:00
Emmanuele Bassi
2d636fdda0
a11y: Reuse the generated AT-SPI interface name
...
We already have the name available.
2020-11-19 15:20:56 +00:00
Emmanuele Bassi
28095641c5
a11y: Use the appropriate GVariant for cache signals
...
We need to wrap the argument for AddAccessible and RemoveAccessible into
a tuple, as that's what GDBus expects.
2020-11-19 12:14:55 +00:00
Jakub Steiner
d58b06ceeb
Adwaita: revert edge-to-edge menuitems
...
- use the old Industrial style menuitems to make the design feel purposeful
- adjust corners to have compatible border-radii of child elements
- include sidebars and navigation sidebars to look consistent
(plus the assistant sidebar)
Implements https://gitlab.gnome.org/GNOME/gtk/-/issues/3366
2020-11-19 11:16:28 +01:00
Christian Hergert
82b4c34eca
gl: add some debugging information to DEBUG_OPS
2020-11-18 20:16:40 -08:00
Christian Hergert
ee47ddf5fd
lpr: fix cast warning
2020-11-18 20:16:40 -08:00
Christian Hergert
f32ae2964a
macos: fix various compiler warnings
2020-11-18 20:16:37 -08:00
Christian Hergert
eae5eaeb21
gl: use glFramebufferTexture2D to set framebuffer texture
...
When mapping a texture to the framebuffer, we can use the 2D
form instead of the cube mapping form.
2020-11-18 20:09:01 -08:00
Matthias Clasen
09fd2d61c4
gtk-demo: Rename some demos
...
This is just to make it easier for myself to
find the right sources.
2020-11-18 18:58:45 -05:00
Matthias Clasen
86d7ab7c50
docs: Update GtkSensitivityType docs
...
Don't talk about steppers here, since we are only using
this type for combobox buttons nowadays.
2020-11-18 18:18:31 -05:00
Matthias Clasen
88be92ceee
scrollbar: Don't talk about steppers
...
There steppers were lost on the way from GtkRange
to GtkScrollbar, so don't talk about them in the docs.
2020-11-18 17:27:13 -05:00
Matthias Clasen
04c4b387a0
gtk-demo: Add more keywords
...
Add GtkShortcutController as a keyword to some demos that
show its use.
2020-11-18 10:48:57 -05:00
Matthias Clasen
7551f85d4c
Merge branch 'wayland-minimize' into 'master'
...
wayland: Implement minimization
Closes #2688
See merge request GNOME/gtk!2861
2020-11-18 14:23:56 +00:00
Matthias Clasen
184886f893
Merge branch 'constraint-editor-work' into 'master'
...
Constraint editor work
See merge request GNOME/gtk!2863
2020-11-18 12:19:07 +00:00
Matthias Clasen
36ef94b002
constraint-editor: Fix creating constant constraints
...
We were not making the button sensitive in the case
of a constant constraint, and we were not properly
creating constant constraints either.
2020-11-17 23:16:57 -05:00
Matthias Clasen
831ebe3ef2
constraint-editor: Fix saving of constraints
...
g_file_replace_contents take a gsize, so passing -1
for string length does not work here.
2020-11-17 23:14:29 -05:00
Matthias Clasen
76b8676955
constraintlayout: Fix parsing of constant constraints
...
We were inadvertently turning constant constraints into
constraints against super, due to confusion between target
and source attribute.
2020-11-17 23:11:16 -05:00
Matthias Clasen
b3243132a0
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
...
macos: fix rendering artifacts with hover transitions
See merge request GNOME/gtk!2862
2020-11-18 03:04:01 +00:00
Matthias Clasen
de461712a1
constraint-editor: Improve display of constraints
...
No need to go for ALGOL60 style operators when we
have Unicode.
2020-11-17 21:52:15 -05:00
Christian Hergert
dd7f52c59a
macos: fix rendering artifacts with hover transitions
...
Using an image surface seems to fix some rendering artifacts when
performing cross-fade CSS transitions.
2020-11-17 18:20:55 -08:00
Matthias Clasen
3f1bc740e4
wayland: Implement minimization
...
Use the set_minimized method of the xdg_toplevel
interface to implement minimization as well as possible.
It is not possible, since there is no corresponding
state that we could use to update our surface state,
but in practice, it works well enough.
Fixes : #2688
2020-11-17 19:57:56 -05:00
Matthias Clasen
9128ad105b
Merge branch 'wip/carlosg/for-master' into 'master'
...
gdk/wayland: Update to gtk_shell1 version 3
See merge request GNOME/gtk!2860
2020-11-18 00:13:17 +00:00
Carlos Garnacho
745cbc6c91
gdk/wayland: Update to gtk_shell1 version 3
...
Bring in line with gtk3, in terms of startup notification and
activation support.
2020-11-18 00:41:46 +01:00
Matthias Clasen
b635736ac2
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
...
node-editor: fix length of text during save
See merge request GNOME/gtk!2859
2020-11-17 22:49:05 +00:00
Matthias Clasen
ba081bf119
Merge branch 'fix-doc-packtype' into 'master'
...
doc: Adapt GtkPackType documentation to GTK4 changes
See merge request GNOME/gtk!2858
2020-11-17 22:46:43 +00:00
Christian Hergert
3003f37e9d
node-editor: fix length of text during save
...
The length parameter for g_file_replace_contents() is a gsize, so -1 is
unsuitable here. Just use strlen() directly.
2020-11-17 14:34:11 -08:00
Matthias Clasen
c1e05e7c52
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3278
See merge request GNOME/gtk!2856
2020-11-17 19:25:05 +00:00
Matthias Clasen
6b475aacd2
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
...
inspector: handle differences in DPI between backends
See merge request GNOME/gtk!2857
2020-11-17 19:24:47 +00:00
vanadiae
bc4969ec42
doc: Adapt GtkPackType documentation to GTK4 changes
...
Since GTK4, the functions that used the GtkPackType enumeration,
`gtk_box_pack_{start,end}`, were replaced by `gtk_box_{append,prepend}`,
hence this enumeration isn't used anymore by any function within the
GtkBox type, and the child packing properties were also removed for GTK4.
So this commit adapts the documentation accordingly.
2020-11-17 20:19:16 +01:00
Benjamin Otte
1c7daece7a
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
See merge request GNOME/gtk!2855
2020-11-17 19:08:01 +00:00
Christian Hergert
37a8c138f9
inspector: handle differences in DPI between backends
...
This fixes an issue on macOS where the text gets much larger once opening
the inspector.
2020-11-17 10:45:25 -08:00
Matthias Clasen
34d547a2aa
inspector: Limit the width of readonly properties
...
For readonly properties, we show the serialized value
in a label. If we don't take precautions, this can cause
our window to grow extremely wide, and break things.
So, ellipsize things at a reasonable size.
Fixes : #3278
2020-11-17 13:36:57 -05:00
Benjamin Otte
163c04c101
snapshot: Add cleanup function to snapshot state
...
Otherwise we're leaking data in error cases.
2020-11-17 19:04:39 +01:00
Benjamin Otte
f2284ff40f
rendernode: Rename all gsk_render_node_peek_*() functions
...
Those are getters, they should be gsk_render_node_get_*() functions.
2020-11-17 19:04:39 +01:00
Benjamin Otte
eded9459df
tests: Fix for new tranfer behavior of constructors
...
We were still unreffing a listmodel where the reference wasn't ours
anymore.
2020-11-17 19:04:39 +01:00
Benjamin Otte
8fd1530848
testsuite: Make defaultvalue test always get the property
...
Make the test not skip properties completely, just skip checking the
property.
This caught the last 2 commits.
2020-11-17 19:04:39 +01:00
Benjamin Otte
77f9efa747
textbuffer: Remove unused properties
...
The getters and setters were removed in
f53848c360
but the pspecs were forgotten.
2020-11-17 19:04:39 +01:00
Benjamin Otte
109ec523cb
shortcut: Actions are objects
2020-11-17 19:04:39 +01:00
Emmanuele Bassi
5cc5022a8f
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
...
macos: bring forward quartz search engine updates
See merge request GNOME/gtk!2854
2020-11-17 17:58:14 +00:00
Emmanuele Bassi
3c769bb11d
Merge branch 'ebassi/inout-args' into 'master'
...
Remove pointless inout arguments
See merge request GNOME/gtk!2853
2020-11-17 17:40:13 +00:00
Christian Hergert
33b07e4825
macos: bring forward quartz search engine updates
...
These were not cherry picked after GTK branched for 4 development.
2020-11-17 09:37:13 -08:00
Matthias Clasen
714e5c72f6
docs: Add details about plain builds
...
Mention that build type 'plain' puts the responsibility
for debug features into the hands of the builder.
Related: !2831
2020-11-17 12:21:29 -05:00
Emmanuele Bassi
153c6424d3
Remove pointless inout arguments
...
GtkTreeView.get_tooltip_context() takes an inout X and Y coordinates,
but the "out" side is a side effect: the conversion from widget-relative
to bin window-relative coordinates is not documented, and can be done
using public API, if needed.
GtkIconView.get_tooltip_context() follows the same pattern, and takes
two inout arguments for the coordinates, but it does not change them any
more, after GtkIconView's bin window was dropped in commit 8dc5e13e
.
There's really no point in having these `inout` arguments, and while
GtkTreeView and GtkIconView are certainly de-emphasised in GTK4, and we
nudge developers to move to the new list views, we should take advantage
of the API break to remove warts.
2020-11-17 16:38:12 +00:00
Emmanuele Bassi
b76e514322
Merge branch 'ebassi/for-master' into 'master'
...
Introspection fixes
Closes #3281
See merge request GNOME/gtk!2852
2020-11-17 16:04:03 +00:00
Jakub Steiner
1501aa0603
Revert "Adwaita: avoid clipping menu/popover shadow"
...
There are big side effects to adding padding around all menus and popovers.
https://gitlab.gnome.org/GNOME/gtk/-/issues/1987#note_963889
This reverts commit d266bd62de
.
2020-11-17 16:53:32 +01:00
Emmanuele Bassi
cf5a173a4f
Add type annotations for GtkShortcutAction types
...
The constructors and singleton getters need proper annotations for their
return type, given that we return a base type.
2020-11-17 14:17:26 +00:00
Matthias Clasen
2b8c3731c1
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2851
2020-11-17 14:12:23 +00:00
Emmanuele Bassi
ade2f1030a
Annotate GdkTimeCoord's array field
...
We need to resolve the array length manually, because g-ir-scanner
cannot turn an enumeration member into a constant size.
2020-11-17 14:07:11 +00:00
Emmanuele Bassi
4f12df5f1c
Annotate the return type for GtkTreeExpander.get_item()
...
We use gpointer for C convenience, but the returned value is really a
GObject.
2020-11-17 13:54:22 +00:00
Emmanuele Bassi
9941799449
Annotate out argument for gdk_popup_layout_get_offset()
2020-11-17 13:52:15 +00:00
Emmanuele Bassi
5a938ad83d
Annotate the gsk_border_node_peek_widths() return value
...
We return a fixed sized C array of floats.
2020-11-17 13:48:07 +00:00
Matthias Clasen
835c807d7a
widget-factory: Remove an unused size group
...
This was left behind when 361407201b
removed
the unused popover that this size group applied to.
2020-11-17 07:34:53 -05:00
Matthias Clasen
2ef72442ec
docs: Fix the links for keybinding signals
...
GtkBindingSignal does not exist anymore, so link to
GtkSignalAction for an explanation of keybinding signals.
2020-11-17 07:34:52 -05:00
Matthias Clasen
3bc2bf40a8
popover: Document signals
2020-11-17 07:34:52 -05:00
Matthias Clasen
cd4c0b6127
menubutton: Fix a gtk-doc complaint
2020-11-17 07:34:52 -05:00
Matthias Clasen
fa79e8651e
gtk: Fix a doc oversight
2020-11-17 07:34:52 -05:00
Matthias Clasen
9a29487e25
gsk: Fix a doc oversight
2020-11-17 07:34:52 -05:00
Matthias Clasen
fceff93994
Merge branch 'fix-gi-warning' into 'master'
...
Fix a warning caused by difference between prototype and definition
See merge request GNOME/gtk!2849
2020-11-17 12:31:36 +00:00
Matthias Clasen
acd8b08d35
Merge branch 'wip/exalm/caption' into 'master'
...
widget-factory: Fix caption style class name
See merge request GNOME/gtk!2850
2020-11-17 12:22:29 +00:00
Alexander Mikhaylenko
2abee57421
widget-factory: Fix caption style class name
...
It's lowercase.
2020-11-17 13:16:47 +05:00
Qiu Wenbo
437f902c9d
Fix a warning caused by difference between prototype and definition
...
This commit fix the warning:
../gdk/wayland/gdkdisplay-wayland.c:1079: Warning: GdkWayland: gdk_wayland_display_set_cursor_theme: unknown parameter 'name' in documentation comment, should be 'theme'
2020-11-17 14:59:14 +08:00
Matthias Clasen
a7befc647e
Merge branch 'gsk-binding-api' into 'master'
...
gsk: Avoid using gtk css types in public api
Closes #2454
See merge request GNOME/gtk!2848
2020-11-17 05:36:15 +00:00
Matthias Clasen
121e61cf01
gsk: Avoid using gtk css types in public api
...
Using GtkCssSection in public headers here may be
ok from the C perspective, since it all ends up in
the same library anyway. But it causes circular
dependency problems for our gir files that are still
split by namespace.
To avoid this problem, copy the GtkCssLocation struct
struct as GskParseLocation, and pass take two of them
instead of a GtkCssSection in the error callback.
Update all users.
Fixes : #2454
2020-11-16 23:27:44 -05:00
Matthias Clasen
f7ac13b78f
Merge branch 'matthiasc/for-master' into 'master'
...
popover: Fix submenu navigation
Closes #3301
See merge request GNOME/gtk!2847
2020-11-17 03:11:13 +00:00
Matthias Clasen
c2ae73f247
popover: Fix submenu navigation
...
In commit 024d832d94
, we introduced a
cascade-popdown property that makes closing a submenu
propagate up and close its parent menus. This is the
behavior we want when a menuitem in the submen is
activated.
What we overlooked is that we still need to be able to
close a submenu during navigation, before opening another
one. And in this case, propagating the closing is breaking
things. Fix this by adding a private close_submenu api
to GtkPopoverMenu that avoids the propagation.
Fixes : #3301
2020-11-16 21:34:33 -05:00
Benjamin Otte
4b0b6100d6
build: Include GSK types in gtk_test_register_all_type()
2020-11-17 03:13:31 +01:00
Matthias Clasen
2c9bf55eea
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2846
2020-11-17 01:07:34 +00:00
Emmanuele Bassi
1d11d42aa0
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
See merge request GNOME/gtk!2840
2020-11-16 23:06:55 +00:00
Matthias Clasen
361407201b
widget-factory: Remove an unused popover
...
We are no longer using the hand-rolled variant of that
popover on page 3, so drop it from the ui file.
2020-11-16 15:22:12 -05:00
Matthias Clasen
50c29398e6
Merge branch 'wip/exalm/button' into 'master'
...
Allow pressing multiple buttons at once on touch
See merge request GNOME/gtk!2813
2020-11-16 20:16:10 +00:00
Jakub Steiner
dff8a9eb46
Merge branch 'wip/jimmac/popover-menu-submenus' into 'master'
...
Adwaita: fix up submenus again
See merge request GNOME/gtk!2845
2020-11-16 19:50:08 +00:00
Matthias Clasen
1bb4e660fd
Merge branch 'wip/chergert/for-master' into 'master'
...
gsk: use glFrameBufferTexture2D and release texture
See merge request GNOME/gtk!2842
2020-11-16 19:20:19 +00:00
Jakub Steiner
ded6ec6424
Merge branch 'wip/jimmac/circular-button-focus' into 'master'
...
Adwaita: circular button focus
Closes #3368
See merge request GNOME/gtk!2844
2020-11-16 18:55:30 +00:00
Jakub Steiner
47e49acc7d
Adwaita: fix up submenus again
...
- move menubar section under more generic popover.menu
rather than resort to specificity dir(ltr) hacks
2020-11-16 19:48:11 +01:00
Jakub Steiner
0996b178dc
Adwaita: circular button focus
...
- have the same focus look like the other items
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3368
2020-11-16 19:11:52 +01:00
Matthias Clasen
4befd13744
Merge branch 'wip/jimmac/spinbutton-spacing' into 'master'
...
Adwaita: spinbutton spacing
Closes #3370
See merge request GNOME/gtk!2841
2020-11-16 17:50:56 +00:00
Emmanuele Bassi
bb1463871c
a11y: Ensure valid object paths in the fallback code
...
When falling back to using the program name to create a unique base path
for the objects on the accessibility bus we need to ensure that the name
is a valid DBus object path.
2020-11-16 17:47:15 +00:00
Christian Hergert
12a9164414
gsk: use glFrameBufferTexture2D and release texture
...
glFrameBufferTexture maps to all faces of a cube and that is not needed
here. Additionally, texture_id is not deleted after we use the additional
flipped texture, but should be.
2020-11-16 09:26:07 -08:00
Jakub Steiner
108fe033aa
Adwaita: spinbutton spacing
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3370
2020-11-16 18:22:17 +01:00
Emmanuele Bassi
9de2b4b0e1
a11y: Implement atspi.Cache
...
The AT-SPI cache interface is used to quickly populate the accessible
objects tree.
The tricky bit is ensuring that we emit change notifications on the
cache only when the cache is available, which means waiting until the
root is asynchronously registered.
2020-11-16 16:44:56 +00:00
Emmanuele Bassi
ee056fd8bd
a11y: Update the Cache interface introspection
...
The type for cached items is, unsurprisingly, wrong when compared to the
implementation inside atk-spi2-atk.
2020-11-16 16:44:56 +00:00
Emmanuele Bassi
bc4f71a107
a11y: Add getters for GtkAtSpiContext
...
We are going to use them in order to implement atspi.Cache.
2020-11-16 16:44:56 +00:00
Emmanuele Bassi
125442297f
a11y: Use the tab widget to label the notebook stack page
2020-11-16 16:44:56 +00:00
Emmanuele Bassi
eec92b40ea
a11y: Compute the base path in the root object
...
The root path is shared by all AtSpiContext instances, so we should
compute it once, instead of every time we instantiate a new context.
This allows us to defer the path creation at realization time and ensure
that we have a registered application.
2020-11-16 16:44:56 +00:00
Emmanuele Bassi
d392f6f2a4
a11y: Resync the AT-SPI XML
...
Mostly just changes in the annotations coming from at-spi2-core, but
it's good to try and keep the XML in sync.
2020-11-16 16:44:56 +00:00
Jakub Steiner
41a9c46ec8
Merge branch 'wip/jimmac/circular-button-padding' into 'master'
...
Adwaita: circular buttons
See merge request GNOME/gtk!2838
2020-11-16 14:50:16 +00:00
Matthias Clasen
0530aeec17
docs: Mention cairo-gobject as build requires
...
Using cairo from a system dependency and cairo-gobject
as subproject is problematic and left me stuck on a
hard-to-understand build error.
2020-11-16 09:31:23 -05:00
Jakub Steiner
22741a74ff
Adwaita: circular buttons
...
- the vertical padding was thown off with the chin/forehead of menus removed
2020-11-16 15:21:46 +01:00
Jakub Steiner
23331c1919
Merge branch 'wip/jimmac/menu-clipped-shadow' into 'master'
...
Wip/jimmac/menu clipped shadow
Closes #1987
See merge request GNOME/gtk!2837
2020-11-16 14:10:21 +00:00
Jakub Steiner
d266bd62de
Adwaita: avoid clipping menu/popover shadow
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/1987
2020-11-16 14:20:24 +01:00
Matthias Clasen
57c95937b1
gsk: Fix some docs oversights
...
These apis have been renamed a few times, and the docs
haven't kept up.
2020-11-16 07:44:41 -05:00
Matthias Clasen
1d86086434
gdk: Docs cosmetics
...
Add a few missing parameters in doc comments.
2020-11-16 07:44:17 -05:00
Matthias Clasen
e2f26b0d9a
docs: Fix a typo
2020-11-16 07:37:33 -05:00
Matthias Clasen
7816fc2b83
docs: Remove gtk_render_insertion_cursor
...
This function was removed in 2bcef7f030
.
2020-11-16 07:35:41 -05:00
Jakub Steiner
04d802f7f4
Adwaita: remove chin on menus
...
- clipping a rounded corner seems to be working fine for first and last item.
Addresses https://gitlab.gnome.org/GNOME/gtk/-/issues/3366
2020-11-16 13:31:27 +01:00
Jakub Steiner
994cc32d7b
Merge branch 'wip/jimmac/subtle-sidebar' into 'master'
...
Adwaita: navigation sidebar color changes
Closes #3362
See merge request GNOME/gtk!2836
2020-11-16 09:34:36 +00:00
Jakub Steiner
f14ca28c4e
Adwaita: navigation sidebar color changes
...
- use more subtle selected state grey
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3362
2020-11-16 10:17:57 +01:00
Matthias Clasen
da9d32e472
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2835
2020-11-16 04:29:10 +00:00
Matthias Clasen
08d6db4ab6
gtk-demo: Plug a memory leak
...
The Characters demo was leaking its columns.
2020-11-15 23:03:30 -05:00
Matthias Clasen
6891f40110
modelbutton: Fix keynav for check and radio
...
The expected behavior when activating check or radio
menuitems via keynav is that Space toggles the item
but keeps the menu open, while Return toggles the
item and closes the menu.
2020-11-15 21:52:07 -05:00
Matthias Clasen
cdbf24c3af
Merge branch 'fix-tooltip-trigger' into 'master'
...
Fix tooltip triggering
See merge request GNOME/gtk!2833
2020-11-15 17:37:47 +00:00
Matthias Clasen
b30715da6a
Fix tooltip triggering
...
Ever since 5b5d2665d3
, tooltips don't work properly,
since we get more motion events now, and those keep the
tooltips from appearing. This can be seen e.g. on the icon
in the password entry in widget-factory, or on the section
switcher buttons in the Emoji chooser.
Ignore synthetic motion events for the purposes of
determining whether the user moved the mouse.
2020-11-15 10:54:36 -05:00
Emmanuele Bassi
5e9883453d
Merge branch 'widget-no-a11y-crash' into 'master'
...
gtkwidget: fix crashes with GTK_A11Y=none
Closes #3333
See merge request GNOME/gtk!2834
2020-11-15 15:23:42 +00:00
Christoph Reiter
b97b95b0c7
gtkwidget: fix crashes with GTK_A11Y=none
...
at_context can be NULL in that case, so guard against it.
Fixes #3333
2020-11-15 15:59:31 +01:00
Matthias Clasen
dd0a854bbb
Merge branch 'button-fill-var-removal' into 'master'
...
Adwaita: Stop using $button_fill
Closes #3354
See merge request GNOME/gtk!2828
2020-11-15 13:45:42 +00:00
Matthias Clasen
b8d0ad8643
Merge branch 'parse-debug-env-vars-always' into 'master'
...
Always parse GTK/GDK/GSK_DEBUG env vars and make some entries available in non-debug mode
See merge request GNOME/gtk!2830
2020-11-15 13:37:44 +00:00
Christoph Reiter
65d57877a8
Revert "Update comment annotations of gtk_tree_model_iter_previous and gtk_tree_model_iter_next to state that the ITER parameter is modified."
...
This reverts commit 1340ff2bc2
.
Same as with 53cd499621
2020-11-15 13:36:42 +01:00
Christoph Reiter
afc73c38ce
Always parse GTK/GDK/GSK_DEBUG env vars and make some entries available in non-debug mode
...
Currently GTK can be built with G_ENABLE_DEBUG which enables various debug code and parsing
of those env vars, or without, which instead of parsing them prints a warning if they are set.
While building with G_ENABLE_DEBUG isn't strictly needed it's the only way to make GTK_DEBUG=interactive work,
which is a nice thing to have always.
This enables parsing of those env vars in any case and allows specific values being marked as also
available when not built with G_ENABLE_DEBUG (interactive for example). If not built with G_ENABLE_DEBUG
then all unavailable values will be marked as such in the help output and a note is added that
GTK needs to be built with G_ENABLE_DEBUG to use them, which should help discoverability.
2020-11-15 11:34:54 +01:00
Yuri Chornoivan
f4e1c271ea
Update Ukrainian translation
2020-11-15 08:01:26 +00:00
Matthias Clasen
8e42239439
Merge branch 'wip/carlosg/for-master' into 'master'
...
gtk/main: Reset active state on grab broken only if implicit
See merge request GNOME/gtk!2832
2020-11-14 14:41:01 +00:00
Carlos Garnacho
5b4ac5456e
gtk/main: Reset active state on grab broken only if implicit
...
An implicit grab means some button is down, reset the active state
only in that case when we get a grab broken event.
Avoids active state accounting warnings when we do get active grabs
broken (e.g. after selecting a menu option).
2020-11-14 10:52:34 +01:00
nana-4
f1db73379e
Adwaita: Stop using $button_fill
...
Since the $button_fill variables are no longer used outside of the
button() mixin (and it was for an ugly hack), there is no need to keep
that anymore.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3354
2020-11-14 10:13:05 +09:00
Matthias Clasen
20918dbe8e
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3359 and #3353
See merge request GNOME/gtk!2827
2020-11-14 00:15:34 +00:00
Matthias Clasen
b5ec20db88
Adwaita: Fix list separators
...
Commit bfe5b0d1b7
ran into some specificity
trouble.
Fixes : #3353
2020-11-13 17:18:05 -05:00
Matthias Clasen
d347df431d
label: Avoid short-circuiting
...
Commit 0db504edde
made a mistake described here:
https://en.wikipedia.org/wiki/Short-circuit_evaluation#Possible_problems
Fixes : #3359
2020-11-13 15:35:51 -05:00
Matthias Clasen
25e6988d95
Merge branch 'alatiera/nightly-demos' into 'master'
...
ci: publish demo apps to the Nightly repository
See merge request GNOME/gtk!2825
2020-11-13 19:28:44 +00:00
Matthias Clasen
a7f05b8d91
Merge branch 'wip/jimmac/tooltips' into 'master'
...
Adwaita: tooltip styling
Closes #3352
See merge request GNOME/gtk!2826
2020-11-13 19:23:58 +00:00
Jordan Petridis
fe690265eb
ci: publish demo apps to the Nightly repository
2020-11-13 20:38:09 +02:00
Jakub Steiner
f45ea3fa90
Adwaita: tooltip styling
...
- balance padding
- increase border radius, yuck
- get rid of text shadow
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3352
2020-11-13 19:36:26 +01:00
Jakub Steiner
bdc28cd870
Merge branch 'wip/jimmac/submenus' into 'master'
...
Wip/jimmac/submenus
See merge request GNOME/gtk!2824
2020-11-13 17:05:00 +00:00
Jakub Steiner
c648c1f235
Merge branch 'wip/jimmac/declare-buttonfill-once' into 'master'
...
Adwaita: double declated $button_fill
See merge request GNOME/gtk!2823
2020-11-13 16:57:18 +00:00
Jakub Steiner
8a92ee03ea
Adwaita: rounded submenus
...
- all corners have rounded corners
See https://gitlab.gnome.org/GNOME/gtk/-/issues/2745
2020-11-13 17:27:40 +01:00
Jakub Steiner
e3c72f8f09
Adwaita: double declared $button_fill
...
- this was already in place in _common, no need to have it in _colors
2020-11-13 17:24:13 +01:00
Jakub Steiner
1f472104ad
Adwaita: double declated $button_fill
...
- this was already in place in _common, no need to have it in _colors
2020-11-13 17:21:03 +01:00
Jakub Steiner
4b41580041
Merge branch 'wip/exalm/window' into 'master'
...
Round window corners
See merge request GNOME/gtk!1952
2020-11-13 15:33:15 +00:00
Matthias Clasen
c136f84584
Merge branch 'wip/carlosg/for-master' into 'master'
...
Improve handling of ::active with touch and multiple foci
Closes #3348
See merge request GNOME/gtk!2821
2020-11-13 04:13:34 +00:00
Carlos Garnacho
80de00a248
gtk/main: Stack ::active calls
...
We may have the situation of multiple touchpoints in the same
widget, or combinations with other devices. Stack those ::active
states are preserved on widgets on all but the last pointer/touch
going away.
2020-11-13 00:39:23 +01:00
Carlos Garnacho
50a7e59623
gtk/main: Toggle active flag with touch events
...
This went missing at some point, add the missing toggling of active
state with GDK_TOUCH_BEGIN/END/CANCEL events.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3348
2020-11-13 00:39:23 +01:00
Emmanuele Bassi
92ca3a3419
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
See merge request GNOME/gtk!2819
2020-11-12 22:22:20 +00:00
Emmanuele Bassi
8203d9cc40
a11y: Use GROUP role for ShortcutsShortcut
...
And hide the image from the accessible tree.
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
abc9b403f8
a11y: Implement atspi.Text.ScrollSubstringTo for GtkTextView
...
We reuse the existing implementation in GTK3.
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
b9ad3172a4
a11y: Document GtkRevealer's accessible state
...
Use the GROUP role, and make sure to note that the child is always
revealed. Unlike GtkExpander, GtkRevealer can only be programmatically
toggled, so we cannot turn it into a "button" object.
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
0d7fcdda28
a11y: Add more accessible data to GtkTreeExpander
...
Document the role of the GtkTreeExpander, and the behaviour of the
expander button.
Additionally, improve the label of the expander button, by adding a
fixed "Expand" label, and setting the "labelled-by" relation to the
child of the GtkTreeExpander.
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
75f9b83b1e
Establish a control relation between demo search and list
...
The search entry changes the content of the list view, so we should
mention that relation to assistive technologies.
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
61e980bfb6
a11y: Add accessible actions to GtkSearchEntry
...
Just like GtkPasswordEntry, GtkSearchEntry should have its set of
accessible actions.
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
ebda736a09
a11y: Mark SearchEntry icons as presentational
...
While the "clear the search entry" icon behaves like a button, we don't
have any actual action that can trigger it, so let's ignore it.
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
d4ddfdc265
a11y: Set the role on GtkSearchBar
...
The search bar widget has a "SEARCH" landmark role, which is described
as:
A landmark region that contains a collection of items and
objects that, as a whole, combine to create a search facility.
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
f8bb206034
a11y: Icons in buttons are presentational
...
Buttons are described by text, and the icon child can be safely ignored.
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
87f92a93d3
a11y: Add more accessibility labels to GtkNotebook
...
Label the various components:
- the tab list
- the tab widget
- the arrow widgets
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
e49e084f4c
a11y: Use the stack page title as its accessible label
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
995daa1e29
a11y: GtkStack is a group of stack pages
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
d34936c1ea
Handle empty stack pages when creating an ATContext
...
If we don't have a widget inside GtkStackPage, we should use the default
GdkDisplay.
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
a59889a274
Unrealize the ATContext in StackPage on dispose
...
Otherwise we're going to try to unrealize it during the GtkStack
destruction, which will emit warnings.
2020-11-12 21:46:05 +00:00
Emmanuele Bassi
bfb054a023
a11y: Icons in WindowControls are presentational only
...
They don't contribute anything to the accessible description.
2020-11-12 21:46:05 +00:00
Emmanuele Bassi
e940704018
a11y: Ignore more structural roles when computing labels
...
These roles should not have a fallback name when explicitly unlabelled.
2020-11-12 21:46:05 +00:00
Emmanuele Bassi
429c7fc039
a11y: Add role exception for GtkScrolledWindow
...
ARIA does not have a "scroll pane" role, but AT-SPI does.
2020-11-12 21:46:05 +00:00
Emmanuele Bassi
0d6e4f7a6e
demo: Add more accessibility labels to the UI
2020-11-12 21:46:05 +00:00
Matthias Clasen
1f9eb5c64c
Merge branch 'clear-search-entry' into 'master'
...
searchbar: Fix clearing search entry on hide
See merge request GNOME/gtk!2820
2020-11-12 19:25:57 +00:00
Florian Müllner
056a073061
searchbar: Fix clearing search entry on hide
...
Commit fa3d1940bf
added separate grab handling for GtkSearchEntry, but
didn't consider whether the bar was revealed or concealed. The expected
behavior for the latter is that the entry is cleared rather than focused,
fix the condition accordingly.
2020-11-12 19:59:55 +01:00
Alexander Mikhaylenko
e46522e4b5
theme: Round all window corners
2020-11-12 22:19:00 +05:00
Alexander Mikhaylenko
7ac7919697
theme: Restructure window style
2020-11-12 22:17:52 +05:00
Matthias Clasen
5d9799d4e3
Merge branch 'ebassi/for-master' into 'master'
...
ATContext lifetime fixes
Closes #3341
See merge request GNOME/gtk!2811
2020-11-12 12:35:23 +00:00
Jakub Steiner
f95943a752
Merge branch 'wip/jimmac/sassc-global-vars' into 'master'
...
Adwaita: avoid !global
See merge request GNOME/gtk!2816
2020-11-12 12:34:10 +00:00
Jakub Steiner
ef88e9ffcc
Adwaita: avoid !global
...
- Work around having !global variables as sassc will
no longer support it
2020-11-12 13:14:37 +01:00
Alexander Mikhaylenko
49613dca8e
button: Don't make the gesture exclusive
...
With the last commit, pressing the same button with multiple fingers
doesn't cause extra emissions, so we can remove exclusive and allow
pressing multiple buttons at once on touch.
2020-11-12 15:27:16 +05:00
Alexander Mikhaylenko
a651a0ce69
gestureclick: Only emit release for the same sequence
...
Avoid spurious releases when touching the same widget with another finger.
2020-11-12 15:26:36 +05:00
Emmanuele Bassi
08d59d3f68
docs: Add "Accessibility" section to various widgets
...
There are a few widgets that gained an accessible role, which means
adding an "Accessibility" section in their description.
2020-11-12 00:36:32 +00:00
Matthias Clasen
afff39c503
Merge branch 'suggestion-entry-demo2' into 'master'
...
gtk-demo: Add suggestion entry demos
See merge request GNOME/gtk!2812
2020-11-11 21:40:07 +00:00
Matthias Clasen
a2897e1868
gtk-demo: Add suggestion entry demos
...
Add a possible replacement for GtkEntryCompletion
as a demo.
Move the Dropdowns demo to Lists/Selections, and make
it show both GtkDropDown and the suggestion entry, with
some variations.
2020-11-11 15:54:43 -05:00
Matthias Clasen
15172ebdb0
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2810
2020-11-11 20:49:51 +00:00
Emmanuele Bassi
9ac4a7d99f
a11y: Simplify GtkModelButton
...
Instead of recreating GtkATContexts in order to change their role, we
can simply unrealize and realize them back.
2020-11-11 19:45:43 +00:00
Emmanuele Bassi
8157717e03
a11y: Add missing fallback for accessible-role getter
...
If the per-instance accessible role is unset, use the class role.
2020-11-11 19:45:43 +00:00
Emmanuele Bassi
9052f6dafe
a11y: Rework ownership and lifetime of GtkATContext
...
Now that GtkATContext is explicitly realized and unrealized, we should
always create an instance at widget initialization time, and drop it
during the widget finalization. This should make it easier to set up the
initial accessible state of a widget during the instance initialization,
as well as reduce the chances of accidental creation of GtkATContext
instances during the destruction sequence.
2020-11-11 19:45:43 +00:00
Emmanuele Bassi
292576f312
a11y: Defer to the GtkAccessible's implementation
...
Since GtkATContexts are now lazily realized, we need to go through the
GtkAccessible's implementation to access the :accessible-role property,
in case there are fallbacks.
2020-11-11 19:45:43 +00:00
Emmanuele Bassi
2285382074
a11y: Create AtSpiRoot on realization
...
There's no need to do a lot of work on construction, if we're delaying
all remote work after the GtkATContext is realized.
The GtkAtSpiContext should also keep a reference on the root, and drop
it at unrealize time.
2020-11-11 18:46:44 +00:00
Emmanuele Bassi
526f1e315b
a11y: Use GROUP role for GtkNotebook
...
A notebook is a grouping of a tab list, tabs, and tab pages.
2020-11-11 18:46:11 +00:00
Emmanuele Bassi
877a7f98ca
a11y: Protect should_present() from empty contexts
...
If the GtkAccessible implementation returns a NULL context, we should
not be calling methods on it.
2020-11-11 18:33:15 +00:00
Emmanuele Bassi
73b14a3c3a
a11y: Do not leak the ATContext in GtkStackPage
...
GtkStackPage is not a widget, so it must release the reference on the
ATContext it owns.
2020-11-11 18:33:15 +00:00
Emmanuele Bassi
40c0826921
a11y: Mark more containers as structural elements
...
Widgets that just provide grouping and layout to other widgets should
not be relevant to the accessible tree.
2020-11-11 18:33:15 +00:00
Emmanuele Bassi
27b9b2e76c
a11y: Use the window title as its label
2020-11-11 18:33:15 +00:00
Emmanuele Bassi
04c4d293a7
a11y: Skip unlabelled structural roles
...
If a structural role is left unlabelled, just leave it unnamed.
2020-11-11 18:33:15 +00:00
Emmanuele Bassi
033791b374
a11y: Translate ARIA windows to AT-SPI frames
...
For backward compatibility with GTK3.
2020-11-11 18:33:15 +00:00
Emmanuele Bassi
95ee5ff424
a11y: Add more ARIA/AT-SPI role translations
2020-11-11 18:33:15 +00:00
Emmanuele Bassi
65d29e00c7
a11y: Realize parent ATContext for the stack page
...
Just like for popovers, the stack page is not directly connected on the
widget's DOM, so we need to realize the parent ATContext ourselves.
2020-11-11 18:33:15 +00:00
Emmanuele Bassi
3b2cd972d5
a11y: Implement missing atspi.Component getters
...
Some of them are entirely innocuous, and we can easily provide values
that match what GTK3 provides.
2020-11-11 18:33:15 +00:00
Emmanuele Bassi
428ec29598
a11y: Unrealize ATContext on dispose()
...
By unrealizing the context we avoid additional work during the dispose
phase, in case widget code updates the accessible state. We use
GtkAccessible's API, to ensure we unrealize the right ATContext, instead
of the one we store inside GtkWidgetPrivate.
We drop the ATContext instance inside GtkWidget during finalization, to
mop up eventual vivifications there.
2020-11-11 18:33:15 +00:00
Matthias Clasen
bfe5b0d1b7
Adwaita: Don't do n-th child things for list rows
...
Making the list row child css depend on the position
is very expensive, and does not acutally work correctly
(since we don't have widgets for all children, so the
position of the child widget does not reflect the actual
model item position).
To make this more palatable, use the bottom border
instead of the top border, since most lists have a natural
border at the top (with headers), and may end up with
empty space at the bottom.
2020-11-11 13:18:08 -05:00
Matthias Clasen
82b855cc4b
label: Avoid a needless strdup
...
Don't duplicate the string before we know if it
has actually changed.
2020-11-11 12:24:35 -05:00
Matthias Clasen
0db504edde
label: Optimize GtkLabel setters
...
The overarching goal here is to not queue a resize
unless something has actually changed. In columnview
scenarios, we often deal with hundreds of labels.
Labels are cattle, not pets.
2020-11-11 11:48:27 -05:00
Matthias Clasen
5ed3ad6cc8
gtk-demo: Split off SvgPaintable
...
Put the SvgPaintable implementation into its
own source files, for ease of copying.
2020-11-11 10:35:54 -05:00
Matthias Clasen
27c4c19333
Don't hide widgets in dispose()
...
This is leftover code from when widgets were hidden
by default, and was setting them back to their initial
state.
This is getting in the way now, as hiding the widget
updates the HIDDEN accessible state, which ends up
re-creating the at context that we've already disposed
of, leading to memory leaks.
2020-11-11 10:35:54 -05:00
Matthias Clasen
74a7f73239
Merge branch 'matthiasc/builder-requires' into 'master'
...
Matthiasc/builder requires
See merge request GNOME/gtk!2806
2020-11-11 03:53:52 +00:00
Matthias Clasen
a047b7d6d1
Merge branch 'fix-demos-wo-pangoft2' into 'master'
...
gtk-demo: Fix building scrolling demo without PangoFT2
See merge request GNOME/gtk!2807
2020-11-11 03:50:46 +00:00
Chun-wei Fan
a76f37a501
gtk-demo: Fix building scrolling demo without PangoFT2
...
For builds that do not have PangoFT2, the demo fails to link because we weren't
building listview_ucd.c. Fix the build by building listview_ucd.c with
script-names.c and unicode-names.c for all builds, as we now require a Pango
version that already always depends on HarfBuzz and those sources do not use
anything from PangoFT2.
2020-11-11 11:15:05 +08:00
Matthias Clasen
d6a0948182
testsuite: Update buildertool tests
...
gtk-builder-tool simplify --3to4 now produces a
<requires lib="gtk" version="4.0"/>.
Adapt for that, and also add some tests that check that we
actually verify the requires, and accept 3.99 and 4.0, but
not 5.x.
2020-11-10 19:20:51 -05:00
Matthias Clasen
7215c74933
buildertool: Supplant a requires
...
When we convert a ui file to GTK 4 syntax, we *know*
that it requires GTK 4, so put that in the output.
2020-11-10 19:19:40 -05:00
Matthias Clasen
e4be785c6c
builder: Be a bit more strict about requires
...
Check that the major version matches (without this, the
requires check is really toothless), but allow 3.99 to
match 4.0.
2020-11-10 19:18:26 -05:00
Matthias Clasen
18779b9d67
testsuite: Remove <requires> from ui files
...
We don't need these here, the testsuite is shipped
with GTK.
2020-11-10 19:17:45 -05:00
Matthias Clasen
9b056f57f7
examples: Remove requires from ui files
...
No need to check requires for things that are shipped
with GTK.
2020-11-10 18:38:54 -05:00
Matthias Clasen
d6c753bde7
gtk4-demo: Remove <requires> from ui files
...
No need to check requires for things that are shipped
with GTK.
2020-11-10 18:37:40 -05:00
Matthias Clasen
d69a943661
gtk: Remove <requires> from ui files
...
We don't need to check requirements for things
that are shipped *with* gtk.
2020-11-10 18:36:03 -05:00
Matthias Clasen
0ececc7109
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
Closes #3343 and #3342
See merge request GNOME/gtk!2804
2020-11-10 18:33:36 +00:00
Matthias Clasen
3cc0870084
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2805
2020-11-10 16:59:47 +00:00
Emmanuele Bassi
2229d7f66c
docs: Add example of relations with lists of references
2020-11-10 14:38:09 +00:00
Emmanuele Bassi
ed7619ec16
a11y: Clone GtkATContext in GtkModelButton
...
The hypothetical widget that needs to clone ATContext instances
because it needs to control the accessible role post-construction is
really GtkModelButton.
Fixes : #3342
2020-11-10 14:31:57 +00:00
Emmanuele Bassi
7ed06480cf
a11y: Add private API to clone a GtkATContext
...
Some widgets might want to override GtkAccessible and create their own
context in order to control the accessible role post-construction time.
To avoid explicitly copying the existing state over from the original
ATContext to the new one, we need a way to clone the context's state
from inside the ATContext itself.
2020-11-10 14:31:56 +00:00
Emmanuele Bassi
f9db651f32
a11y: Do not copy the list of references
...
The constructor for GtkReferenceListAccessibleValue is transfer full,
which means we should not be copying the GList around.
Fixes : #3343
2020-11-10 14:31:56 +00:00
Emmanuele Bassi
c264254d4b
a11y: Parse reference lists using varargs
...
Using GList is a bit lame, and makes the API more complicated to use
than necessary in the common case.
The only real use case for a GList is gtk_widget_add_mnemonic_label(),
and for that we can use the GValue-based API instead.
Fixes : #3343
2020-11-10 14:31:56 +00:00
Emmanuele Bassi
6af89e9034
a11y: Add GValue initializers for accessible attributes
...
Consumers of the GValue-based API for GtkAccessible need to have a way
to initialize the GValue with the correct type for the given attribute.
2020-11-10 14:31:56 +00:00
Emmanuele Bassi
1bdc8b9061
a11y: Proxy GtkWidget:accessible-role
...
The accessible-role property in GtkWidget has three possible targets:
- the :accessible-role of a GtkATContext, if realized
- the accessible_role field of GtkWidgetPrivate
- the accessible_role field of GtkWidgetClassPrivate
When we set the accessible role of a widget using the GObject property
mechanism, we want to either set the GtkWidgetPrivate.accessible_role
field, if there's no ATContext *or* if the ATContext is not realized.
Conversely, when we get the accessible-role property we want to have a
series of fallbacks in place:
- if GtkAccessible.get_at_context() returns an ATContext, and that
ATContext is realized, return the :accessible-role of the context
- if GtkWidgetPrivate.accessible_role is not WIDGET, return the
stored accessible role
- return GtkWidgetClassPrivate.accessible_role
This should help catch the case of getting the accessible role of
widgets that override GtkAccessible.get_at_context(), like
GtkModelButton.
See: #3342
2020-11-10 14:31:56 +00:00
Matthias Clasen
c442f9f05a
printdialog: Plug listmodel memory leaks
...
We were leaking references returned from g_list_model_get_item
in some places.
2020-11-10 09:07:54 -05:00
Matthias Clasen
6cbd7e29dd
fontchooser: Plug listmodel memory leaks
...
We were leaking references returned from g_list_model_get_item
in some places.
2020-11-10 09:07:40 -05:00
Matthias Clasen
6079033cde
columnview: Plug listmodel memory leaks
...
We were leaking references returned from g_list_model_get_item
in some places.
2020-11-10 09:07:22 -05:00
Matthias Clasen
d63afaf5ad
x11: Plug listmodel memory leaks
...
We were leaking references returned from g_list_model_get_item
in some places.
2020-11-10 09:07:01 -05:00
Matthias Clasen
7e089664fc
win32: Plug listmodel memory leaks
...
We were leaking references returned from g_list_model_get_item
in some places.
2020-11-10 09:06:37 -05:00
Matthias Clasen
06fbad0b26
wayland: Plug listmodel memory leaks
...
We were leaking references returned from g_list_model_get_item
in some places.
2020-11-10 09:05:55 -05:00
Yuri Chornoivan
2a3c3b4c6a
Update Ukrainian translation
2020-11-10 08:15:59 +00:00
Yuri Chornoivan
eb3933cffd
Update Ukrainian translation
2020-11-10 07:58:38 +00:00
Matthias Clasen
d1de9234c5
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2803
2020-11-10 04:47:28 +00:00
Matthias Clasen
3e8260d528
gtk-demo: Plug a memory leak
2020-11-09 23:29:03 -05:00
Matthias Clasen
192f515682
gtk-demo: Tweak a demo title
2020-11-09 23:28:45 -05:00
Matthias Clasen
2543c9f5a3
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2802
2020-11-10 01:42:30 +00:00
Matthias Clasen
a745dbfc15
gkt-demo: Add a columview to the scroll demo
...
This is an interesting case, since it has many labels,
and we are struggling to provide good scrolling performance.
2020-11-09 20:07:09 -05:00
Matthias Clasen
14be50839e
gtk-demo: Improve consistency
...
Make the shortcut triggers demo big enough
to not ellipsize the window title.
2020-11-09 19:54:17 -05:00
Matthias Clasen
a85d9cda07
gtk-demo: Improve consistency
...
Make the paintable svg demo follow the same
pattern we use for other demos.
2020-11-09 19:53:44 -05:00
Matthias Clasen
7d49f1e250
gtk-demo: Improve consistency
...
Make the paintable emblems demo follow the same
pattern we use for other demos.
2020-11-09 19:52:28 -05:00
Matthias Clasen
6fa2936956
gtk-demo: Set default size for drawingarea demo
...
Set a default size, so we don't ellipsize the window
title when the window is presented.
2020-11-09 18:50:43 -05:00
Matthias Clasen
b81463e7d3
gtk-demo: Plug a memory leak
2020-11-09 18:48:10 -05:00
Matthias Clasen
b622745501
gtk-demo: Plug a memory leak
2020-11-09 18:48:10 -05:00
Matthias Clasen
5379a4bf34
a11y: Clean up properly in unregister_object
...
Things that are set up in register_object should
be cleaned up in unregister_object.
2020-11-09 18:48:10 -05:00
Matthias Clasen
b966f593a5
Merge branch 'wip/jimmac/search-entry-icon' into 'master'
...
search entry: icon
Closes #3340
See merge request GNOME/gtk!2801
2020-11-09 22:41:41 +00:00
Jakub Steiner
706a8f9784
search entry: icon
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3340
2020-11-09 22:55:21 +01:00
Matthias Clasen
2dc7e327ad
Merge branch 'ebassi/for-master' into 'master'
...
docs: Add missing a11y environment variables
See merge request GNOME/gtk!2788
2020-11-09 17:19:12 +00:00
Matthias Clasen
7b151c3ef0
Merge branch 'kinetic-scroll-velocity-accumulation' into 'master'
...
scrolledwindow: Accumulate velocity with kinetic scrolling
See merge request GNOME/gtk!2768
2020-11-09 17:14:03 +00:00
Emmanuele Bassi
0af6630521
a11y: Consolidate accessibility environment variables
...
Use a single environment variable for everything:
- select the ATContext implementation
- select the test ATContext
- disable ATContext entirely
We use the same pattern as GSK_RENDERER, GTK_DEBUG, etc.
The documentation needs to be updated to include the environment
variable.
2020-11-09 16:21:49 +00:00
Chris Lord
4b459a99be
scrolledwindow: Accumulate velocity with kinetic scrolling
...
Accumulate existing velocity when decelerating from a swipe if the swipe
velocity is above a certain fraction of that existing velocity.
2020-11-09 15:28:32 +00:00
Matthias Clasen
e093ed7d67
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3337
See merge request GNOME/gtk!2799
2020-11-09 14:21:26 +00:00
Matthias Clasen
ddbea8feda
Remove GtkPlacesOpenFlags from public headers
...
The GtkPlacesOpenFlags enum is only used in private
API, so move it to private headers. Since we still need
a GType for it, add gtkplacessidebarprivate.h to the
headers we use for generating private enum types. In turn,
this registers the other private enums in that header, so
take the opportunity to fix their naming, and use the
generated types for the corresponding sidebarrow properties.
Fixes : #3337
2020-11-09 08:45:36 -05:00
Matthias Clasen
6b5dff5667
docs: Document GTK_MEDIA
...
Add a paragraph about the GTK_MEDIA environment variable.
2020-11-08 09:58:26 -05:00
Matthias Clasen
53cd499621
Revert "Update gtktreestore.c: gtk_tree_store_remove didn't have the proper comment annotation"
...
This reverts commit 32baa0a549
.
See discussion in https://gitlab.gnome.org/GNOME/gtk/-/issues/78
for the background.
2020-11-07 21:36:34 -05:00
Matthias Clasen
30c5a6f79c
Merge branch 'patch-3' into 'master'
...
gtk/gtktextbuffer: remove GtkTextBufferTargetInfo
See merge request GNOME/gtk!2797
2020-11-08 01:11:26 +00:00
Emmanuele Bassi
4e1191550c
Merge branch 'patch-4' into 'master'
...
gtk/gtkversion: fix doc comment references
See merge request GNOME/gtk!2798
2020-11-08 00:50:40 +00:00
David Lechner
3b1363d31a
gtk/gtkversion: fix doc comment references
...
Cross-references for constants use the "%" prefix rather than the "#" prefix.
2020-11-07 23:57:13 +00:00
David Lechner
160e29ea95
gtk/gtktextbuffer: remove GtkTextBufferTargetInfo
...
GtkTextBufferTargetInfo is not used anywhere and can be removed.
2020-11-07 22:29:11 +00:00
Emmanuele Bassi
b9adad304e
Merge branch 'patch-6' into 'master'
...
gtk/enums: remove GtkPopoverConstraint
See merge request GNOME/gtk!2796
2020-11-07 22:19:33 +00:00
Emmanuele Bassi
ef17d716d7
Merge branch 'patch-4' into 'master'
...
doc: fix missing GtkNotebookTab
See merge request GNOME/gtk!2794
2020-11-07 22:01:33 +00:00
Emmanuele Bassi
8ec01772be
Merge branch 'patch-5' into 'master'
...
gtk/enums: remove GtkMenuDirectionType
Closes #3336
See merge request GNOME/gtk!2795
2020-11-07 21:59:04 +00:00
David Lechner
4084b4c6c6
gtk/enums: remove GtkPopoverConstraint
...
GtkPopoverConstraint is no longer used anywhere and can be removed.
2020-11-07 21:47:32 +00:00
David Lechner
c3cb8e0a79
gtk/enums: remove GtkMenuDirectionType
...
This was used by GtkMenu and can safely be removed.
Closes #3336
2020-11-07 21:39:34 +00:00
Emmanuele Bassi
19b5e5349e
Merge branch 'gles-no-queries' into 'master'
...
gl renderer: Generate queries only on desktop GL
See merge request GNOME/gtk!2792
2020-11-07 21:33:09 +00:00
Emmanuele Bassi
f87923e09e
Merge branch 'patch-3' into 'master'
...
docs: include GtkFilterMatch
See merge request GNOME/gtk!2793
2020-11-07 21:32:40 +00:00
David Lechner
05684f6c3c
doc: fix missing GtkNotebookTab
...
GtkNotebookTab was listed under private, but it is used by the "focus-tab" signal, so it needs to be public.
2020-11-07 21:17:09 +00:00
Emmanuel Gil Peyrot
08193ecf1c
gl renderer: Generate queries only on desktop GL
...
On desktop GL, GL 1.5 or GL_ARB_occlusion_query is required to get the
glGenQueries() etc. symbols. This isn’t the case on GLES, where they
are provided by GL_EXT_occlusion_query_boolean, and more importantly
have never been made core.
This patch allows gtk4-demo to start when GDK_DEBUG=gl-gles is set, on
my Mali 400 MP running the Lima driver from Mesa.
2020-11-07 21:49:42 +01:00
David Lechner
8c9a827516
docs: include GtkFilterMatch
...
The GtkFilterMatch enum type was missing from the documentation.
2020-11-07 20:45:41 +00:00
Timm Bäder
638987f359
Merge branch 'dlech-master-patch-13962' into 'master'
...
gtk/enums: fix doc comment references
See merge request GNOME/gtk!2791
2020-11-07 18:47:55 +00:00
David Lechner
8190f0c420
gtk/enums: fix doc comment references
...
Enum members need a "%" prefix rather than "@" or "%@" in order to
automatically create links in the documentation.
2020-11-07 17:46:26 +00:00
Arnaud Bonatti
f7de0bc9c8
Fix tests with regard to GtkBuilder <requires>.
2020-11-07 16:17:36 +01:00
Arnaud Bonatti
08f2990eac
Document the GtkBuilder <requires> tag changes.
2020-11-07 16:17:14 +01:00
Arnaud Bonatti
e6d46ec5ad
Teach gtk-builder-tool
to rewrite <requires>.
2020-11-07 16:17:01 +01:00
Arnaud Bonatti
db6d7dccd8
Drop “gtk+” plus sign in GtkBuilder <requires>.
2020-11-07 16:16:55 +01:00
Piotr Drąg
4e8a5f2ec8
Update POTFILES.skip
2020-11-07 11:45:07 +01:00
Matthias Clasen
63e9414210
Merge branch 'wip/carlosg/for-master' into 'master'
...
Minor text handle fixes
See merge request GNOME/gtk!2787
2020-11-07 03:10:27 +00:00
Carlos Garnacho
4751ac1ac8
gtk/textview: Improve check for cursor-mode
...
Check the text handle role, instead of looking for the other handle
visibility. The other handle may be invisible during selection mode
(e.g. pointing to offscreen contents). This fixes both this code
switching to cursor mode out of the blue, and possible crashes later
on as this handle might be hidden in the process, while its own event
controller is handling events on the parent surface.
2020-11-06 14:30:18 +01:00
Carlos Garnacho
9d56c56117
gtk/texthandle: Point handle to the middle of the pointing_to rect
...
At least vertically, this gives again as much space up and down before
moving the selection the the prev/next line.
2020-11-06 14:28:46 +01:00
Matthias Clasen
0d82faa239
Merge branch 'wip/carlosg/for-master' into 'master'
...
Text handle fixes
Closes #3176
See merge request GNOME/gtk!2785
2020-11-06 01:23:16 +00:00
Matthias Clasen
fb27724042
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
...
macos: tweak opacity, color/alpha size requests
See merge request GNOME/gtk!2786
2020-11-06 01:20:23 +00:00
Christian Hergert
90141ef305
macos: use NSOpenGLContext directly for current tracking
...
We don't need to interact with GdkGLContext here to keep the
current context active.
2020-11-05 13:57:41 -08:00
Christian Hergert
bc05da8dc0
macos: explicitly request color and alpha sizes
2020-11-05 13:37:25 -08:00
Christian Hergert
bf3e1e5b40
macos: use opaque GL context when possible
...
This is better for situations where the window is decorated and therefore we can
rely on window system clipping of rounded corners.
2020-11-05 13:34:29 -08:00
Carlos Garnacho
0ae93c8cdc
gtk/textview: Do not forcibly show text handles
...
The gtk_text_view_set_handle_position() function called some lines above
takes care of handle visibility already, also accounting for other
conditions (e.g. whether the handle points to contents onscreen).
Forcibly showing handles here misbehaves if the handle should stay hidden,
and somewhat expensively as it involves creating and throwing a native
surface every time.
2020-11-05 21:29:20 +01:00
Carlos Garnacho
f9813019a7
gtk/textview: Defer touchscreen focus placing to drag end
...
With the scrolledwindow drag gesture not claiming the sequence immediately,
we end up placing the cursor (and undoing the previous selection) each time
we scroll.
There is already handling too short drags in ::drag-end, so let this code
handle touchscreens as well.
2020-11-05 21:29:20 +01:00
Carlos Garnacho
5e907ebd58
gtk/textview: Clean up further if the drag gesture is taken over
...
If the gesture becomes captured (e.g. from a parent scrolledwindow), we
leave some things in the air. Clean these up properly. This is recurrent
with touch scroll.
2020-11-05 21:29:20 +01:00
Carlos Garnacho
fa5fa3a881
gtk/imcontextwayland: Unset focus when unsetting widget
...
In destruction paths of a focused entry, the IM context might first
end up detached from its widget, then destroyed. This currently prevents
the IM context from detaching itself from the GtkIMContextWaylandGlobal.
Make it do so when unsetting the client widget, so the IM context gets
properly unfocused before destruction.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3176
2020-11-05 21:29:20 +01:00
Carlos Garnacho
9b9cc2f947
gtk/texthandle: Handle events on parent surface's native
...
In wayland, popup positioning and event handling are doubly async.
This makes it unreliable to figure out parent surface coordinates
out of the popup position and the events received. This results in
jumpy text handles there.
The best way to deal with parent surface coordinates is to handle
the events there. Make the handles transparent to input, and make
the drag gesture be set up on the parent widget's native.
The gesture is set up in the capture phase, setting it on the native
(as opposed to the parent widget) achieves a feeling similar to it
being a distinct surface, as it should take precedence over other
gestures in the emission chain (e.g. scrolledwindows).
As everything is in parent widget's native's coordinates, the drag
handles become smooth again.
2020-11-05 21:29:20 +01:00
Carlos Garnacho
80f5be8b13
gdk/wayland: Ensure to update input area on map
...
If a surface is hidden, then shown again, it should preserve the
input area specified. Make sure that happens.
2020-11-05 21:29:20 +01:00
Matthias Clasen
ec5b5e8aaa
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3325
See merge request GNOME/gtk!2784
2020-11-05 16:43:08 +00:00
Emmanuele Bassi
95463719ae
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
See merge request GNOME/gtk!2783
2020-11-05 15:37:38 +00:00
Emmanuele Bassi
041415e9b4
docs: Add a note on the "presentation" role
2020-11-05 14:50:40 +00:00
Emmanuele Bassi
abd5383d40
docs: Add a section on accessible buttons
...
Anything that behaves like a button should do so at the accessibility
level as well.
2020-11-05 13:57:50 +00:00
Emmanuele Bassi
c5dc0e2e4c
a11y: Use proper role and state for tree expander image
...
The "expander" image is a button, and it controls the expansion of the
row, so it has a state associated to it that we must update.
2020-11-05 13:46:43 +00:00
Emmanuele Bassi
88116712f6
a11y: Use "presentation" role instead of "hidden" state
...
The intended use case of the "presentation" role is
| […] when an element is used to change the look of the page but does not
| have all the functional, interactive, or structural relevance implied
| by the element type, or may be used to provide for an accessible
| fallback in older browsers that do not support WAI-ARIA.
One of the examples is, literally:
| An element whose content is completely presentational (like a spacer
| image, decorative graphic, or clearing element);
Which fits perfectly for the GtkTreeExpander's "indent" builtin icon
widget.
2020-11-05 13:25:53 +00:00
Emmanuele Bassi
7dfa41bbc4
a11y: ARIA's "presentation" role maps to ATSPI_ROLE_SECTION
...
See the mapping role table in the Core-AAM normative document:
https://w3c.github.io/core-aam/#mapping_role_table
2020-11-05 13:14:08 +00:00
Matthias Clasen
c09ff35df4
dragicon: Make a function propertly exported
...
Mark gtk_drag_icon_create_widget_for_value with
GDK_AVAILABLE_IN_ALL, since it is meant to be public.
Also, clarify the documentation a bit.
Fixes : #3325
2020-11-05 07:23:38 -05:00
Matthias Clasen
d526bcc71b
Cosmetics
...
Fix argument ordering of gdk_cursor_new_from_name.
2020-11-04 23:36:09 -05:00
Matthias Clasen
13d1e497f7
testsuite: Improve GdkCursor coverage
2020-11-04 23:36:09 -05:00
Matthias Clasen
3eaae748d3
3.99.4
2020-11-04 21:46:10 -05:00
Matthias Clasen
7f16067383
Merge branch 'wip/chergert/gdk-macos-gl-renderer' into 'master'
...
macos: gl context improvements and event cleanup
See merge request GNOME/gtk!2780
2020-11-05 02:21:02 +00:00
Matthias Clasen
024e048c26
Merge branch 'wip/chergert/fix-macos-pointer-position-over-surface' into 'master'
...
macos: fix calculation of mouse position
See merge request GNOME/gtk!2781
2020-11-05 02:19:18 +00:00
Christian Hergert
c31c3848df
macos: fix calculation of mouse position
...
This fixes the calculation of the position of the pointer over the surface
which was incorrectly providing negative values.
2020-11-04 18:03:54 -08:00
Matthias Clasen
b0e0af1838
Merge branch 'patch-5' into 'master'
...
Update comment annotations of gtk_tree_model_iter_previous and...
See merge request GNOME/gtk!2775
2020-11-05 01:53:34 +00:00
Matthias Clasen
3785bf1f17
Merge branch 'fix-issue-2019-for-master' into 'master'
...
[master] GdkW32: remove klassTEMPSHADOW
Closes #2019
See merge request GNOME/gtk!2750
2020-11-05 01:53:02 +00:00
Matthias Clasen
79fb5724f9
Merge branch 'mr1063-for-master' into 'master'
...
Forward port MR !1063 (Win32 IME fixes) to GTK master
See merge request GNOME/gtk!2777
2020-11-05 01:48:37 +00:00
Christian Hergert
65b2ea1888
macos: resize extra GL window/view when surface changes
...
Once we figure out what is going on with textures, changes are we'll be
able to let this stay a zero rect. But that is still a bit up in the air right now.
2020-11-04 17:21:21 -08:00
Christian Hergert
6309bd12ac
macos: clip damage when swapping buffers
...
This ensures that we only copy the changed area.
2020-11-04 17:21:17 -08:00
Christian Hergert
7444a151b2
macos: remove synthesize_motion helper
...
We can use gdk_surface_request_motion() now instead of our extra
helper to do essentially the same thing.
2020-11-04 16:58:50 -08:00
Christian Hergert
ce9cc2db86
macos: always create dummy window/view for GL context
...
This simplifies the creation by always creating the dummy views, and then
removes it if necessary by detecting the begin_frame/end_frame pair.
2020-11-04 16:52:12 -08:00
Christian Hergert
e91b930648
Revert "Simplify gdk_surface_queue_render"
...
This reverts commit 2120e9df88
.
2020-11-04 16:28:13 -08:00
Matthias Clasen
ed78fb1366
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2779
2020-11-04 20:41:09 +00:00
Matthias Clasen
388f12b7d9
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
See merge request GNOME/gtk!2778
2020-11-04 20:37:39 +00:00
Matthias Clasen
8ae415acff
popovermenu: Fail gracefully if no model
...
If we don't have a model yet, return FALSE from
gtk_popover_menu_add_custom().
2020-11-04 14:59:32 -05:00
Matthias Clasen
d2cc9365fc
Cosmetics
...
Extraneous pair of parens snuck in with 2120e9df88
.
2020-11-04 14:59:27 -05:00
Matthias Clasen
dcfb6e5ef5
surface: Be smarter about autohide
...
When we close grabbing popups due to an outside
click, check at each level if the click is still
outside. This makes closing the nested popover
menu in the popover on page 3 of widget-factory
work as expected, when you click the menubutton
again.
2020-11-04 14:56:30 -05:00
Matthias Clasen
75f96b83de
surface: Be more lenient for autohide
...
When an event happens on a non-grabbing popup that hangs off
a grabbing popup, don't trigger the autohide. This makes touch
text handles work inside the popover on page 3 of widget-factory.
2020-11-04 14:56:30 -05:00
Emmanuele Bassi
66bba1493e
a11y: Remove stray g_printerr()
2020-11-04 19:39:08 +00:00
Emmanuele Bassi
1dde54b872
a11y: Hide the "indent" in GtkTreeExpander
...
It's just padding.
2020-11-04 19:38:14 +00:00
Emmanuele Bassi
c48a990778
a11y: Describe window controls
...
The window controls for client side decorations have only icons, which
means they are not accessible.
2020-11-04 18:59:11 +00:00
Matthias Clasen
23c425618e
Merge branch 'a11y/atcontext-realize' into 'master'
...
A11y/atcontext realize
See merge request GNOME/gtk!2772
2020-11-04 18:10:55 +00:00
Matthias Clasen
d2a7ecf72c
gtk-demo: Simplify the run button
...
Don't create the label manually. It is not necessary,
and letting the button do it also improves the
accessibility setup.
2020-11-04 12:54:48 -05:00
Matthias Clasen
f220a1e3c7
gtk-demo: Set some accessible properties
...
Set labels in the builder demo. The ARIA authoring practices
say that both menubars and toolbars *must* have an accessible
label.
2020-11-04 12:53:23 -05:00
Emmanuele Bassi
ba63aa76ca
a11y: Move parent context ref getter to its own function
...
Keeps the body of handle_accessible_get_property() readable.
2020-11-04 17:16:24 +00:00
Emmanuele Bassi
72415eaa49
a11y: Make the Button labelled by its child label
...
Establish the relation whenever we set the label widget.
2020-11-04 17:15:13 +00:00
Emmanuele Bassi
d88f7c9459
a11y: Use the tooltip text as the accessible description
...
It's more common to have a tooltip as the accessible description than an
explicit description. This is also the behaviour of GTK3.
2020-11-04 17:15:13 +00:00
Emmanuele Bassi
425d8ad02a
Set accessible label on GTK Demo's primary menu
...
Otherwise its label is going to be "GtkMenuButton".
2020-11-04 17:15:13 +00:00
Emmanuele Bassi
ae9758b964
a11y: Unrealize ATContext on dispose
2020-11-04 17:15:13 +00:00
Matthias Clasen
828a067b2b
Propagate accessible-role to backend
...
We want to allow setting the accessible role as long
as the context is unrealized, so we need to propagate
the new role.
2020-11-04 11:53:07 -05:00
Matthias Clasen
bb24b350ac
gtk-demo: Set an accessible role
...
Set an accessible role for the toolbar in the
builder demo. This tests accessibility support
in GtkBuilder.
2020-11-04 11:36:52 -05:00
Emmanuele Bassi
dafb2b0361
a11y: Allow updating role on unrealized contexts
...
We can still change the accessible role if an ATContext instance is
unrealized.
2020-11-04 15:22:31 +00:00
Emmanuele Bassi
30210c7087
a11y: Move ATContext to an explicit realization model
...
We are doing too much work during the construction phase of the
AT-SPI backend for GtkATContext. Instead of having the AtSpiContext
register itself at construction time, let's add explicit realize
and unrealize operations, and connect the ATContext realization to the
rooting operation of a GtkWidget.
2020-11-04 15:02:44 +00:00
Philip Zander
d8a795df0a
Win32 IME fixes
...
See merge request !1063
2020-11-04 17:17:52 +08:00
kai-berlin
499e4b4c50
broadway: Set modifier state of scroll events
...
Set modifier state of scroll events, so Ctrl-scroll
works.
Fixes : #2733
2020-11-03 19:21:00 -05:00
Matthias Clasen
fd52220b1b
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3318 , #3319 , and #3320
See merge request GNOME/gtk!2776
2020-11-03 20:15:08 +00:00
Matthias Clasen
e9438224ab
texthandle: Queue a draw when role changes
...
This helps with role changes not taking immediate
effect.
Fixes : #3320
2020-11-03 14:39:29 -05:00
Matthias Clasen
2120e9df88
Simplify gdk_surface_queue_render
...
We can just call gdk_surface_invalidate_rect here
like we do elsewhere in gdk, and I'm a bit uncertain
about the current code that adds an empty update
region.
2020-11-03 14:37:27 -05:00
Matthias Clasen
ddd16dd312
texthandle: Fix positioning
...
Use the same approach we use for popovers, using
gtk_widget_get_surface_allocation. It works.
Fixes : #3319
2020-11-03 12:37:39 -05:00
Matthias Clasen
7624f66fec
widget-factory: Make sure we close popover on page 3
...
We don't want the popover to stay open when we open
an about dialog or shortcuts window. Since cascade-popdown
would also affect e.g. the context menu of the text widgets,
do this explicitly.
2020-11-03 12:09:43 -05:00
Matthias Clasen
dab11ea841
popover: Change default for cascade-popdown
...
We've found a number of cases where this cascading
has unexpected side-effects. So, turn it off by
default, and only set it for menus.
2020-11-03 11:00:32 -05:00
Matthias Clasen
a3f3dc0f1c
Adwaita: Set a background for magnifiers
...
The magnifier in entries is magnifying the GtkText
widget, which does not draw any background itself.
Therefore, we give the magnifier a background, to
make things look as expected.
Fixes : #3318
2020-11-03 11:00:32 -05:00
Matthias Clasen
5d59447ccb
magnifier: Set a css name
...
Predictably, we use the name "magnifier".
2020-11-03 11:00:32 -05:00
Matthias Clasen
e3c38e4143
NEWS: Updates
2020-11-03 11:00:32 -05:00
Matthias Clasen
e5ec4df702
docs: Mention g_file_get_basename
...
Mention g_file_get_basename in the migration guide section
about GtkFileChooser api changes.
2020-11-03 11:00:32 -05:00
Danny Milosavljevic
1340ff2bc2
Update comment annotations of gtk_tree_model_iter_previous and gtk_tree_model_iter_next to state that the ITER parameter is modified.
2020-11-03 15:10:11 +00:00
Matthias Clasen
dbdc909e19
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2774
2020-11-03 12:14:21 +00:00
Matthias Clasen
c6ef1943e4
gtk-demo: Remove more gtk3-demo icon uses
...
Use our own logo everywhere.
2020-11-02 22:50:03 -05:00
Matthias Clasen
a3c9f8594a
gtk-demo: Tweak images demo
...
Use our own logo instead of the gtk3-demo one, and
tweak the headings to refledct what we show.
2020-11-02 22:43:44 -05:00
Matthias Clasen
354f2b65fa
gtk-demo: Reanimate floppy buddy
...
Implement a GdkPaintable wrapper around GdkPixbufAnimation,
so floppy buddy can waive again.
2020-11-02 21:38:02 -05:00
Matthias Clasen
b3657d5f2e
widget-factory: Restore modality of the about dialog
...
Make the about dialog of widget-factory modal again.
This was lost in 87a8fda163
.
2020-11-02 21:37:55 -05:00
Timm Bäder
82ca65956f
gl renderer: Make debugging code shorter
2020-11-02 14:55:14 -05:00
Timm Bäder
c8c2106f3e
gl renderer: Refactor vertex data loading code
2020-11-02 14:55:14 -05:00
Timm Bäder
8178dfb85a
gl renderer: Use the load_vertex_data* functions more often
2020-11-02 14:55:14 -05:00
Timm Bäder
50e78198a8
gl renderer: More load_vertex_data* usage
2020-11-02 14:55:14 -05:00
Timm Bäder
ee04cbcfa8
gl renderer: Reword a comment
2020-11-02 14:55:14 -05:00
Timm Bäder
fc312f7ffe
gl renderer: Remove an outdated comment
2020-11-02 14:55:14 -05:00
Timm Bäder
e6e964c3f3
gl renderer: Refactor rendering shadow nodes
...
Also use load_vertex_data_with_region here.
2020-11-02 14:55:14 -05:00
Timm Bäder
df5e796d99
gl renderer: Refactor blurred shadow drawing code
...
We already have various load_vertex_data* code, so try to reuse that
here.
2020-11-02 14:55:14 -05:00
Timm Bäder
d3239c953d
gl renderer: Nine-slice unblurred outset shadows
...
See #3284
2020-11-02 14:55:13 -05:00
Timm Bäder
fb9a3bf32b
printoperation: Remove double assignment
2020-11-02 14:55:13 -05:00
Matthias Clasen
ace83a938d
Merge branch 'matthiasc/for-master' into 'master'
...
gtk-demo polish
See merge request GNOME/gtk!2773
2020-11-02 19:36:09 +00:00
Matthias Clasen
fb028f0fe7
gtk-demo: Renovate the paned demo
...
Make this look less like testgtk from GTK 2.
2020-11-02 13:56:19 -05:00
Matthias Clasen
8a13909bab
fixup: window titles
2020-11-02 12:02:19 -05:00
Matthias Clasen
4e745f06e9
gtk-demo: Polish all entry demos
...
Make the spacing a bit more consistent, and tweak
some strings here and there.
2020-11-02 12:01:11 -05:00
Matthias Clasen
14b65a3c4f
gtk-demo: Polish the search bar demo
...
Rename this, and make it look a bit less like a
debugging tool, and more like a demo.
2020-11-02 12:00:24 -05:00
Matthias Clasen
64ad490bc1
gtk-demo: Tweak tagged entry styling
...
Move the tags closer together, and avoid resizing too much.
2020-11-02 11:59:22 -05:00
Matthias Clasen
d2d7a4bcab
gtk-demo: Tweak window titles
...
This is an attempt to improve consistency in the sidebar
and the window titles.
2020-11-02 11:11:44 -05:00
Matthias Clasen
14cbd13ef2
gtk-demo: Use typographic style classes
...
We don't need to hardcode <u> in markup anymore.
Use the heading style class instead.
2020-11-02 08:38:20 -05:00
Matthias Clasen
efc314196d
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2769
2020-11-02 11:52:13 +00:00
Matthias Clasen
403a70ca89
testsuite: Add tests for gtk4-builder-tool validate
2020-11-01 23:09:26 -05:00
Matthias Clasen
44b36b6321
builder-tool: Stop rewriting GtkPopoverMenu
...
We no longer allow manual creation of GtkPopoverMenu,
translating individual properties is not going to
change that.
2020-11-01 23:09:26 -05:00
Matthias Clasen
4bd829e3e1
testsuite: Test GtkFixed rewriting
2020-11-01 23:09:26 -05:00
Matthias Clasen
38f74d8a23
builder-tool: Rewrite GtkFixed more
...
GtkFixedLayout does not have layout properties
for x and y, so turn those into a transform.
2020-11-01 23:09:26 -05:00
Matthias Clasen
2613c2ef9b
builder-tool: Avoid duplicate path prefixes
...
It is enough to print the file in which the error
occurred once; GtkBuilder already makes that part
of its error message.
2020-11-01 23:09:26 -05:00
Matthias Clasen
5751cd662d
builder-tool: Install a log writer
...
Install a log writer function that is a bit simpler than
the default GLib log writer, and does not put PIDs and
timestamps in the output, so we can compare easily in
our testsuite.
2020-11-01 23:09:26 -05:00
Matthias Clasen
4039b713c3
Set G_LOG_USE_STRUCTURED globally
...
It doesn't make much sense to set this in per-directory
meson files, since that makes use use different logging
facilities in different parts of the project. Set it
globally.
2020-11-01 21:23:35 -05:00
Matthias Clasen
c3f8010b19
testsuite: Test GtkToolbar rewriting
2020-11-01 21:23:35 -05:00
Matthias Clasen
3e8a22ae8a
builder-tool: Rewrite GtkToolbar more
...
Replace GtkToolbar with GtkBox and GtkToolButton with
GtkButton.
2020-11-01 21:23:35 -05:00
Matthias Clasen
c01f3be6e6
testsuite: Test GtkActionBar rewriting
2020-11-01 21:23:35 -05:00
Matthias Clasen
0cf372c814
testsuite: Test GtkPaned rewriting
2020-11-01 21:23:35 -05:00
Matthias Clasen
ac20c9cd41
builder-tool: Fix rewriting GtkPaned
...
The properties have been renamed in bc6643f3c2
.
2020-11-01 21:23:35 -05:00
Matthias Clasen
d74c2a74e5
builder-tool: Drop unneeded code
...
We are rewriting the tree before simplifying it,
so there is no need to 'keep things for rewriting'
in the simplify phase.
2020-11-01 21:23:35 -05:00
Matthias Clasen
b79637ac41
testsuite: Test GtkOverlay rewriting
2020-11-01 21:23:35 -05:00
Matthias Clasen
e135772119
buildertool: Improve GtkOverlay rewriting
...
Translate the GtkOverlay:pass-through child property to
the GtkWidget:measure property, and drop the :index
child property.
2020-11-01 21:23:35 -05:00
Matthias Clasen
3cf26b471b
Fix the definition of GtkWidget:can-target
...
We are setting the value to TRUE initially, but
the property had a declared default of FALSE.
This is messing up the simplification of .ui files
with gtk4-builder-tool, since it thinks it can
omit can-target properties when it really can't.
2020-11-01 21:23:35 -05:00
Matthias Clasen
c630285692
Cosmetics
2020-11-01 21:23:35 -05:00
Matthias Clasen
5702b71037
Remove leftover file
...
This was never used in tests.
2020-11-01 21:23:35 -05:00
Matthias Clasen
a4e5f5ca50
testsuite: More gtk4-builder-tool tests
2020-11-01 21:23:35 -05:00
Matthias Clasen
b0b00d49d2
testsuite: Test gtk4-builder-tool simplify --replace
...
Run all gtk4-builder-tool test with and without --replace.
This improves test coverage for gtk4-builder-tool
2020-11-01 21:23:35 -05:00
Matthias Clasen
cb018ec047
builder-tool: Avoid a crash
...
Be more careful about types that have been removed.
I was getting criticals when converting ui files
containing GtkToolbars.
2020-11-01 21:23:35 -05:00
Matthias Clasen
168b21c77e
testsuite: Improve coverage for GdkTexture
2020-11-01 21:23:35 -05:00
Matthias Clasen
2dcc641d5a
testsuite: Improve coverage for GdkDisplayManager
2020-11-01 21:23:35 -05:00
Matthias Clasen
c8432ae668
testsuite: Improve coverage for seats
2020-11-01 21:23:35 -05:00
Matthias Clasen
642ad4e06f
testsuite: Improve coverage for rectangles
2020-11-01 21:23:35 -05:00
Tim Sabsch
924796b478
Update German translation
2020-11-01 14:08:13 +00:00
Piotr Drąg
319d4c7e01
Update Polish translation
2020-11-01 10:37:21 +01:00
Matthias Clasen
07c491f235
testsuite: Improve coverage for keys
2020-10-31 14:57:02 -04:00
Matthias Clasen
970f91ec24
testsuite: Add more css parser tests
...
Add tests for url parsing.
2020-10-31 09:18:40 -04:00
Matthias Clasen
48381bd4f6
testsuite: Add a forgotten test
...
I've written this test a while ago, but did not add
it to the test data list in meson.build.
2020-10-31 08:30:02 -04:00
Matthias Clasen
1a12999431
testsuite: Add a css test
...
This test verifies that CDO and CDC are ignored
as required.
2020-10-31 00:38:49 -04:00
Matthias Clasen
90676540ec
css: Fix tokenization of CDO
...
A CDO is 4 characters: <!--, not 3 as our tokenizer
was pretending.
2020-10-31 00:38:49 -04:00
Matthias Clasen
7db58d5f8d
gsk: Don't compile unused code
...
The NodeSample and GskGLImage code is not used,
so don't compile it.
2020-10-30 23:36:39 -04:00
Matthias Clasen
875452b476
testsuite: Improve coverage for GtkMultiSorter
2020-10-30 23:33:34 -04:00
Matthias Clasen
1c4c5e3b80
testsuite: Improve coverage for GtkStringList
2020-10-30 23:33:15 -04:00
Matthias Clasen
af5e13b9a1
Remove an unused function
...
The only property of GtkStringObject is readonly since
commit fb14f50ec1
, so we don't need a
set_property implementation.
2020-10-30 23:32:30 -04:00
Matthias Clasen
9b78bc4af7
testsuite: Improve coverage
2020-10-30 23:04:23 -04:00
Matthias Clasen
1702a4c223
Drop an unused private function
2020-10-30 22:51:54 -04:00
Matthias Clasen
f0e35c8ed8
Drop unused includes
2020-10-30 22:50:38 -04:00
Matthias Clasen
26150d8489
testsuite: Improve coverage for GtkExpression
2020-10-30 22:27:40 -04:00
Matthias Clasen
48dcbf4935
expression: Fix property expressions for interfaces
...
We were not checking the passed-in type in the right
way. An interface type can still pass the
g_type_is_a (..., G_TYPE_OBJECT) check, if G_TYPE_OBJECT
is one of its prerequisites. What we need to check is
whether the fundamental type is G_TYPE_OBJECT.
2020-10-30 22:27:40 -04:00
Matthias Clasen
59dd7d8900
testsuite: Improve coverage for GtkMultiFilter
2020-10-30 22:27:40 -04:00
Matthias Clasen
c279bdaa81
testsuite: Improve coverage for GtkStringFilter
2020-10-30 20:15:25 -04:00
Matthias Clasen
01d52a7292
testsuite: Make all css tests run again
...
The tests in subdirectories of testsuite/css were
using an environment defined in the parent directory,
causing them to not find their test data. Give each
test directory its own environment.
2020-10-30 20:14:17 -04:00
Matthias Clasen
2b38d14bf5
tests: Improve coverage for css data url parsing
...
Cover the error conditions as well.
2020-10-30 19:26:56 -04:00
Matthias Clasen
d35a21873e
testsuite: Improve coverage for GtkBoolFilter
2020-10-30 18:17:50 -04:00
Matthias Clasen
b23cae9643
Drop unused gtk_buildable_set_buildable_property
2020-10-30 17:19:52 -04:00
Matthias Clasen
505df337c2
Add a test for constraints in ui files
...
Test the various values that are possible for the constraint
attributes.
2020-10-30 16:21:14 -04:00
Matthias Clasen
117997da54
Merge branch 'wip/chergert/gdk-macos-gl-renderer' into 'master'
...
macos: add more aggressive clip to transparent subview
See merge request GNOME/gtk!2762
2020-10-30 19:48:57 +00:00
Matthias Clasen
19052d4360
gtk-demo: Tweak descriptions of constraints demos
...
Make these a little longer, and include more details.
2020-10-30 15:26:37 -04:00
Matthias Clasen
2dbaca2464
constraintlayout: Make sure guides get their constraints
...
When using GtkBuilder to create constraints and guides,
the layout manager is already rooted when the guides get
created, and we were forgetting to create the guides
constraints in this case. Fix it by adding a call to
gtk_constraint_guide_update().
This was showing up in the new builder-based constraints
demo as the guide not having the expected effect.
2020-10-30 15:04:13 -04:00
Matthias Clasen
4b8134b19b
constraintlayout: Emit less change notification
...
This isn't strictly required for correctness, but
it makes the GtkBuilder codepath do the same that
the vfl codepath does: call gtk_layout_manager_layout_changed
only once, after all the constraints have been added.
2020-10-30 15:04:13 -04:00
Matthias Clasen
588fe5b5c1
gtk-demo: Tweak the new constraints demo
...
With these somewhat random ordering changes, things get
closer to working the same as the code example. Still,
the guide doesn't work right.
2020-10-30 15:04:13 -04:00
Matthias Clasen
b8f44de48e
constraintlayout: Fix parsing from ui file
...
Guides were not properly looked up when creating
constraints in a ui file.
2020-10-30 15:04:13 -04:00
Matthias Clasen
49bdc4f0c2
Add another constraints demo
...
This one attempts to use constraints in a ui file.
It doesn't work.
2020-10-30 15:04:13 -04:00
Matthias Clasen
a0ee25a21e
gtk-demo: Remove unnecessary code
...
I was distracted by this code that sets names
on widgets in the constraints demo - the names
aren't used and aren't needed, so remove them.
2020-10-30 15:01:50 -04:00
Christian Hergert
d8192013f3
macos: add more aggressive clip to transparent subview
...
The Cairo implementation for the Macos backend uses a toplevel
window with full transparency and a series of NSView to create opaque
regions. This improves compositor performance because it allows the
display server to avoid costly blends.
However, we want to ensure we clip better when exposing the
transparent region so that we only expose the shadows/corners as
necessary.
2020-10-29 19:41:21 -07:00
Matthias Clasen
8ed1f51f7f
Merge branch 'wip/chergert/remove-GDK_WINDOWING_QUARTZ' into 'master'
...
gdk: remove remaining GDK_WINDOWING_QUARTZ usage
See merge request GNOME/gtk!2761
2020-10-30 01:36:10 +00:00
Matthias Clasen
03fec389f4
docs: Add details for gsk_renderer_new_for_surface
...
Mention the GSK_RENDERER variable here.
2020-10-29 18:21:44 -04:00
Matthias Clasen
38c39e2aa1
NEWS: Updates
2020-10-29 18:21:32 -04:00
Christian Hergert
6298fd1eef
gdk: remove remaining GDK_WINDOWING_QUARTZ usage
2020-10-29 13:57:28 -07:00
Matthias Clasen
5a77994516
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2760
2020-10-29 18:55:53 +00:00
Matthias Clasen
6142238237
Merge branch 'wip/chergert/gdk-macos-gl-renderer' into 'master'
...
macos: implement GL rendering on with Cairo renderer
See merge request GNOME/gtk!2759
2020-10-29 18:33:13 +00:00
Matthias Clasen
3164f328b5
docs: Some restructuring
...
Give the GDK docs some more structure.
2020-10-29 14:23:46 -04:00
Matthias Clasen
ce78d0c301
docs: Tweak GdkToplevel docs
2020-10-29 14:23:46 -04:00
Matthias Clasen
94305f248b
docs: Tweak GdkPopup docs
2020-10-29 14:23:46 -04:00
Matthias Clasen
3afd5d7a89
docs: Tweak GdkSurface docs
...
Add more details, and refer to the GdkToplevel / GdkPopup
docs.
2020-10-29 14:23:46 -04:00
Matthias Clasen
d2adbad408
docs: Tweak frame clock docs
2020-10-29 14:23:46 -04:00
Matthias Clasen
2df382277d
docs: Small additions for GdkCursor docs
2020-10-29 14:23:46 -04:00
Matthias Clasen
9f71bdd045
docs: Cosmetics
...
Make the GdkRGBA heading less repetitive.
2020-10-29 14:23:46 -04:00
Matthias Clasen
838d0924b9
docs: Tweak GdkPaintable docs
...
Minor additions here and there.
2020-10-29 14:23:46 -04:00
Matthias Clasen
1f8d593931
docs: Add some detail to GdkTexture docs
...
Minor additions here and there.
2020-10-29 14:23:46 -04:00
Matthias Clasen
574a3a456d
gdk: Drop GdkPoint from the api
...
This typedef was not used in any public APIs, and is
only used in the MacOS backend. It is not worth preserving
as public API, move it to the only user.
2020-10-29 14:23:46 -04:00
Matthias Clasen
3617fbab42
docs: Include GDK_WINDOWING_MACOS
...
We no longer have a Quartz backend, it is called
MacOS now.
2020-10-29 14:23:46 -04:00
Matthias Clasen
29ccd13e15
docs: Stop referring to the Quartz backend
...
Its MacOS now.
2020-10-29 14:23:46 -04:00
Christian Hergert
de9c9efa6f
macos: implement GL context
...
This implements the basics for a GdkGLContext on macOS. Currently, rendering
only is fully working for the GskCairoRenderer case where we read back pixels
into a cairo surface for rendering. More work on synchronization is required for
the GL on GskGLRenderer case.
When we attempt to render a surface itself with GL, the context will ensure that
the new GdkMacosGLView is placed within the NSWindow. In other cases, we
use a dummy NSView and NSWindow for backing the NSOpenGLContext to
ensure that we can get accelerated drawing.
This gets GtkGLArea working when running with GSK_RENDERER=cairo.
2020-10-29 10:57:02 -07:00
Christian Hergert
eb809ba425
macos: tweak gravity while resizing
...
This helps a situation where the window contents has not changed
in time for a drawing. Setting the texture gravity helps that side or
corner to be less jittery while moving.
Ideally, we can get to a point where we are synchronized and keeping
up with drawing fast enough to not need this. That may require some
work to drive frame clocks from drawRect: though.
2020-10-29 10:57:02 -07:00
Christian Hergert
adf60fb3a1
macos: be tolerant of NULL GL context
...
Some code appears to unconditionally attempt to make the context current,
so this makes things tolerant to a NULL GdkGLContext and just return FALSE.
2020-10-29 10:57:02 -07:00
Christian Hergert
a3fd46c516
glsl: tweak pre-processor to support Apple GLSL compiler
...
The Apple GLSL compiler cannot deal with empty pre-processor blocks such as
#if GSK_GLES
#elif GSK_LEGACY
2020-10-29 10:57:02 -07:00
Christian Hergert
0040667965
macos: remove unused GL layer
...
This isn't being used, and instead we'll go the route of a NSView for
the OpenGL implementation.
2020-10-29 10:57:02 -07:00
Christian Hergert
60e67a62e6
macos: move setNeedsDisplay helper to GdkMacosCairoView
...
This isn't needed in the base class, which will eventually get a GL subclass.
2020-10-29 10:57:02 -07:00
Matthias Clasen
931f130377
Merge branch 'wip/chergert/gdk-remove-texture_from_surface' into 'master'
...
gl: remove unused texture_from_surface API
See merge request GNOME/gtk!2756
2020-10-29 15:50:01 +00:00
Christian Hergert
524fbc35a7
gl: remove unused texture_from_surface API
...
This is not used anywhere and only exists within the X11 backend. It
can be removed now.
2020-10-29 08:26:27 -07:00
Matthias Clasen
51d35750f6
Cosmetics
...
Whitespace fix.
2020-10-29 07:40:30 -04:00
Matthias Clasen
90fde9c939
Merge branch 'matthiasc/for-master' into 'master'
...
textview: Update child allocations
See merge request GNOME/gtk!2757
2020-10-29 11:21:30 +00:00
Matthias Clasen
5cbc55578f
textview: Update child allocations
...
This was accidentally lost when display line caching
was introduced.
2020-10-28 20:18:54 -04:00
Piotr Drąg
f90e7b9c56
Update POTFILES.skip
2020-10-28 15:12:01 +01:00
Matthias Clasen
d5b9489408
Merge branch 'wip/baedert/for-master' into 'master'
...
Wip/baedert/for master
Closes #3282
See merge request GNOME/gtk!2755
2020-10-27 22:38:58 +00:00
Matthias Clasen
975d763db1
Merge branch 'dropdown-checkmark' into 'master'
...
Dropdown checkmark
Closes #3291
See merge request GNOME/gtk!2754
2020-10-27 20:41:34 +00:00
Matthias Clasen
907fc30fac
gtk-demo: Add checkmarks to all dropdown demos
...
This follows the mockups that these demos are
copied from. Unfortunately, it has to be implemented
for every item factory, so we repeat it here.
Fixes : #3291
2020-10-27 16:13:44 -04:00
Matthias Clasen
25d2efeabe
dropdown: Add a checkmark to the selected item
...
Make the default factory add a checkmark to the
currently selected item (not the hovered item)
in the popup. This will unfortunately have to be
done in non-default factories too.
Related: #3291
2020-10-27 16:13:38 -04:00
Matthias Clasen
3a119a3d3a
dropdown: Make search entry shrink
...
We don't want the popup to be wider than the button
if we can help it. The search entry does not need
to be very wide.
2020-10-27 15:35:34 -04:00
Matthias Clasen
8df883ed71
Merge branch 'matthiasc/atspi-child' into 'master'
...
Emit ChildrenChanged signal on hierarchy updates
See merge request GNOME/gtk!2752
2020-10-27 18:24:43 +00:00
Matthias Clasen
0c49f7349d
Merge branch 'matthiasc/a11y-buildable' into 'master'
...
Implement accessible attributes for ui files
See merge request GNOME/gtk!2751
2020-10-27 18:13:44 +00:00
Luca Bacci
eef1097c90
GdkW32: remove klassTEMPSHADOW
...
Fixes issue #2019
2020-10-27 18:26:45 +01:00
Benjamin Otte
08004d4eed
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
Closes #3295
See merge request GNOME/gtk!2748
2020-10-27 16:27:10 +00:00
Benjamin Otte
6d7e56bed6
cloudprint: Make compile without warnings
2020-10-27 16:43:34 +01:00
Benjamin Otte
8e6701c9a6
gtkmediafile: Use cubic volume function
...
Gstreamer suggests doing that.
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1439
Fixes #3295
2020-10-27 16:32:53 +01:00
Jakub Steiner
6d5c512571
Merge branch 'wip/jimmac/gtk4-dropdown-papercuts' into 'master'
...
Adwaita: dropdown search box
See merge request GNOME/gtk!2747
2020-10-27 12:55:33 +00:00
Jakub Steiner
b94ea1b4f7
Adwaita: dropdown search box
...
- have some whitespace around entry
Partial fix for https://gitlab.gnome.org/GNOME/gtk/-/issues/3291
2020-10-27 13:32:04 +01:00
Matthias Clasen
b2d6011679
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2746
2020-10-27 05:05:33 +00:00
Matthias Clasen
c0aa1c8a49
Merge branch 'popover-menu-custom-child' into 'master'
...
popovermenu: Allow custom items
Closes #3260
See merge request GNOME/gtk!2728
2020-10-27 04:51:00 +00:00
Matthias Clasen
5fe837483c
docs: Add GtkOverlay to the widget gallery
2020-10-27 00:42:38 -04:00
Matthias Clasen
4f15b988e7
docs: Add box, grid and center box to the gallery
2020-10-27 00:24:54 -04:00
Matthias Clasen
6cd3bc7384
modelbutton: Explicitly set up LABELLED-By relation
...
GTK does this automatically based on mnemonics, but only
if the string actually contains a mnemonic. This makes
orca read out menuitems, as expected.
2020-10-26 22:48:01 -04:00
Matthias Clasen
0faadef36f
widget-factory: Add a scale to the gear menu
...
This tests the custom menuitem support, and lets you
control the transition duration for the main stack.
2020-10-26 22:43:12 -04:00
Matthias Clasen
af6c3017fb
popovermenu: Allow adding custom items in ui files
...
Support <child type="ID"> to fill custom child slots
in both GtkPopoverMenus and GtkPopoverMenuBars that
are created in ui files.
2020-10-26 22:42:28 -04:00
Matthias Clasen
8157abe591
popovermenu: Allow custom items
...
Add a way to add children at certain places in
the generated menu for both GtkPopoverMenu and
GtkPopoverMenuBar.
New apis:
gtk_popover_menu_add_child
gtk_popover_menu_remove_child
gtk_popover_menu_bar_add_child
gtk_popover_menu_bar_remove_child
Fixes : #3260
2020-10-26 22:41:33 -04:00
Matthias Clasen
61e08baec1
Merge branch 'master' into 'master'
...
Fix the build with cups < 2.2.12
Closes #2968
See merge request GNOME/gtk!2744
2020-10-26 20:09:30 +00:00
Thomas Lange
0493e89897
Fix the build with cups < 2.2.12
...
PPD_CUSTOM_UNKNOWN was introduced in cups 2.3.
and has been backported to 2.2.12.
Only handle it when we build against a new enough cups.
Fixes : #2968
2020-10-26 19:16:26 +01:00
Matthias Clasen
c783e9aa5f
Treat tristate as an enum when parsing
...
This makes it so that you have to explicitly specify
"true" and "false" for the checked state, but it
matches how this enumeration is meant to be used.
2020-10-26 08:01:13 -04:00
Matthias Clasen
4661f15fab
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2741
2020-10-26 05:28:43 +00:00
Matthias Clasen
e51a98d184
docs: Add GtkDrawingArea to the gallery
2020-10-26 01:08:49 -04:00
Matthias Clasen
b67eee5741
docs: Add GtkShortcutsWindow to the widget gallery
2020-10-26 01:08:49 -04:00
Matthias Clasen
d9259fc958
docs: Add GtkPopoverMenu to the widget gallery
2020-10-26 01:08:49 -04:00
Matthias Clasen
65f748fc62
docs: Add GtkPopover to the widget gallery
2020-10-26 01:08:49 -04:00
Matthias Clasen
bed3616bf0
docs: Add GtkPopoverMenuBar to the gallery
2020-10-26 01:08:49 -04:00
Matthias Clasen
1605ca0140
docs: Add GtkExpander to the gallery
2020-10-26 01:08:49 -04:00
Matthias Clasen
8692f5d8e3
docs: Add GtkEmojiChooser to the gallery
...
To make this possible enable the doc shooter
to take screenshots of popovers.
2020-10-26 01:08:49 -04:00
Matthias Clasen
42e2c54922
docs: Redo the GtkColorChooserDialog gallery image
...
Show the new palette.
2020-10-25 22:54:53 -04:00
Matthias Clasen
291c61891a
docs: Improve the GtkStackSidebar gallery image
2020-10-25 22:54:41 -04:00
Matthias Clasen
59e08c0dac
docs: Tweak gallery layout
...
Now that the volume button image is small, move it
to a better place in its section. Improves the layout.
2020-10-25 22:46:30 -04:00
Matthias Clasen
a70c9c69a0
docs: Fix the GtkVolumeButton gallery image
...
Give up on showing the popup, we don't do that
for other buttons either.
2020-10-25 22:42:40 -04:00
Matthias Clasen
dffe6b87e4
docs: Add GtkCalendar to the gallery
...
It has been missing far too long.
2020-10-25 22:32:27 -04:00
Matthias Clasen
28b7962bee
docs: Improve the GtkMediaControls gallery image
2020-10-25 22:26:19 -04:00
Matthias Clasen
64e131f285
docs: Improve the GtkVideo gallery image
2020-10-25 22:17:15 -04:00
Matthias Clasen
a9f0f18c3a
docs: Tweak gallery layout
...
Improve the breaks in the container section.
2020-10-25 22:16:26 -04:00
Matthias Clasen
2e0822bed0
docs: Shrink the editable label gallery image
...
Makes it fit better with the other entries.
2020-10-25 21:52:51 -04:00
Matthias Clasen
b0fb31fc96
docs: Some reordering in the gallery
...
Align things better.
2020-10-25 21:47:40 -04:00
Matthias Clasen
163d32eea1
docs: Work around GtkPicture growing
...
Make the GtkPicture gallery image stay within its
limits, by overpowering its request mode.
2020-10-25 21:30:15 -04:00
Matthias Clasen
b7728a884b
docs: Tweak gallery ordering
...
Move GtkSpinButton to the entries, where it
belongs, despite its name.
2020-10-25 21:10:12 -04:00
Matthias Clasen
86b4b2eef2
docs: Fix links from the gallery
...
It turns out gtk-doc can't even parse its own custom
links if you don't arrange for the <link> element to
on a single line, since it is just a glorified sed
script :(
2020-10-25 21:07:12 -04:00
Matthias Clasen
09eda804f7
docs: Add GtkWindowControls to the gallery
2020-10-25 21:06:46 -04:00
Matthias Clasen
37d4932b31
a11y: Add more tests
...
Test some of the attributes that GTK maintains
for every widget.
2020-10-25 19:29:00 -04:00
Matthias Clasen
0fddf73ddb
a11y: Add some parser tests
...
Checking basic support for acessible states, properties
and relations in ui files.
2020-10-25 13:01:44 -04:00
Matthias Clasen
f981ab7a9e
Remove erroneous preconditions
...
Tests found these functions to be non-working.
2020-10-25 12:43:52 -04:00
Matthias Clasen
677ea5f22d
a11y: Reuse builder parsing for enums
...
No need to manually write all these parsing functions
when _gtk_builder_enum_from_string does exactly what
is needed here.
2020-10-25 12:38:52 -04:00
Matthias Clasen
fce455ae0b
a11y: Parse booleans in ui files as expected
...
Accept the same syntax for booleans as GtkBuilder
does elsewhere.
2020-10-25 12:20:55 -04:00
Matthias Clasen
e050a2661c
builder: Expot _gtk_builder_boolean_from_string privately
...
When specifying accessible properties in ui files, it
is better to accept the same syntax for booleans as
elsewhere, so lets reuse this function.
2020-10-25 12:19:21 -04:00
Piotr Drąg
a03581ce39
Update Polish translation
2020-10-25 10:37:47 +01:00
Matthias Clasen
13b9b9b7d8
scale: Set round-digits to -1 initially
...
This ensures that keybindings for small-step changes
work despite draw-value being FALSE now. This was
fallout from 8ca612c966
that showed up
as arrow keys not working anymore for the color scales
in the color chooser.
2020-10-25 00:31:18 -04:00
Matthias Clasen
0a3b370805
Cosmetics
...
Remove some comments that refer to no longer
existing menu code.
2020-10-25 00:31:18 -04:00
Matthias Clasen
313ba0280a
color editor: Add accessible labels
...
Add some labels to the controls in this dialog.
2020-10-24 23:55:56 -04:00
Matthias Clasen
adb7676fc1
a11y: More State<>Change confusion
...
We should really avoid this needless duplication
- the 'state' is never stored anywhere.
2020-10-24 23:12:36 -04:00
Matthias Clasen
8ffb398517
a11y: Handle all cases for state change
...
Make state_change handle state changes for non-widgets,
and handle the cases for HIDDEN involving stack pages.
2020-10-24 22:05:17 -04:00
Matthias Clasen
9a943e21d3
stack: Update HIDDEN a11y state for stack pages
...
This will let us handle additions and removals
in the AT-SPI backend.
2020-10-24 22:04:26 -04:00
Matthias Clasen
7c106578ed
Cosmetics
...
Make gtk_at_spi_root_child_changed take a
GtkAccessible for the child.
2020-10-24 21:35:35 -04:00
Matthias Clasen
d1d9b92aee
Merge branch 'meson-deps-continued' into 'master'
...
Turn more options into "feature"
See merge request GNOME/gtk!2708
2020-10-25 01:10:01 +00:00
Matthias Clasen
434b145ee0
stack: Don't transition when the visible child is remove
...
This is a corner-case, and it is causing crashes in
the shortcuts window, after a11ab6c995
.
2020-10-24 20:54:55 -04:00
Matthias Clasen
2546b88661
a11y: Redo child-added/-removed for toplevels
...
Instead of monitoring the list of toplevels, rely
on GtkWindow updating the HIDDEN state before windows
get removed. This is better, since we still have the
object available when it happens, so we can pass it
to the ATs.
2020-10-24 15:26:12 -04:00
Matthias Clasen
bba6d604f0
window: Maintain accessible HIDDEN state
...
We want to use the HIDDEN state to control when
things get added and removed from the accessible
tree, so ensure that we a) set HIDDEN to true
initially for windows, and b) we update HIDDEN
when a window is shown or hidden.
The second part is handled by gtk_widget_hide
for other widgets, but hiding a window does not
always go through that code path.
2020-10-24 15:25:03 -04:00
Matthias Clasen
274f9ad919
a11y: Emit child notification when toplevels get hidden
...
When a toplevel window gets hidden (and not destroyed),
the frontend code set the HIDDEN state, and we need to
emit child notification when that happens.
2020-10-24 13:17:20 -04:00
Matthias Clasen
89a8c89663
a11y: Improve child index helpers
...
We need to use gtk_accessible_should_present() whenever we
calculate accessible tree positions, to avoid inconsistencies.
While we are at it, make these helpers usable for finding
the position of accesibles that are now ignored, by not
looking at should_present for the object itself. This will
be relevant when we calculate the position of objects whose
HIDDEN state changes.
2020-10-24 13:14:44 -04:00
Matthias Clasen
e7b290debb
a11y: Improve child notification for toplevels
...
We need to translate the list model position into
an accessible tree position, since hidden toplevels
will be skipped.
While we are at it, add an api for this notification
that will be used in the next commit.
2020-10-24 13:13:07 -04:00
Matthias Clasen
46e754a17d
a11y: Skip non-presented children when required
...
Whenever we determine the index of a child, we need
to skip its non-presented siblings.
2020-10-24 11:22:09 -04:00
Matthias Clasen
b12992c1cb
a11y: Handle HIDDEN state changes
...
Hidden elements are not presented in the accessible
tree, so when then HIDDEN state changes, we should
emit child-added or -removed signals.
This commit does not yet handle all cases (HIDDEN
toplevels or hidden stack pages are not handled),
but it should cover the common case.
2020-10-24 11:17:56 -04:00
Matthias Clasen
374a451eeb
a11y: Don't present HIDDEN accessibles
...
The ARIA spec is clear on this: when an element has the
HIDDEN state, it should not be presented in the accessible
tree.
This change is incomplete, we also need to emit child-added/
removed signals when the state changes, but that needs to
wait for the child added infrastructure to land.
2020-10-24 11:17:56 -04:00
Matthias Clasen
1e13acb206
widget: Don't add reordered children
...
gtk_widget_reposition_after is called both to add new children,
and to reposition existing children. We only want to emit
accessible changes in the former case (since AT-SPI doesn't
have events for reordering).
2020-10-24 11:17:56 -04:00
Matthias Clasen
5b2b2feb9f
a11y: Fix up state / change enum confusion
2020-10-24 11:17:56 -04:00
Matthias Clasen
77af993181
Merge branch 'flush-events' into 'master'
...
Flush events
See merge request GNOME/gtk!2740
2020-10-24 12:53:01 +00:00
Matthias Clasen
c5ed5c5ff9
gdk: Deliver queued events on flush
...
The current code was marking queued events as flushed,
but left them in the queue. That doesn't make sense to
me - we should deliver all events we have before we
reach the paint phase of the frame cycle.
2020-10-23 17:03:00 -04:00
Matthias Clasen
6b53a55dd7
NEWS: Updates
2020-10-23 15:07:25 -04:00
Matthias Clasen
83fbdcd5e6
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3226
See merge request GNOME/gtk!2739
2020-10-23 17:25:33 +00:00
Matthias Clasen
cb8bf6540c
editablelabel: Properly clean up in dispose
...
Unparenting the stack finalizes the entry and label,
but at least the label is available via the
gtk_editable_get_delegate API, and the a11y
implementation uses that at dispose time. So, clear
the pointers to prevent them from being dangling.
This was showing up as a segfault of the doc-shooter.
2020-10-23 12:27:55 -04:00
Matthias Clasen
fdb1fa4d08
Give all search entries an icon
...
This was first requested for the search entry in
GtkDropDown, but it is better to be consistent and
give every search entry an icon.
Related: #3291
2020-10-23 12:19:31 -04:00
Matthias Clasen
10d7ccc8e0
window: Fix state updates
...
When the compositor unmaximized the window, we get a
state-changed signal, and we update the maximized field.
But then we go and recompute our layout based on the
maximize_initially field, and that is still TRUE, when
we were maximized initially. So we need to update both
fields.
This fixes a problem where using the window menu to
unmaximize an initially maximized window would not
work.
Fixes : #3226
2020-10-23 11:51:02 -04:00
Matthias Clasen
b973f7f375
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2737
2020-10-23 01:45:22 +00:00
Matthias Clasen
7671c1074b
Tweak focus tests
...
These tests are a bit fragile because the initial focus
that is taken depends on what ends up in the center of
the window, horizontally or vertically, which depends
on things like fonts, or theme spacing.
This commit makes some tweaks to push things in the
widget-factory example around far enough to make the
tests work again.
We should figure out a way to make this more robust.
2020-10-22 21:18:46 -04:00
Matthias Clasen
6ce2e19bbe
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
See merge request GNOME/gtk!2735
2020-10-22 22:53:34 +00:00
Matthias Clasen
3a08706e40
dropdown: Add an icon the search entry
...
A small detail for #3291 .
2020-10-22 14:33:41 -04:00
Matthias Clasen
e5722fe9d2
passwordentry: Respect border spacing
...
We are not using a box layout here since we want
to ignore the icons for measuring. But we still
want the layout to respect border spacing that
comes from the theme.
2020-10-22 14:27:19 -04:00
Matthias Clasen
700f957d9a
Adwaita: Set border-spacing for entries
...
When our entries contain icons, they should not run
directly into the text, so put some spacing between
the children of entries.
2020-10-22 14:26:21 -04:00
Timm Bäder
9109dee072
gl renderer: Don't use blur node bounds
...
The blur node bounds are different/larger than the ones we use. This
made the textures get stretched to the blur node bounds.
Fixes #3282
2020-10-22 17:46:34 +02:00
Timm Bäder
b6a843a05b
gl renderer: Fix two scale_x/y mixups
2020-10-22 17:46:34 +02:00
Timm Bäder
ff1fb4f10d
text: Remove empty root() implementation
2020-10-22 17:46:34 +02:00
Timm Bäder
1bf79a4dae
text: Fix a documentation mishap
2020-10-22 17:46:34 +02:00
Timm Bäder
85d4b86545
text: Fold focus_{in,out} into only caller
2020-10-22 17:46:34 +02:00
Timm Bäder
98e88b7b53
text: Avoid a crash
...
Calculate the "was previous focus in a child widget" condition before
chaining up into grab_focus, to a void that unreffing the prev_focus
widget.
2020-10-22 17:46:34 +02:00
Timm Bäder
85702f8f5d
dnd demo: Make the transform code a bit more idiomatic
2020-10-22 17:46:34 +02:00
Timm Bäder
d97cb851f1
textview: Remove a broken debug output statement
...
redraw_rect does not exist.
2020-10-22 17:46:34 +02:00
Timm Bäder
6dcdb4a601
atspitextbuffer: Explicitly cast between pango and gtk enums
2020-10-22 17:46:34 +02:00
Timm Bäder
41ef1d87ef
atspicontext: Add a few missing break statements
2020-10-22 17:46:34 +02:00
Timm Bäder
44728d09a9
stack: assert for some assumptions
2020-10-22 17:46:34 +02:00
Timm Bäder
b1664534af
gdksurface: Ensure some assumptions
...
Just to please scan-build
2020-10-22 17:46:34 +02:00
Timm Bäder
56e89e8d26
demos: Remove a dead assignment
2020-10-22 17:46:34 +02:00
Timm Bäder
f6ebc06767
filechooserwidget: Avoid an uninitialized value
...
If the operation mode is OPERATION_MODE_RECENT and we end up in the
'goto file_entry' case, we don't set info.result. Then later after
calling check_save_entry, is_empty is TRUE which causes a goto out and
here we then try to use info.result, which is uninitialized.
Initialize info.result before doing all this.
Found by scan-build
2020-10-22 17:46:33 +02:00
Timm Bäder
3db5e15bde
filechooserwidget: gtk_widget_get_root() can return NULL
2020-10-22 17:46:33 +02:00
Timm Bäder
a2291fb989
showrendernode: Pass error to deserialize()
2020-10-22 17:46:33 +02:00
Timm Bäder
af97f19926
textview: Respect return value of get_text_surface_coords()
2020-10-22 17:46:33 +02:00
Timm Bäder
0dae1f48fd
listbox test: Only compare values for rows we have
...
This shouldn't happen, but don't compare 100 values if we didnt' get 100
values from the listbox.
2020-10-22 17:46:33 +02:00
Timm Bäder
c7dbb8ef91
label: Plug a potential memory leak
...
This only happens in error cases so pretty insignificant.
Found by scan-build
2020-10-22 17:46:33 +02:00
Timm Bäder
3a1e019e83
print-editor: Fix a wrong comparison
...
If error is NULL, replacing the file contents worked and we don't
show the error dialog. The previous version pretty explicitly
dereferenced a NULL pointer by first ensuring that error is NULL and
then accessing error->message.
Found by scan-build
2020-10-22 17:46:33 +02:00
Matthias Clasen
a923be95b3
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2736
2020-10-22 14:52:57 +00:00
Matthias Clasen
a11ab6c995
a11y: Handle stack case for addition/removal
...
Since we interpose stack pages as non-widget accessibles,
we need to tweak the signals we emit when their corresponding
widgets get added or removed.
2020-10-22 10:06:06 -04:00
Matthias Clasen
1d802881eb
stack: Change ordering for removal
...
Unparent the child widget before tearing down its
stack page. This is necessary so a11y can still access
the stack page accessible to emit change notification
when it learns that the child is removed.
2020-10-22 10:05:17 -04:00
Emmanuele Bassi
6c796cf201
docs: Fix cross-linking for GIO types
2020-10-22 13:33:49 +01:00
Matthias Clasen
44c6619660
gtk-demo: Speed up image demo
...
The progressive loading demo here was so slow as to appear
broken. Make it faster, and ensure that it updates regularly.
2020-10-22 07:51:44 -04:00
Matthias Clasen
ef7499a31b
gtk-demo: Add alternative text to a GtkPicture
...
This lets us text GtkPicture a11y support.
2020-10-22 07:51:44 -04:00
Matthias Clasen
ed571ae68a
picture: Set alternative text as description
...
Use the alternative text as accessible description
for GtkPicture.
2020-10-22 07:51:44 -04:00
Matthias Clasen
e2b3cbac23
colorbutton: Improve accessibility
...
Make the swatch not appear selectable, and
set an accessible label on it.
2020-10-22 07:51:44 -04:00
Matthias Clasen
ba290eb9b0
a11y: Add actions for color swatches
...
Add the same actions that we exported in GTK 3.
2020-10-21 23:36:22 -04:00
Matthias Clasen
3805e1d507
colorswatch: Export some functions for a11y
...
Make simple functions to activate, select or customize
a GtkColorSwatch. These will be exported by a11y as
actions.
2020-10-21 23:36:22 -04:00
Matthias Clasen
daf3b3a3b4
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2734
2020-10-22 02:52:46 +00:00
Matthias Clasen
800eb76a2d
linkbutton: Use the LINK role
...
It is a bit ambiguous, but I think link buttons are
more links than buttons. See WAI-ARIA for a discussion
of the differences.
Update tests to match.
2020-10-21 22:19:54 -04:00
Matthias Clasen
bcbc6159f4
a11y: Document abstract roles
...
Since we mention abstract roles in the documentation
for GtkAccessibleRole, we should say what roles are
abstract. Doing this shows that we actually use two
abstract roles heavily, ourselves: WIDGET and WINDOW.
2020-10-21 21:47:14 -04:00
Matthias Clasen
5f8c6d2287
a11y: Document roles used in menu
2020-10-21 21:40:19 -04:00
Matthias Clasen
88eb3a9c34
atspi: Give model buttons a click action too
...
GtkModelButton is no longer derived from GtkButton,
but can still treat it like a button for the purposes
of having a click action. This lets ATs activate
menu items again.
2020-10-21 21:27:38 -04:00
Matthias Clasen
3e43dda9d4
modelbutton: Recreate our AT context
...
When the button role changes, we want to update the
accessible role to match. Since accessible roles are
unchangeable post-creation of the AT context, we have
to cheat a bit and recreate the whole context.
2020-10-21 21:27:38 -04:00
Matthias Clasen
f96a1cfadd
modelbutton: Initial accessibility setup
...
Set the accessible role to GTK_ACCESSIBLE_ROLE_MENU_ITEM.
This is incomplete, we need to recreate the context when
the buttons role changes, and there are other things that
need to be set.
2020-10-21 21:27:38 -04:00
Matthias Clasen
758bcd5343
popovermenubar: Initial accessibility setup
...
Set roles, properties and relations according to the
ARIA authoring practices document. This is not quite
complete.
2020-10-21 21:27:38 -04:00
Matthias Clasen
2bfd4196fb
popovermenu: Initial accessibility setup
...
Set roles, properties and relations according to the
ARIA authoring practices document.
2020-10-21 21:27:38 -04:00
Xavier Claessens
1b7a99cb24
Apply 1 suggestion(s) to 1 file(s)
2020-10-22 00:36:23 +00:00
Matthias Clasen
087c0078ca
menubutton: initial accessibility setup
...
Set roles, properties and relations according to the
ARIA authoring practices document.
2020-10-21 19:47:48 -04:00
Matthias Clasen
b9ae54c951
separator: Remove unnecessary code
...
gtk_widget_update_orientation already sets the
accessible property, no need to do it again.
2020-10-21 19:47:48 -04:00
Emmanuele Bassi
7ac6e25ffc
Use GtkApplication in the examples
...
Some people read the "Getting Started" section as a series of
incremental lessons, and having the examples go from GtkApplication to
the old style "init / spin the main loop" confuses them.
We should be using GtkApplication everywhere in our examples.
2020-10-21 22:44:53 +01:00
Matthias Clasen
d3089ebbc2
progressbar: Hide internal structure from a11y
...
According to section 7.1 of WAI-ARIA, the progressbar role
has the "Children presentational" characteristic, which
indicates that children should not be represented in
the a11y tree.
2020-10-21 15:09:55 -04:00
Matthias Clasen
14a64c7372
levelbar: Hide internal structure from a11y
...
According to section 7.1 of WAI-ARIA, the meter role
has the "Children presentational" characteristic, which
indicates that children should not be represented in
the a11y tree.
2020-10-21 15:04:34 -04:00
Matthias Clasen
ca9b06878d
switch: Hide internal structure from a11y
...
According to section 7.1 of WAI-ARIA, the switch role
has the "Children presentational" characteristic, which
indicates that children should not be represented in
the a11y tree.
2020-10-21 14:55:13 -04:00
Matthias Clasen
8f100269ad
scale: Hide internal structure from a11y
...
According to section 7.1 of WAI-ARIA, the slider role
has the "Children presentational" characteristic, which
indicates that children should not be represented in
the a11y tree, which makes sense, since these are all
just internal gizmos.
2020-10-21 14:53:17 -04:00
Matthias Clasen
48bb9200d9
a11y: Treat PRESENTATION like NONE
...
This is what ARIA tells us to do. NONE is just another
name for PRESENTATION.
2020-10-21 14:40:34 -04:00
Matthias Clasen
d7794bf608
docs: Add some more to the migration guide
...
Expand the section on life-cycle handling with some
more details.
2020-10-21 14:30:17 -04:00
Matthias Clasen
3151906157
docs: Small corrections to the a11y overview
...
The section titles were mixed up wrt to the content
of the sections.
2020-10-21 14:23:10 -04:00
Matthias Clasen
6153efd02a
Document GTK_ACCESSIBLE_ROLE_NONE
...
We use it for a specific purpose now, so document it.
2020-10-21 14:21:12 -04:00
Matthias Clasen
b5b8f42a0c
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3285
See merge request GNOME/gtk!2733
2020-10-21 18:09:42 +00:00
Matthias Clasen
043ffd38bc
text: React to text attribute changes in css
...
Recompute the layout when the css style change
affects text attributes. This matches what we do
in GtkLabel, and without this, changing the
font-features-setting css property in the Inspector
does not have immediate effect.
2020-10-21 13:46:58 -04:00
Carlos Garnacho
32b826e312
Merge branch 'wip/exalm/swipe4' into 'master'
...
gestureswipe: Count last event when calculating velocity
See merge request GNOME/gtk!2715
2020-10-21 16:20:58 +00:00
Alexander Mikhaylenko
700ca3b946
gestureswipe: Count last event when calculating velocity
...
The last event, matching lifting the finger/releasing the mouse button,
is important when there's a large delay between it and the previous events,
as in when performing a movement, stopping, then releasing fingers as
opposed to doing a swipe.
If this event is skipped, doing this will result in kinetic deceleration
matching the previous finger movement, while the expected behavior would
be no deceleration.
See also 5dc6194b98
for a similar fix in
GtkEventControllerScroll.
2020-10-21 20:59:15 +05:00
Emmanuele Bassi
e45dd771db
a11y: Emit ChildrenChanged for toplevel list changes
...
GtkAtSpiRoot is not a context, which means it needs to emit
ChildrenChanged events by itself whenever a toplevel is added to, or
removed from, the list of toplevels.
2020-10-21 15:37:57 +01:00
Emmanuele Bassi
698cbee1fb
a11y: Move ChildrenChanged emitter to ATSPI utilities
...
We are going to use it from GtkAtSpiRoot, which is not a
GtkAtSpiContext.
2020-10-21 15:18:23 +01:00
Emmanuele Bassi
80756322cd
a11y: Handle relations in UI files
...
A bit hacky: we skip parsing values that have a reference or
reference-list type, but we do not error out. Instead, we return a NULL
value, which we catch in the GtkBuildable interface implementation to
get the actual object, and construct a reference list value.
There's still some ickyness around the value type that can only be
solved by having an attribute and role taxonomy.
2020-10-21 14:48:49 +01:00
Emmanuele Bassi
f1e14c4858
a11y: Implement ChildrenChanged atspi.Event
2020-10-21 14:33:20 +01:00
Emmanuele Bassi
8d46bd1d7c
a11y: Notify of changes in the children list
2020-10-21 14:04:49 +01:00
Emmanuele Bassi
fbb08a30e2
a11y: Add child state change to GtkATContext
...
And the required private API in GtkAccessible to notify AT contexts of
changes in the children list.
2020-10-21 14:04:49 +01:00
Matthias Clasen
81371e7c79
columnview: Put overshoot underneath the headers
...
This matches what we do in GtkTreeView.
Fixes : #3285
2020-10-21 08:39:50 -04:00
Emmanuele Bassi
7702670d86
docs: Document the "accessibility" custom tag
2020-10-21 13:33:37 +01:00
Emmanuele Bassi
9e4316bf96
a11y: Add an "accessibility" section to the builder XML tree
...
Accessible attributes are not GObject properties. This means that we
need a custom parser for setting attributes in our UI description files.
The new section is defined as a sub-tree with the `<accessibility>`
element at its root, and elements for each type of accessible
attributes, i.e. properties, relations, and states:
```xml
<object class="..." id="...">
<accessibility>
<property name="label">The accessible label</property>
<state name="pressed">false</state>
<relation name="labelled-by">label1</relation>
</accessibility>
</object>
```
The name of the attribute is the enumeration value; the value is defined
by the WAI-ARIA specification.
2020-10-21 13:33:37 +01:00
Emmanuele Bassi
4ea2a6628f
a11y: Add parsing code for accessible values
...
We need to be able to go from a string representation of an accessible
value to its GtkAccessibleValue instance.
2020-10-21 13:33:37 +01:00
Matthias Clasen
39dfdac771
range: Hide internals from accessibility
...
The nameless, faceless gizmos inside a range do not
contribute to the accessible experience at all, lets
not add them to the tree. All the accessible functionality
is on the main widget (either a scale or a scrollbar).
2020-10-21 08:01:25 -04:00
Matthias Clasen
b7fa00e22d
Cosmetics
2020-10-21 08:01:25 -04:00
Matthias Clasen
3df0a333ad
frame: Set up accessible relations
...
Mark the child as labelled-by the label.
2020-10-21 08:01:25 -04:00
Matthias Clasen
8880e3bd2e
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2729
2020-10-21 11:43:58 +00:00
Timm Bäder
0b5b908a74
Merge branch 'wip/exalm/nullable' into 'master'
...
widget: Add missing (nullable) on binding functions
See merge request GNOME/gtk!2730
2020-10-21 08:17:45 +00:00
Alexander Mikhaylenko
31a072497d
widget: Add missing (nullable) on binding functions
...
Even though they are marked as (skip), they are used in Vala and have wrong
types there atm.
2020-10-21 12:27:51 +05:00
Matthias Clasen
cbb6828657
docs: Document more accessible roles
...
Document that GtkText is skipped in accessibility.
2020-10-20 23:19:30 -04:00
Matthias Clasen
8e170217a1
Cosmetics
...
Typo fix.
2020-10-20 23:19:18 -04:00
Matthias Clasen
36d4a8090f
docs: Document more accessible roles
...
GtkColumnView and its various components use a lot
of accessible roles.
2020-10-20 23:09:11 -04:00
Matthias Clasen
341244203f
docs: Document more accessible roles
...
GtkListView and GtkGridView were missing this as well.
2020-10-20 22:53:30 -04:00
Matthias Clasen
2023914186
docs: Document accessible roles of some classes
...
GtkListBox and GtkFlowBox were missing this.
2020-10-20 22:51:11 -04:00
Matthias Clasen
ef9ec43469
a11y: Add some more tests
2020-10-20 22:44:24 -04:00
Matthias Clasen
67411701c6
inspector: Show accessible object path
...
Show the object path of the object on the a11y bus,
this is can be useful information. While we are here,
make sure that the Inspector does not throw criticals
when used with GTK_NO_A11Y=1.
2020-10-20 21:56:54 -04:00
Matthias Clasen
e20a3339bf
atsi: Fix emission of text selection changes
...
We were not emitting text-selection-changed and
text-caret-moved as expected.
2020-10-20 21:31:23 -04:00
Matthias Clasen
a8baee342c
a11y: Fix handling of LABELLED_BY relation
...
There were several places where we were confusing
GList and GSList and list->data and list->next, causing
a crash in the accessible name computation for buttons
with mnemonic labels.
2020-10-20 21:27:39 -04:00
Matthias Clasen
6a1cb3304b
docs: Mention subclassing and destroy in the migration guide
...
Mention changes regarding subclassing and life-cycle
handling in the migration guide.
2020-10-20 18:26:38 -04:00
Benjamin Otte
45400fe381
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
Closes #3280
See merge request GNOME/gtk!2725
2020-10-20 14:05:49 +00:00
Matthias Clasen
5504278b78
Merge branch 'matthiasc/for-master' into 'master'
...
Some more a11y tests
See merge request GNOME/gtk!2726
2020-10-20 05:57:45 +00:00
Matthias Clasen
93481e6c2e
a11y: Add tests for GtkFlowBox
...
Test that roles, states and properties are as expected.
2020-10-20 01:12:20 -04:00
Matthias Clasen
b9e9898212
a11y: Add tests for GtkListBox
...
Test that roles, states and properties are as expected.
2020-10-20 01:07:13 -04:00
Matthias Clasen
7c47b6907b
a11y: Add tests for GtkStack and GtkStackSwitcher
...
Test that the roles, states and relations are
as expected.
2020-10-20 00:46:07 -04:00
Matthias Clasen
b10d5ec8ff
a11y: Add a test for label properties
...
Now that we set the label property, we should test it too.
2020-10-20 00:25:39 -04:00
Benjamin Otte
8dad615f04
gtk: Remove unused header include
...
gtkcssnodeprivate.h was mainly used for repositioning CSS nodes in
gadgets, and gadgets are gone now.
2020-10-20 04:50:12 +02:00
Benjamin Otte
23e086089d
entry: Keep widget order
...
... instead of just ordering the CSS nodes.
2020-10-20 04:50:12 +02:00
Benjamin Otte
9317a9f35c
flowbox: Keep widget order
...
... instead of just ordering the CSS nodes.
2020-10-20 04:50:12 +02:00
Benjamin Otte
22100089c3
listbox: Reorder the widgets when sorting
...
... instead of just reordering the CSS nodes.
2020-10-20 04:50:12 +02:00
Benjamin Otte
074d54ef5a
listitemwidget: Remove unnecessary code
...
gtk_widget_insert_after() reorders CSS nodes properly.
2020-10-20 04:50:12 +02:00
Benjamin Otte
ddd1b0958d
notebook: Remove unnecessary code
...
gtk_widget_insert_after() reorders CSS nodes properly.
Also fix page reordering code to actually reorder the widget instead of
just the CSS nodes.
2020-10-20 04:50:12 +02:00
Benjamin Otte
d77902365d
box: Remove unnecessary code
...
gtk_widget_insert_after() reorders CSS nodes properly.
2020-10-20 04:50:12 +02:00
Benjamin Otte
d9b216e629
widget: Always update the CSS node
...
Anybody who keeps their own CSS nodes around or wants to order CSS nodes
different from widgets will from now on have to do it manually all the
time.
This is outdated behavior, nobody should be doing either of those two
things.
Also, the correct case is much more common, and not doing it
automatically was causing bugs.
Fixes #3280
2020-10-20 04:50:12 +02:00
Matthias Clasen
a7bd6b094a
Merge branch 'matthiasc/for-master' into 'master'
...
Some a11y docs and fixes
See merge request GNOME/gtk!2724
2020-10-20 01:45:17 +00:00
Matthias Clasen
eeae1b1ea7
a11y: Fix accessible tree inconsistency
...
The stack page objects were not properly integrated
in the accessible tree - they were appearing as parent
of the pages when navigating up, but not as children
of the stack when navigating down.
2020-10-19 21:15:44 -04:00
Matthias Clasen
0a71dc1bed
stack: Minor doc addition
2020-10-19 21:15:44 -04:00
Matthias Clasen
feb73a5ebb
docs: Flesh out a11y section
...
Add some advice for making custom widgets accessible.
2020-10-19 20:01:57 -04:00
Matthias Clasen
83d8ae2f30
Merge branch 'wip/chergert/fix-macos-surface-under-pointer' into 'master'
...
macos: fix discovery of surface under pointer
See merge request GNOME/gtk!2722
2020-10-19 21:26:47 +00:00
Emmanuele Bassi
51f5690ae3
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
See merge request GNOME/gtk!2720
2020-10-19 20:26:57 +00:00
Matthias Clasen
e58e6a0fbe
Merge branch 'a11y/editable' into 'master'
...
Improve the accessible support for editables
See merge request GNOME/gtk!2719
2020-10-19 20:16:21 +00:00
Christian Hergert
eb82b2a9ca
macos: fix discovery of surface under pointer
2020-10-19 12:35:41 -07:00
Matthias Clasen
63421b1876
a11y: Rename some methods
...
Our EditableText implementation works fine for any
editable, so don't name the functions in a way that
looks like they are only for entries.
2020-10-19 12:58:29 -04:00
Matthias Clasen
80e0e3fe4f
gtk-demo: Set an accessible role
...
Set the expected accessible role on the tagged entry
widget in the demo of the same name. Accessible tools
may decide to ignore widgets that have the wrong role,
so setting an appropriate role is important.
2020-10-19 12:56:50 -04:00
Matthias Clasen
ef46fe0e8e
Merge branch 'a11y/component' into 'master'
...
a11y: Implement Component
See merge request GNOME/gtk!2718
2020-10-19 16:54:45 +00:00
Matthias Clasen
9f9e7dffef
atspi: Implement Text for more editables
...
Our Text implementation requires that we have
a GtkEditable with a delegate that is a GtkText
widget.
This change make the Text implementation work for
the custom widget in the tagged entry demo.
2020-10-19 12:44:50 -04:00
Matthias Clasen
3918dd4643
Add gtk_editable_get_delegate
...
We need access to the delegate in the a11y layer,
so we might as well make this function public.
2020-10-19 12:36:54 -04:00
Matthias Clasen
04a51837f7
atspi: Emit bounds-changed
...
This is using the new bounds_change vfunc in GtkATContext.
2020-10-19 12:19:55 -04:00
Matthias Clasen
75a0bef921
widget: Mark the size as changed when it changes
...
This notifies the AT context that the widgets size
has changed.
2020-10-19 12:19:55 -04:00
Matthias Clasen
d50ebd947c
a11y: Add bounds change api
...
Add a way for GTK to pass bounds change information
to the AT context.
2020-10-19 12:19:55 -04:00
Matthias Clasen
8e4f8a45a9
atspi: Implement Component
...
Implement the non-questionable parts of the Component interface
for accessibles which are widgets.
This does not include:
- global coordinates
- setters
- scrolling
- alpha, layers, zorder, and the like
2020-10-19 12:19:55 -04:00
Matthias Clasen
3ad03b1706
a11y: Add a separate vfunc for platform changes
...
The state_change vfunc is becoming unwieldy. Lets move
the platform changes to their own vfunc, as a start.
2020-10-19 12:09:08 -04:00
Matthias Clasen
dfe00c4ac4
atspi: Be more careful
...
We have non-widget accessibles now, so guard against
change notification being emitted on them.
2020-10-19 12:09:08 -04:00
Matthias Clasen
5bb656af4c
Cosmetics
...
Add some more fold markers.
2020-10-19 12:08:47 -04:00
Matthias Clasen
469b913cdf
Cosmetics
2020-10-19 12:00:53 -04:00
Matthias Clasen
9c1c8a554a
Cosmetics
2020-10-19 11:46:25 -04:00
Xavier Claessens
a4aa6d79ad
meson: Use feature options for media and print backends
...
This gracefully disable ffmpeg, gstreamer, cups and cloudprint optional
dependencies when they are not available, while still giving full
control to distributors using -Dauto_features=enabled.
2020-10-17 09:54:47 -04:00
Xavier Claessens
ea3933b87a
meson: Make vulkan and xinerama optional deps default to 'auto'
...
It is nicer for contributors to have a build that works by default.
Distributors should be using -Dauto_features=enabled to get ride of
automagic options.
2020-10-17 09:54:47 -04:00
Xavier Claessens
6ae9f7e7c3
meson: Simplify xinerama dependency check
2020-10-17 09:54:47 -04:00
Xavier Claessens
efbbfb6547
meson: Simplify how cairo dependencies are checked
...
There is no reason to fallback to find_library for cairo and still rely
on pkg-config for all other dependencies, and just when using MSVC. When
building and pkg-config is not working it is preferable to fallback to a
subproject just like for all other dependencies.
Also add cairo.wrap now that meson support has been merged upstream.
2020-10-17 09:54:47 -04:00