Commit Graph

70867 Commits

Author SHA1 Message Date
Matthias Clasen
7c3fbdecf2 gtk-demo: Font rendering - improve the grid
Allow changing the character shown in the grid.
2021-09-04 22:56:07 -04:00
Matthias Clasen
b77938f40f Cosmetics
Remove an unused object from the font rendering
demo ui file.
2021-09-04 22:55:47 -04:00
Matthias Clasen
a3ccff3773 Merge branch 'text-fixes' into 'master'
textview: fix pango context invalidation

See merge request GNOME/gtk!3922
2021-09-04 21:39:30 +00:00
Asier Sarasua Garmendia
9869082c1c Update Basque translation
(cherry picked from commit 0768addbb3)
2021-09-04 20:54:41 +00:00
Matthias Clasen
754212d0f9 textview: Invalidate Pango contexts
We need to invalidate the Pango contexts when
font settings change. Use the new helper
gtk_widget_update_pango_context to make it less
likely that we forget to update some things.
2021-09-04 15:42:05 -04:00
Matthias Clasen
a9b81577c6 widget: Provide a helper for updating pango contexts 2021-09-04 15:42:05 -04:00
Matthias Clasen
eaa2dada54 Rename an internal function
It occupies a name I want to reuse for something else.
2021-09-04 15:42:05 -04:00
Matthias Clasen
ce2b2128bb Revert "gsk: Add font options to text nodes"
This reverts commit f1347f5841.
2021-09-04 15:42:05 -04:00
Matthias Clasen
41c25b8809 Revert "gsk: Add font options to the glyph cache"
This reverts commit 6599cb001f.
2021-09-04 15:42:05 -04:00
Matthias Clasen
b5ff35ff3e Revert "gsk: Pass font options along"
This reverts commit 299c7c3514.
2021-09-04 15:42:05 -04:00
Matthias Clasen
06423d807f Revert "gtk: Pass font options along"
This reverts commit 062a15310a.
2021-09-04 15:42:05 -04:00
Goran Vidović
0395395d52 Update Croatian translation
(cherry picked from commit 6fe3b21a01)
2021-09-04 18:12:03 +00:00
Boyuan Yang
464e0aed04 Update Chinese (China) translation 2021-09-04 17:38:16 +00:00
Goran Vidović
d46e4fcecd Update Croatian translation
(cherry picked from commit 543b7defec)
2021-09-04 17:16:26 +00:00
Changwoo Ryu
363fb96e81 Update Korean translation 2021-09-04 09:02:48 +00:00
Changwoo Ryu
2382bd3bb2 Update Korean translation
(cherry picked from commit 0a5af76932)
2021-09-04 08:59:40 +00:00
Anders Jonsson
3b0a9e84ab Update Swedish translation
(cherry picked from commit 2dbcad428a)
2021-09-03 22:59:37 +00:00
Matthias Clasen
850aebea5d Merge branch 'matthiasc/for-master' into 'master'
widget: Redraw when font options change

See merge request GNOME/gtk!3917
2021-09-03 18:16:33 +00:00
Matthias Clasen
26e632e549 widget: Redraw when font options change
Its the right thing to do, even if it is a rare event.
2021-09-03 13:56:29 -04:00
Matthias Clasen
64d2d7074f Merge branch 'small-text-fixes' into 'master'
gsk: Pass font options down

See merge request GNOME/gtk!3908
2021-09-03 17:21:08 +00:00
Matthias Clasen
062a15310a gtk: Pass font options along
Pass the widget's font options along when we
are creating text nodes.
2021-09-03 12:52:05 -04:00
Matthias Clasen
299c7c3514 gsk: Pass font options along
Use the font options from the text node when
looking up glyphs.
2021-09-03 12:52:05 -04:00
Matthias Clasen
6599cb001f gsk: Add font options to the glyph cache
The cairo_t that we create to render glyphs for
the glyph cache needs to match the font options
that are supposedly governing how glyphs are
drawn.

Since we allow font options to be different per
widget in gtk, we need to have them at least at
the level of individual render nodes. Adding them
to the lookup key for the glyph cache has the
side effect of solving another problem: We are
not flushing the cache when font options change.
2021-09-03 12:52:05 -04:00
Matthias Clasen
f1347f5841 gsk: Add font options to text nodes
Since font options affect how the glyphs get rendered,
we need to pass the font options down from the gtk level
to where the glyph cache is populated.

Add a new gsk_text_node_new_full api that takes a
cairo_font_options_t in addition to the other parameters.
2021-09-03 12:43:35 -04:00
Matthias Clasen
f3ccf62463 gtk-demo: Improve the font rendering demo
Add a toggle for antialiasing, and make the metrics
hinting turn on rounding of positions, to match what
we do with settings now.
2021-09-03 11:29:44 -04:00
Matthias Clasen
44fea33c5d Merge branch 'wip/exalm/buttons' into 'master'
Allow custom children on GtkMenuButton

Closes #4205

