Commit Graph

70445 Commits

Author SHA1 Message Date
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
Matthias Clasen
c7f4131402 Merge branch 'gtklistitemfactory-autocleanup' into 'master'
gtk: Define the GtkListItemFactory autocleanup func

See merge request GNOME/gtk!3703
2021-06-28 19:10:04 +00:00
Matthias Clasen
bd5e5beee0 gsk: Don't overflow vbo_count
We use 16 bits to store vbo_count, so we can't create
batches that have more than 65535 vertices. Pay attention
to that limit when merging batches.
2021-06-28 15:00:41 -04:00
Matthias Clasen
7a493f151d Revert "gsk: Respect max element vertices limitation"
This reverts commit f58fc6b22e.
2021-06-28 14:50:58 -04: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
Hugo Carvalho
fd49d39184 Update Portuguese translation
(cherry picked from commit a9c68757b5)
2021-06-27 09:45:19 +00: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
92177d9663 Merge branch 'wip/chergert/gdk-macos-gdkdrop' into 'master'
GdkDrop suport for macOS backend

See merge request GNOME/gtk!3683
2021-06-24 15:03:19 +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
e2cfa7bd11 Merge branch 'fix_tests_testdnd' into 'master'
make testdnd trashcan work again

See merge request GNOME/gtk!3700
2021-06-24 14:54:32 +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
Caolán McNamara
bbf7454fc9 make testdnd trashcan work again
so that dragging into the 'trashcan' is detected
2021-06-23 15:09:44 +01:00
Emmanuele Bassi
85cb5509c4 Merge branch 'gtklistitem-autocleanup' into 'master'
gtk: Define the GtkListItem autocleanup func

See merge request GNOME/gtk!3698
2021-06-23 13:09:28 +00:00
Emmanuele Bassi
0e29f52841 Merge branch 'migration_patch' into 'master'
Add section about `gtk_widget_set_app_paintable`

Closes #4007

See merge request GNOME/gtk!3641
2021-06-23 13:08:07 +00:00
Jaap aarts
02893e37d3 Add section about gtk_widget_set_app_paintable 2021-06-23 13:08:06 +00:00
Zhi
1dbb5188ba macos: fix the position of curosr of input method for macos.
In the refactoring from GdkWindow to GdkSurface, GtkWidget no longer
corresponds to a GdkSurface. We have to calculate the relative position
from GtkWidget to the GdkSurface.

Closes #4063.
2021-06-22 22:57:34 +08:00
Adrien Plazas
a4d35ace78 gtk: Define the GtkListItem autocleanup func 2021-06-22 09:43:16 +02:00
Carlos Garnacho
981a638b01 Merge branch 'fix-pointer-gestures-kde-plasma' into 'master'
gdk/wayland: Fix pointer-gestures version selection

See merge request GNOME/gtk!3693
2021-06-21 21:35:06 +00:00
Vlad Zahorodnii
3969d8b028 gdk/wayland: Fix pointer-gestures version selection
version == GDK_ZWP_POINTER_GESTURES_V1_VERSION will fail if the
compositor implements version 2 of pointer-gestures-v1.
2021-06-21 09:51:45 +03:00
Emmanuele Bassi
889709213e Never show the Trash in the FileChooserWidget side bar
The Trash is a special location: files cannot be copied or moved, there,
and the file selection dialog is not able to restore files from the
Trash.

Fixes: #674
2021-06-20 15:44:22 +01:00
Emmanuele Bassi
333a92bcff Revert "Never show the Trash in the FileChooserWidget side bar"
This reverts commit cd39e417e1.
2021-06-20 15:41:43 +01:00
Emmanuele Bassi
cd39e417e1 Never show the Trash in the FileChooserWidget side bar
The Trash is a special location: files cannot be copied or moved, there,
and the file selection dialog is not able to restore files from the
Trash.

Fixes: #674
2021-06-20 15:39:41 +01:00
Matthias Clasen
1cebf406aa docs: Fix a typo 2021-06-19 14:14:57 -07:00
Matthias Clasen
d7915fbca8 docs: Add a section about Drag-and-Drop 2021-06-19 14:14:57 -07:00
Matthias Clasen
9169315cc1 Merge branch 'wip/chergert/textview-access-to-contexts' into 'master'
textview: give application developers access to RTL and LTR context

See merge request GNOME/gtk!3690
2021-06-19 20:36:44 +00:00
Matthias Clasen
3b70cd3226 checkbutton: Match GtkButton behavior
When leaving the widget before releasing the button,
we should not activate the checkbutton, to match the
way GtkButton behaves.

