Commit Graph

70755 Commits

Author SHA1 Message Date
Matthias Clasen
b9cad7cc54 textview: Implement new pango attributes
Implement the word and sentence attributes.
2021-08-25 14:57:13 -04:00
Matthias Clasen
357b97b5a6 Support new pango attributes
Support new Pango attributes for segmentation
in GtkBuilder.
2021-08-25 14:57:13 -04:00
Matthias Clasen
5e90d63373 Merge branch 'sloped-caret' into 'master'
Implement sloped caret drawing

See merge request GNOME/gtk!3880
2021-08-25 13:43:24 +00:00
Jordi Mas
0b7f1e488f Update Catalan translation 2021-08-25 15:17:27 +02:00
Matthias Clasen
e281bbbb55 Merge branch 'treeexpander-indent-property' into 'master'
GtkTreeExpander: indent-without-expander property

Closes #4175

See merge request GNOME/gtk!3858
2021-08-25 11:48:59 +00:00
Matthias Clasen
892bacee52 Merge branch '4195-include-gdkprivate-h' into 'master'
gdkmacoseventsource: Include "gdk-private.h"

Closes #4195

See merge request GNOME/gtk!3882
2021-08-25 11:48:11 +00:00
Matthias Clasen
2f1db4b77c Use pango_layout_get_caret_pos
This new api returns rectangles for sloped carets,
in contrast to pango_layout_get_cursor_pos, which
always returns a rectangle with a width of zero.
2021-08-25 06:53:53 -04:00
Matthias Clasen
f90e9b26f8 Implement sloped caret drawing
Prepare for Pango to return slope information for carets.

While we are at it, improve the shape of our carets a bit.
2021-08-25 06:53:53 -04:00
Matthias Clasen
ad71f454bd Merge branch 'fix-gettext' into 'master'
Fix wrong gettext ITS target

See merge request GNOME/gtk!3881
2021-08-25 10:51:57 +00:00
Rafał Dzięgiel
c66bd791c4
Fix wrong gettext ITS target
The installed ITS rule filename is "gtk4builder.its". The .loc file
is wrongly pointing to old "gtkbuilder.its" which makes gettext fail
on systems without GTK3 installed.
2021-08-25 10:08:50 +02:00
Fran Dieguez
40bceef3ca Update Galician translation
(cherry picked from commit 410ea1049b)
2021-08-25 07:26:55 +00:00
Fran Dieguez
9d79f55dc9 Update Galician translation
(cherry picked from commit 09a5828ccf)
2021-08-25 06:12:43 +00:00
Matthias Clasen
c5c1cf6d55 Merge branch 'wip/otte/for-master' into 'master'
wayland: Better error on eglGetDisplay() failure

See merge request GNOME/gtk!3879
2021-08-25 04:24:55 +00:00
Peter Bloomfield
9eb8aa9a32 gdkmacoseventsource: Include "gdk-private.h"
_gdk_macos_event_source_new() calls g_source_set_static_name(), which
for GLib versions before 2.69.1 is a macro defined in gdk-private.h.

Fixes #4195

modified:   gdk/macos/gdkmacoseventsource.c
2021-08-24 16:55:52 -04:00
Benjamin Otte
95931a7e6c wayland: Better error on eglGetDisplay() failure
Goals:

1. Provide as much information as possible in the error message, so
   users can try to fix their system themselves.
2. Try to formulate the error message in a way that explains that this
   is not something GTK can fix, but a lower layer problem.

Related: #4193
2021-08-24 19:55:22 +00:00
Yuri Chornoivan
d9daaed43f Update Ukrainian translation
(cherry picked from commit 6377b23bd6)
2021-08-24 17:29:02 +00:00
Matthias Clasen
b9c51e65c1 Merge branch 'wip/carlosg/gesture-state-in-entries' into 'master'
Claim clicks further at GtkEntry/GtkSearchEntry

