Commit Graph

70539 Commits

Author SHA1 Message Date
Benjamin Otte
99e4a6a2d6 widget-factory: Propagate natural size for text styles
This avoids them requiring scrolling.
2021-07-30 20:54:58 +02:00
Benjamin Otte
c06817b951 widget-factory: Make frames cooler
Instead of havoing a label for the video frame that clashes with the
background of the video, add a frame around the text styles box and add
a label for them. As a side benefit, it also makes it more obvious that
it is scrollable.

Note: Most of this patch is just reindenting.
2021-07-30 20:43:02 +02:00
Benjamin Otte
e765aaa3f4 widget-factory: Expand the video to cover the whole frame
1. This looks way cooler.

2. Since the frame is rounded, it adds a very visible test for our
   clipping of rounded rectangles.
2021-07-30 20:37:34 +02:00
Matthias Clasen
06348a8517 Merge branch 'wip/chergert/fix-4134' into 'master'
textview: fix yoffset position when top_margin is set

Closes #4134

See merge request GNOME/gtk!3801
2021-07-30 13:41:30 +00:00
Christian Hergert
908b1e5e12 textview: fix yoffset position when top_margin is set
This doesn't need to be included in the calculation or it will cause the
yoffset to continually shift while the window is resized.

Fixes #4134
2021-07-29 16:45:04 -07:00
Matthias Clasen
cc6ecc8b62 Merge branch 'source-static-name' into 'master'
Avoid copying static debug strings

See merge request GNOME/gtk!3789
2021-07-29 11:59:02 +00:00
Matthias Clasen
05eaffb9f2 ci: Collect tools test output
This should help understanding why some of them fail.
2021-07-28 22:42:46 -04:00
Matthias Clasen
67b568f464 testsuite: Set TEST_RESULT_DIR for tools tests 2021-07-28 22:42:46 -04:00
Matthias Clasen
19b534f7de Avoid copying static debug strings
The g_source_set_name calls were showing up as a
major source of strdups in our profiles. Avoid that
by using new GLib api when available.
2021-07-28 22:42:46 -04:00
Matthias Clasen
db8b3419c2 Merge branch 'compose-parse-msvc' into 'master'
compose-parse.c: Include stdlib.h (fix build on Visual Studio)

See merge request GNOME/gtk!3794
2021-07-28 10:38:25 +00:00
Fabio Tomat
0f5ba5192a Update Friulian translation
(cherry picked from commit 16aa8dbad7)
2021-07-28 09:11:33 +00:00
Chun-wei Fan
108c423d70 compose-parse.c: Include stdlib.h
That is needed for exit(), and it may not have been included by the
other headers.
2021-07-28 15:18:36 +08:00
Emmanuele Bassi
dded10a396 Merge branch 'gi-fix' into 'master'
gdk: add missing Since annotation

See merge request GNOME/gtk!3790
2021-07-27 17:38:28 +00:00
Marc-André Lureau
1b080826db gdk: add missing Since annotation
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2021-07-27 21:01:31 +04:00
Matthias Clasen
910f23ea19 Merge branch 'wip/otte/widgetfactory-dnd' into 'master'
Improve DND

See merge request GNOME/gtk!3785
2021-07-27 04:12:58 +00:00
Benjamin Otte
f1b50baba1 widget-factory: Add images that support dnd
Just use the bottom left notebook for a GtkPicture with custom drag
source and drop target.
2021-07-27 04:40:57 +02:00
Matthias Clasen
4453597946 widget-factory: Some new backgrounds
Snowy wasn't ideal because of the aspect ratio.
Replace it by beach and nyc.
2021-07-27 04:40:42 +02:00
Benjamin Otte
192bfa10cb droptarget: Make formats construct-only writable
This way, it can be set in GtkBuilder.

Also make sure to only ever look at the GTypes set in the formats, as
GtkDropTarget cannot deal with mime types.
2021-07-27 04:28:04 +02:00
Benjamin Otte
0781429dc5 builder: Add support for GdkContentFormats 2021-07-27 04:28:04 +02:00
Benjamin Otte
d760332f00 testsuite: Add contentformat tests 2021-07-27 04:28:04 +02:00
Benjamin Otte
131be5f2e8 contentformats: Add gdk_content_formats_parse() 2021-07-27 04:13:42 +02:00
Matthias Clasen
57a95c540c Merge branch 'matthiasc/for-master' into 'master'
ngl: Cosmetics

See merge request GNOME/gtk!3786
2021-07-26 18:21:56 +00:00
Matthias Clasen
09deb1d757 ngl: Cosmetics
Use the macro we already have to check that colors
are fully transparent.
2021-07-26 13:42:10 -04:00
Matthias Clasen
5c4aba4b9c Merge branch 'wip/compose-parser' into 'master'
Clean up the GtkComposeTable api

See merge request GNOME/gtk!3746
2021-07-26 11:51:14 +00:00
Benjamin Otte
6a5d555f58 contentformats: Change the format of gdk_content_formats_to_string()
Now, we just print a whitespace-separated list of GTypes and mime types.

This makes this neat for 2 things:

1. Parsing it (see next commit)
2. Using it in GtkBuilder (see commits after that)

In particular, the common case of supporting a single GType (or mime
type) looks like just printing the GType (or mime type), which in
GtkBuilder looks like
<property name="formats">GdkTexture</property>
2021-07-26 02:28:49 +02:00
Benjamin Otte
f5dc71021f dnd: Guard drags with a reference when finishing
Usually the "dnd-finished" signal will be used to unref the GdkDrag. In
those cases, we would lose the object, so that when we do the final
drag_drop_done() afterwards, we wouldn't have a remaining reference.

