Commit Graph

38793 Commits

Author SHA1 Message Date
Matthias Clasen
6ff85d287a Merge branch 'wip/chergert/fix-texthistory-insert' into 'master'
texthistory: fix calculation of n_chars

See merge request GNOME/gtk!3756
2021-07-16 11:04:21 +00:00
Christian Hergert
5d02a8f5db texthistory: fix calculation of n_chars
This should be the number of characters, not the end position. This fixes
an issue where we wouldn't coalesce insert actions together.
2021-07-15 21:26:30 -07:00
Matthias Clasen
b70b058b66 Merge branch 'transparent-optimizations' into 'master'
snapshot: Handle transparent opacity nodes correctly

See merge request GNOME/gtk!3754
2021-07-15 18:39:48 +00:00
Matthias Clasen
aaa68954c3 snapshot: Handle transparent opacity nodes correctly
Eliding totally transparent content from the node tree is
not 100% correct, since filters can make things visible, so
we need to at least preserve the bounds. We can do that by
creating a transparent color node.
2021-07-15 13:18:23 -04:00
Timm Bäder
433233258b snapshot: Only compute start and end point if we have to
If the linear gradient results in a color node, we don't need the start
and end point. Only declare and compute it if we need to.
2021-07-15 16:52:38 +02:00
Timm Bäder
3eed61deba snapshot: Replace trivial gradients with color nodes
Extend this to all existing gradient types
2021-07-15 16:51:17 +02:00
Marco Melorio
eacfa2a966 doc: Syntax fixes 2021-07-13 22:53:19 +00:00
Marc-André Lureau
a009e26e95 gtk: fix GtkPasswordEntryBuffer introspection
Move the source file to public_sources list, and fix tag annotation.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2021-07-13 15:03:09 +04:00
Marc-André Lureau
ab908c23f4 Add GtkMenuButton:primary Since: annotation
Property added in commit a74420bc1a.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2021-07-13 11:31:09 +04:00
Marc-André Lureau
ae21f66fe5 Add GTK_DEBUG_ICONFALLBACK Since: 4.2 annotation
Introduced in commit 6f82408056.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2021-07-13 11:26:39 +04:00
Matthias Clasen
a64087d481 Merge branch 'activatable-buttons' into 'master'
menubutton: Make menu buttons activatable again

Closes #4079

See merge request GNOME/gtk!3728
2021-07-10 12:59:39 +00:00
Matthias Clasen
c85f3f4942 Merge branch 'wip/chergert/fix-4094' into 'master'
joinedmenu: add helper to join menus instead of nesting

Closes #4094

See merge request GNOME/gtk!3739
2021-07-09 19:29:41 +00:00
Marco Trevisan (Treviño)
10bdf8c645 textbtree: Initialize to zero the tags counting array
We're using the tag contents array to count the number of invisible tags
set but we always increase it without being initialized.

This may lead to unexpected behavior when traversing them and it's
causing a reliable failure in the textiter tests under s390x.

So, memset that area content to 0 once allocated. It's not needed to do
the same for the tags themselves as we always assign them.

 Conditional jump or move depends on uninitialised value(s)
   at 0x4CFAA00: _gtk_text_btree_char_is_invisible (gtktextbtree.c:2569)
   by 0x4B8A1BB: find_visible_by_log_attrs (gtktextiter.c:3244)
   by 0x10E93D: check_backward_visible_word_start (textiter.c:484)
   by 0x10E93D: test_visible_word_boundaries (textiter.c:523)
   by 0x533288F: g_test_run_suite (in /usr/lib/s390x-linux-gnu/libglib-2.0.so.0)
   by 0x53328E7: g_test_run (in /usr/lib/s390x-linux-gnu/libglib-2.0.so.0)
   by 0x109CC1: main (textiter.c:807)
2021-07-09 03:48:40 +02:00
Christian Hergert
d63d9b2319 joinedmenu: add helper to join menus instead of nesting
In many cases, we have an "extra-menu" property that is used to allow
applications to join menus into the native menu for the widget. Previously,
this was done by nesting that menu in a section.

Doing so increases the complexity of the rules for GtkMenuTracker as you
may want different handling from inside of the section vs toplevel
sections.

If instead we synthetically glue the menus together, we have a much more
natural joining of menus as the application developer would expect for
their menu.