See merge request GNOME/gtk!3873
2021-08-24 17:20:20 +00:00
Matthias Clasen
da5eb92f47 Merge branch 'matthiasc/for-master' into 'master'
Revert "imwayland: Tweak preedit text"

Closes #4123

See merge request GNOME/gtk!3877
2021-08-24 17:19:42 +00:00
Matthias Clasen
03ed585f6f tests: Rewrite PangoAttribute introspection
We can use the new binding helpers to make this
a little less bothersome. That way, it will need
tweaks less often (only when new fundamental types
are introduced).
2021-08-24 12:53:48 -04:00
Matthias Clasen
51f953a1aa Revert "imwayland: Tweak preedit text"
This reverts commit d84a028455.

IBus uses the same character now.

Fixes: #4123
2021-08-24 12:53:48 -04:00
Emmanuele Bassi
93fb07d808 Merge branch 'expander-ref-leak' into 'master'
Release an extra reference on GtkExpander:child

See merge request GNOME/gtk!3876
2021-08-24 13:20:48 +00:00
Emmanuele Bassi
5e311d4d85 Release an extra reference on GtkExpander:child
The child of a GtkExpander is owned directly by the expander whenever
the "expanded" flag is unset.

We are adding an additional reference to the child of an expander when
expander is not expanded.

Additionally, if a GtkExpander is disposed while not expanded, we need
to explicitly release the reference on the child widget that we own.

This reference leak was masked in GTK3 by GtkContainer removing each
child from the parent container by recursively calling
gtk_widget_destroy().
2021-08-24 11:28:59 +01:00
Carlos Garnacho
e652054d50 gtkpasswordentry: Add a "catchall" click gesture handler
This gesture is set on the whole widget surface, since there's
multiple input targets inside an entry (icons, the GtkText itself)
it makes sense to consider the full entry an area handling clicks.
Ensure these events don't propagate further up, and result in other
actions.
2021-08-24 01:13:29 +02:00
Carlos Garnacho
58c31b8627 gtkpasswordentry: Consume click events after pressing on icon
This may result in user actions, so the gesture should consume the
events.
2021-08-24 01:12:31 +02:00
Matthias Clasen
b945033b41 Merge branch 'fix-docs' into 'master'
Fix documentation for gtk_icon_view_create_drag_icon

Closes #4190

See merge request GNOME/gtk!3875
2021-08-23 20:40:17 +00:00
Qiu Wenbo
92d2867170 docs: Fix documentation for gtk_icon_view_create_drag_icon
Fixes: #4190
2021-08-24 00:24:08 +08:00
Matthias Clasen
5d38c8c558 Merge branch 'wip/kalev/pre-compiled-css-detection' into 'master'
build: Fix detection for pre-compiled css files

See merge request GNOME/gtk!3874
2021-08-23 14:57:19 +00:00
Kalev Lember
552a4b2c82 build: Fix detection for pre-compiled css files
The default theme changed from Adwaita to Default and this tripped up
the logic to detect if the tarball builds contain pre-built css files or
not. Fix this by looking at pre-compiled css files in themes/Default/
instead of themes/Adwaita/.
2021-08-23 16:15:48 +02:00
Carlos Garnacho
7a4afb08bd gtksearchentry: Add a "catchall" click gesture handler
This gesture is set on the whole widget surface, since there's
multiple input targets inside an entry (icons, the GtkText itself)
it makes sense to consider the full entry an area handling clicks.
Ensure these events don't propagate further up, and result in other
actions.
2021-08-23 15:38:33 +02:00
Carlos Garnacho
c5cd1ac630 gtkentry: Add a "catchall" click gesture handler
This gesture is set on the whole widget surface, since there's
multiple input targets inside an entry (icons, the GtkText itself)
it makes sense to consider the full entry an area handling clicks.
Ensure these events don't propagate further up, and result in other
actions.
2021-08-23 15:38:33 +02:00
Carlos Garnacho
90edb76415 gtksearchentry: Consume click events after pressing on icon
This results in user actions, so the gesture should consume the
events.
2021-08-23 15:38:33 +02:00
Carlos Garnacho
8f397502df gtktext: Set claimed state on button1 click gesture
All possible ramifications after button1 press (move cursor,
begin drag, begin dnd, select word/line, ...) result in user
actions. The right thing after that is consuming the events,
set the gesture state for that.
2021-08-23 15:28:27 +02:00
Jan Lukas Gernert
1cb17d8613 GtkTreeExpander: indent-for-icon property
A property to determine if the TreeExpander should indent the child
by the width of an expander-icon when it is not expandable.