See merge request GNOME/gtk!3904
2021-09-03 14:49:09 +00:00
Alexander Mikhaylenko
8b48cf11f9 menubutton: Support custom children
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4205
2021-09-03 17:52:46 +05:00
Matthias Clasen
e681fdd958 Merge branch 'matthiasc/for-master' into 'master'
Add a README in gtk/compose

See merge request GNOME/gtk!3916
2021-09-03 00:55:45 +00:00
Matthias Clasen
d4b7a78c54 Add a README in gtk/compose 2021-09-02 20:10:19 -04:00
Matthias Clasen
a45cbad553 Merge branch 'wip/smcv/transparent-is-transparent' into 'master'
reftest-compare: Treat colour channels as undefined if alpha is zero

Closes #4227

See merge request GNOME/gtk!3914
2021-09-02 22:19:27 +00:00
Simon McVittie
16b9a30655 reftest-compare: Treat colour channels as undefined if alpha is zero
If the alpha channel is zero, it doesn't matter what the values of the
red, green and blue channels are: the pixel is still fully transparent.
On most architectures, fully transparent pixels end up all-zeroes
(fully transparent black), matching what's in the reference PNG file;
but on mips*el the blend-difference and blend-normal tests get all-ones
(fully transparent white) and a test failure.

Resolves: https://gitlab.gnome.org/GNOME/gtk/-/issues/4227
Signed-off-by: Simon McVittie <smcv@debian.org>
2021-09-02 22:34:48 +01:00
Jiri Grönroos
82a184a7b7 Update Finnish translation
(cherry picked from commit 33a4ae12ef)
2021-09-02 16:06:57 +00:00
Aurimas Černius
9e198a59b6 Updated Lithuanian translation 2021-09-02 13:51:39 +03:00
Matthias Clasen
c002678085 Merge branch 'fix-gst-subproject' into 'master'
media: Check for gstreamer verion instead of using cc.links()

See merge request GNOME/gtk!3910
2021-09-02 01:33:06 +00:00
Matthias Clasen
486cffc361 Merge branch 'hint-metrics-setting' into 'master'
Add a gtk-hint-font-metrics setting

See merge request GNOME/gtk!3912
2021-09-01 23:15:50 +00:00
Matthias Clasen
67495fcc77 Update settings tests
We have a new setting, so the test that is counting
settings needs an update.
2021-09-01 17:16:08 -04:00
Matthias Clasen
b26a370ce4 Add a gtk-hint-font-metrics setting
This lets people switch back to font rendering that is closer
to what GTK 3 does. It is not perfect - subpixel antialiasing
is not going to work. But it give us an Escape hatch while
we shake out the bugs in our linear layout.

Related: #3787
2021-09-01 15:52:07 -04:00
Matthias Clasen
4dc0e67ac7 Merge branch 'color-glyph-info' into 'master'
Use color glyph information from Pango

See merge request GNOME/gtk!3909
2021-09-01 16:59:38 +00:00
Xavier Claessens
2c060663cf media: Check for gstreamer verion instead of using cc.links()
This fix error when gstgl_dep comes from a subproject because in that
case it cannot be used in compiler checks.
2021-09-01 12:04:05 -04:00
Matthias Clasen
76a8eb4960 Merge branch 'matthiasc/for-master' into 'master'
Initial support for new Pango attributes

See merge request GNOME/gtk!3911
2021-09-01 15:06:26 +00:00
Matthias Clasen
ad3dad1965 Initial support for new Pango attributes
This is still missing the GtkTextTag hookup,
but it fixes the build.
2021-09-01 10:32:45 -04:00
Danial Behzadi
172d97de05 Update Persian translation 2021-09-01 09:42:39 +00:00
Daniel Mustieles
4c967d5b45 Updated Spanish translation 2021-09-01 11:02:13 +02:00
Matthias Clasen
b244f31337 Use color glyph information from Pango
Pango now sets a bit in PangoGlyphVisAttr for
color glyphs, so we don't need to do that
ourselves anymore.
2021-09-01 01:47:06 -04:00
Nathan Follens
8550a04bf4 Update Dutch translation
(cherry picked from commit 9aa08dd1b8)
2021-08-31 15:55:14 +00:00
eshagh shahidani
cb38ead48e Update Persian translation
(cherry picked from commit 7691c94a37)
2021-08-31 14:42:34 +00:00
Matthias Clasen
9713c3394d Merge branch 'matthiasc/for-master' into 'master'
editable: Clarify the docs

See merge request GNOME/gtk!3906
2021-08-31 13:15:47 +00:00
Matthias Clasen
fa57b006c9 editable: Clarify the docs
Make it clear that your class must have all the editable properties
already before you call the (confusingly named) function
gtk_editable_install_properties.
2021-08-31 08:41:45 -04:00
Matthias Clasen
9f73f0234a Merge branch 'default-settings-non-debug' into 'master'
Revert "reftests: Enforce default settings"

See merge request GNOME/gtk!3903
2021-08-30 18:09:28 +00:00
Matthias Clasen
a4f067481c gdk: Make GDK_DEBUG=default-settings unconditional
Our tests use this settings, so we should respect it
in non-debug builds as well.
2021-08-30 11:01:55 -04:00