This also ports GtkLabel, GtkText, GtkPasswordEntry, and GtkTextView to
use the joined menu helper.

The joined menu helper comes originally from GNOME Builder and has had
extensive use there.

Fixes #4094
2021-07-08 14:16:06 -07:00
Matthias Clasen
6818eee859 Merge branch 'wip/exalm/scroll-touch' into 'master'
scrolledwindow: Don't check drag threshold when already scrolling

See merge request GNOME/gtk!3735
2021-07-07 21:37:58 +00:00
Matthias Clasen
e7f1398d85 Merge branch 'text-cursor-extents' into 'master'
text: Add API to compute cursor extents

See merge request GNOME/gtk!3734
2021-07-07 21:37:14 +00:00
Marc-André Lureau
337c5e5e59 Add missing "Since: 4.X" tags
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2021-07-07 23:35:38 +04:00
Florian Müllner
af52ea78c6 text: Add API to compute cursor extents
The extents that correspond to the strong/weak cursor at a given
character position can be used for example to point a popover to
text in the widget.
2021-07-07 19:33:12 +02:00
Alexander Mikhaylenko
fe633d9ef9 scrolledwindow: Don't check drag threshold when already scrolling
Checkout the drag threshold only makes sense when starting a scroll, after
that it just adds jumps when trying to scroll back and forth.
2021-07-07 19:39:06 +05:00
Matthias Clasen
f328175e2f appchooserbutton: Make buttons activatable again
The activation is simply forwarded to the combobox
within.
2021-07-05 10:10:44 -04:00
Matthias Clasen
fc65d6393a colorbutton: Make color buttons activatable again
The activation is simply forwarded to the toggle button
within.
2021-07-05 10:10:19 -04:00
Matthias Clasen
271afb7eab font button: Make font buttons activatable again
The activation is simply forwarded to the toggle button
within.
2021-07-05 10:09:43 -04:00
Matthias Clasen
76133dbea7 menubutton: Make menu buttons activatable again
The activation is simply forwarded to the toggle button
within.

Fixes: #4079
2021-07-05 10:08:43 -04:00
Matthias Clasen
9885bedb7d Merge branch 'matthiasc/for-master' into 'master'
widget-factory: Add a default button

Closes #3975

See merge request GNOME/gtk!3725
2021-07-04 13:46:13 +00:00
Matthias Clasen
f023695f31 docs: Fix various link formatting
Make links that gi-docgen can undestand.

Fixes: #3975
2021-07-03 23:11:48 -04:00
Matthias Clasen
c79f289d67 text: Update placeholder visibility more often
We need to update the visibility of the placeholder
label when we create it, otherwise we can end up
with placeholder text on top of entry content.

Fixes: #4066
2021-07-03 22:15:38 -04:00
Matthias Clasen
e516ce428a Merge branch 'fix-filechooser-critical' into 'master'
filechooser: Avoid a critical

Closes #4077

See merge request GNOME/gtk!3722
2021-07-03 21:48:41 +00:00
Matthias Clasen
8ff9c851ce filechooser: Avoid a critical
This was showing up when calling some filechooser api on
a native filechooser, where we use a filechooser dialog
behind the scenes, but it does not have focus.

Fixes: #4077
2021-07-03 15:15:06 -04:00
Matthias Clasen
511dc7a182 Merge branch 'fix-gir' into 'master'
meson: Fix generate_gir() dependencies

See merge request GNOME/gtk!3701
2021-07-03 13:35:22 +00:00
Matthias Clasen
c668586caf Merge branch 'scrolling-menus' into 'master'
popovermenu: Scroll when necessary

See merge request GNOME/gtk!3717
2021-07-03 13:31:23 +00:00
Matthias Clasen
3227aa2c45 mediastream: Rename apis one more time
Before we end up with names that we are unhappy with,
rename things one more time, and update all callers.
2021-07-03 09:05:33 -04:00
Matthias Clasen
804d9ee828 popovermenu: Scroll when necessary
Add a scrolled window to GtkPopoverMenu, so we can scroll
long menus when there is not enough room.
2021-07-02 13:19:02 -04:00
Christian Hergert
d8ab2e6d03 texthistory: hoist single actions from group
In many cases across GtkTextBuffer, we end up with operations performed
inside of a begin/end user action. Those can be coalesced into a single
sub-action within the group, and hoisted out of the group. Doing so
increases the chances that we chain similar actions together for words.