Closes #4175
2021-08-23 07:54:45 +02:00
Jan Lukas Gernert
88e796bb45 Add 4.6 version macros 2021-08-23 07:54:27 +02:00
Matthias Clasen
1310bf0218 Merge branch 'matthiasc/for-master' into 'master'
NEWS: Updates

See merge request GNOME/gtk!3872
2021-08-22 21:16:02 +00:00
Matthias Clasen
4efeaa844f NEWS: Updates 2021-08-22 16:41:22 -04:00
Matthias Clasen
24685612a9 Merge branch 'css-text-transform' into 'master'
css: Implement text-transform

See merge request GNOME/gtk!3862
2021-08-22 20:40:50 +00:00
Matthias Clasen
bf21df4195 Add an example for text transforms
Show some transformed text in the markup demo.
2021-08-22 15:57:50 -04:00
Matthias Clasen
417b3f9c6b Implement text transforms for GtkTextView
Add a property to GtkTextTag and do all the
legwork to translate it to the Pango attribute.
2021-08-22 15:57:50 -04:00
Matthias Clasen
2d84a1c63e css: Implement text-transform
Implement the text-transform property from
https://www.w3.org/TR/css-text-3/#text-transform-property
using a new Pango attribute.
2021-08-22 15:57:50 -04:00
Matthias Clasen
5ab9a29bc4 Merge branch 'bump-pango' into 'master'
Bump the pango dependency

See merge request GNOME/gtk!3871
2021-08-22 19:57:21 +00:00
Matthias Clasen
383ea0d86a Merge branch 'css-line-height2' into 'master'
Implement CSS line-height

See merge request GNOME/gtk!3833
2021-08-22 19:47:10 +00:00
Matthias Clasen
df8f75bb8f Merge branch 'matthiasc/for-master' into 'master'
windowhandle: Quiet a compiler warning

See merge request GNOME/gtk!3868
2021-08-22 19:28:01 +00:00
Matthias Clasen
ba95ef63da Drop PANGO_VERSION_CHECK checks
We require Pango 1.49 now.
2021-08-22 15:26:23 -04:00
Matthias Clasen
bea4aa31ea Bump Pango dep
Require Pango 1.49, so we can support new attributes
without too much ifdeffery.
2021-08-22 15:23:42 -04:00
Matthias Clasen
6c19a8352f gtk-demo: Add a line height demo
Add an example for widely spaced text to the markup demo.
2021-08-22 15:15:50 -04:00
Matthias Clasen
e3df89b524 gtk-demo: Improve markup demo
The font sizes demo had the space between the font-size spans,
causing us to have a run with just a default sized space between
the words, which in turn leads to wobbly cursor sizes. Avoid that
by including the space in the preceding span.

Also, make it bigger.
2021-08-22 15:15:50 -04:00
Matthias Clasen
a9003f7ac0 gtk-demo: Set line height from markup
Keep the import-markup code in sync with GtkTextBuffer.
2021-08-22 15:15:50 -04:00
Matthias Clasen
2cc06f60c5 textview: Set line height from markup
Note that we ignore the absolute-line-height
attribute for now.
2021-08-22 15:15:50 -04:00
Matthias Clasen
4759afcc3e textview: Set line height from css
Set the line height in the default attributes from
the CSS style. This makes line height work in
GtkTextView.
2021-08-22 15:15:50 -04:00