Fixes: #4061
2021-06-19 13:30:31 -07:00
Christian Hergert
a6101f0181 textview: give application developers access to RTL and LTR context
This allows developers to modify the pango context that is used when
rendering text within the text view.

Such access can be useful to alter how rounding occurs with API such as
pango_context_set_round_glyph_positions() and is needed by GtkSourceView
for proper placement of glyphs within the overview map.
2021-06-19 12:28:18 -07:00
Matthias Clasen
92c6485adf docs: Tweak wording
Instead of drag'n'drop, say drag-and-drop. That is easier
to read, and less unclear on the markdown syntax implications.
2021-06-19 08:03:47 -07:00
Matthias Clasen
4df9314039 wayland: Fix some dnd corner case
We must call gdk_drag_drop_done() when the drag ends,
successfully or not. Without this, we get an unwarranted
emission of ::cancel after a successful drop.

Since only the first call to gdk_drag_drop_done() is taking
effect, it is safe to call as a fallback, after emitting
::dnd-finished. If the application connects to that signal
and calls gdk_drag_drop_done() itself, its call will take
precedence.

This matches what the X11 implementation does.
2021-06-19 08:03:21 -07:00
Matthias Clasen
c8ad4d5deb dnd: Add another assertion
Assert that gdk_drop_finish() is called after the
drop is performed.
2021-06-19 07:50:41 -07:00
Matthias Clasen
13a2db2238 Merge branch 'fix-3798' into 'master'
GDK-Win32: Fix drag surface positioning (issue #3798)

Closes #3798

See merge request GNOME/gtk!3659
2021-06-18 17:31:51 +00:00
Matthias Clasen
e8f9fb0f86 Merge branch 'gsk-big-batches' into 'master'
ci: Build Broadway on MacOS

See merge request GNOME/gtk!3686
2021-06-18 17:00:58 +00:00
Matthias Clasen
634bd2de48 Merge branch 'matthiasc/for-master' into 'master'
ci: Build Broadway on MacOS

See merge request GNOME/gtk!3685
2021-06-18 14:09:49 +00:00
Matthias Clasen
f58fc6b22e gsk: Respect max element vertices limitation
We are pretty good at batching commands now, and we can easily
produce batches that exceed the maximum number of elements per
draw call that the hw can handle. Query that number, and respect
it when merging batches.

This fixes the rendering of the overview map in GtkSourceView.
2021-06-18 06:50:59 -07:00
Matthias Clasen
fb052c8d25 ci: Build Broadway on MacOS
We've seen a build failure if Broadway is built without
the X11 backend. Lets recreate that configuration in ci
so it doesn't break again.
2021-06-18 06:09:14 -07:00
Chun-wei Fan
e35490ba5b gdkdrag-win32.c: Fix drag surface positioning
Determine the root_x and root_y coordinates of the drag surface by
relying on the coordinates of the surface where the drag is being
carried out, plus the coordinates that we receive from the drag event,
which is in-line with what the X11 backend does.

This will prevent the drag surface from being initially drawn at the
correct position, but jumping towards the top-left corner of the screen
shortly afterwards.

The DnD support will still need some more updates to function correctly
on Windows, but at least this is a small improvement.

Fixes issue #3798.
2021-06-18 18:07:50 +08:00
Matthias Clasen
be1b979e51 Merge branch 'matthiasc/for-master' into 'master'
treeviewcolumn: Clip header buttons

Closes #4045

See merge request GNOME/gtk!3682
2021-06-18 04:37:48 +00:00
Christian Hergert
3fd931d392 macos: implement GdkDrop for macOS
This gets the basic mechanics of the drop portion of DnD working on the
macOS backend. You can drag, for example, from TextEdit into GNOME
Text Editor when using the macOS backend.

Other content formats are supported, and match what is currently
supported by the clipboard backend as the implementation to read
from the pasteboard is shared.

Currently, we look up the GdkDrag for the new GdkDrop. However,
nothing is stashing the drag away for further lookup. More work is
needed on GdkMacosDrag for that to be doable.
2021-06-17 17:26:42 -07:00
Christian Hergert
6c1dce2878 macos: make pasteboard usage reusable
We will want to be able to reuse the pasteboard reading code from
the macOS DnD drop backend. This just removes the pasteboard
bits from the implementation and allows that to be passed in as in
both clipboard and DnD cases we'll have a specific NSPasteboard
to read from.
2021-06-17 17:19:19 -07:00