With the reference guard, this now works.
2021-07-26 02:18:54 +02:00
Matthias Clasen
39005461c5 4.3.2 2021-07-24 22:04:49 -04:00
Matthias Clasen
4dc4c00267 Merge branch 'misc-speedups' into 'master'
ngl: Speed up clipping calculations a bit

See merge request GNOME/gtk!3784
2021-07-25 02:03:46 +00:00
Matthias Clasen
d76460343a sizerequest: Simplify some code
Avoid some repeated MAX().
2021-07-24 18:49:41 -04:00
Matthias Clasen
0d8dd0c664 sizerequest: Keep branches in sync
There are some unintentional differences between
the path that uses a layout manager, and the path
that uses widget vfuncs. Sync them up.
2021-07-24 18:49:41 -04:00
Matthias Clasen
ee6491f717 widget: Avoid some unnecessary back-and-forth casting
Avoid some unnecessary casting and a redundant early exit.
2021-07-24 18:49:27 -04:00
Matthias Clasen
7044951dab widget: Avoid GObject data for action muxer
Most widget have an action muxer now, so just
store it in GtkWidgetPrivate.
2021-07-24 18:48:10 -04:00
Matthias Clasen
98986a25f9 layoutmanager: Avoid some overhead
Use inline getters for some things.
2021-07-24 18:48:10 -04:00
Matthias Clasen
ae3e586714 gridlayout: Avoid some unnecessary overhead
Use inline functions for some things.
2021-07-24 18:48:10 -04:00
Matthias Clasen
0ef12193f9 gsk: Optimize gsk_transform_to...
Optimize these functions for the common cases.
2021-07-24 18:48:10 -04:00
Matthias Clasen
b695ef9168 gsk: Add a shortcut for a common transform case
Add a private getter for the translation part of a
transform node, to avoid pulling it out of the transform
over and over.
2021-07-24 18:48:09 -04:00
Matthias Clasen
7fb1389648 gsk: Add a private getter for container children
No need to get them one-by-one, in our inner loop.
2021-07-24 18:48:09 -04:00
Matthias Clasen
f88efb811b ngl: Reduce type checking overhead
No need to be very careful here, these are entirely
internal types.
2021-07-24 18:48:09 -04:00
Matthias Clasen
466d33ca69 ngl: Speed up clipping calculations a bit
Exit as early as possible from intersect_rounded_rectilinear.
2021-07-24 18:48:09 -04:00
Piotr Drąg
d44ce1987d Update POTFILES.in 2021-07-24 14:38:51 +02:00
Emmanuele Bassi
527b2c5ab1 Merge branch 'no-pposition' into 'master'
gdk/x11: Do not set PPosition hint

See merge request GNOME/gtk!3781
2021-07-24 11:45:00 +00:00
Florian Müllner
4d0c2997cf gdk/x11: Do not set PPosition hint
It is good practice for (floating) window managers to respect explicit
position hints from clients (as long as the window wouldn't end up
off-screen etc.).

Before commit 13d3afa56e, GTK had a flag for setting the PPosition hint,
but now does so unconditionally. However the real intention is to *not*
request a fixed position, so don't do that.
2021-07-24 06:32:16 +02:00
Matthias Clasen
6f04ec9dae Merge branch 'wip/exalm/gtktext-selection-fix' into 'master'
text: Use the widget y coordinate for gestures

See merge request GNOME/gtk!3780
2021-07-23 20:29:07 +00:00
Alexander Mikhaylenko
00cc99818d text: Use the widget y coordinate for gestures
Currently we use layout coordinates and widget height when determining
where a click or drag has happened. If the widget has top padding (which it
does inside a GtkEntry, for example), the area where it's possible to select
text is shifted down, so the part of GtkText above the layout is not counted
as the draggable area and instead the equal area below the widget is counted.

Since GtkText is always single-line, there's no need to do any of that and
we can use widget coordinates. Then the draggable area matches the widget
and the problems goes away.
2021-07-23 23:37:36 +05:00
Matthias Clasen
e51fdc1c9b Merge branch 'stack-page-name' into 'master'
stack: GtkStackPage:name is not construct-only

Closes #4109

See merge request GNOME/gtk!3778
2021-07-23 14:25:29 +00:00
Matthias Clasen
8d5ef4ab30 Merge branch 'matthiasc/for-master' into 'master'
Cosmetics

See merge request GNOME/gtk!3779
2021-07-22 21:22:55 +00:00
Matthias Clasen
7bdda15b86 Cosmetics
Fix a comment typo.
2021-07-22 17:03:08 -04:00
Matthias Clasen
4c41ef8de3 stack: GtkStackPage:name is not construct-only
We have a setter for this property, so we clearly
weren't serious when we marked it as construct-only.

Fixes: #4109
2021-07-22 16:55:15 -04:00
Matthias Clasen
7aec3b0fa1 Merge branch 'startup-profiling' into 'master'
Add more sysprof marks

See merge request GNOME/gtk!3777
2021-07-22 19:20:22 +00:00
Matthias Clasen
fce23c981b Add more sysprof marks
Add a few more marks during gtk_init to figure out where
our startup time goes, and avoid the sysprof initialization
from distorting the first mark.
2021-07-22 14:47:02 -04:00