Additionally, this fixes an issue introduced in
6179886b14 for #3977 where GNOME Text Editor
started to group all possible actions into a single group.

Fixes GNOME/gnome-text-editor#97
2021-06-30 16:40:54 -07:00
Benjamin Otte
e9d3d3e3cf icontheme: Fix binding annotation 2021-06-30 18:55:25 +00:00
Matthias Clasen
bf97dfd998 Merge branch 'wip/exalm/buttons' into 'master'
GtkMenuButton icon+arrow support + fixes

Closes #3501

See merge request GNOME/gtk!3694
2021-06-28 19:10:57 +00:00
Adrien Plazas
0ea73c384f gtk: Define the GtkListItemFactory autocleanup func 2021-06-28 14:01:57 +02:00
Emmanuele Bassi
d8c416e8b2 Merge branch 'ebassi/issues-4076' into 'master'
docs: Use code blocks for inline XML

Closes #4076

See merge request GNOME/gtk!3702
2021-06-27 15:10:15 +00:00
Emmanuele Bassi
9bf3724d25 docs: Use code blocks for inline XML
Otherwise the markdown renderer will just ignore them.

Fixes: #4076
2021-06-27 15:25:18 +01:00
Xavier Claessens
0fd790eb8d Meson: Only g-ir-scanner warnings fatal when buit with -Dwerror=true
Also fix deprecation warning that requires using fatal_warnings kwarg
from Meson 0.55.0.

Fixes: #4072.
2021-06-25 11:38:11 -04:00
Xavier Claessens
b18e95d6b3 meson: Fix generate_gir() dependencies
There is no need to search for gir variables into subprojects, they are
part of dependencies objects, meson will find them there.
2021-06-25 10:08:36 -04:00
Alexander Mikhaylenko
47b5c68df4 menubutton: Don't hardcode label<->arrow spacing
This should come from the theme instead, as it does for icon<->arrow.
2021-06-24 23:13:01 +05:00
Alexander Mikhaylenko
ac3b246858 menubutton: Add a way to always show arrow with image buttons
Make sure the button still has the .image-button style class with an icon,
also add it to the initial state with only an arrow. Add a new
.arrow-button style class for the icon+arrow state so it's possible to
style it.

Remove spacing from the label+arrow variant to match, re-add it from the
stylesheet for both.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3501
2021-06-24 23:12:26 +05:00
Alexander Mikhaylenko
51a754547e menubutton: Remove a random g_return_if_fail()
There's already one above.
2021-06-24 23:11:57 +05:00
Alexander Mikhaylenko
76df60db2b menubutton: Reset label when setting icon name and vice versa
Match GtkButton.
2021-06-24 23:06:46 +05:00
Alexander Mikhaylenko
f3befe530b button: Reset style classes when setting arbitrary children
Don't leave leftover .image-button or .text-button.
2021-06-24 23:06:46 +05:00
Matthias Clasen
59d4333e23 Merge branch 'wip/sadiq/reveal-controls-on-touch' into 'master'
video: Reveal controls on tap

See merge request GNOME/gtk!3648
2021-06-24 15:11:33 +00:00
Matthias Clasen
6a29b64850 Merge branch 'dnd-fixes' into 'master'
dnd: Add another assertion

See merge request GNOME/gtk!3689
2021-06-24 15:01:29 +00:00
Matthias Clasen
73cb60d053 Merge branch 'ebassi/filechooser-no-trash' into 'master'
Never show the Trash in the FileChooserWidget side bar

Closes #674

See merge request GNOME/gtk!3692
2021-06-24 14:59:43 +00:00
Matthias Clasen
47bd998e94 Merge branch 'checkbutton-release-outside' into 'master'
checkbutton: Match GtkButton behavior

Closes #4061

See merge request GNOME/gtk!3691
2021-06-24 14:58:42 +00:00
Matthias Clasen
006633082d Merge branch 'macos-input-method' into 'master'
macos: fix the position of curosr of input method for macos.

Closes #4063

See merge request GNOME/gtk!3699
2021-06-24 14:50:59 +00:00