Commit Graph

72699 Commits

Author SHA1 Message Date
Kukuh Syafaat
09453bc60b Update Indonesian translation 2022-03-23 13:46:25 +00:00
Matthias Clasen
f76b749e43 Merge branch 'fix-popover-menu-rtl-position' into 'main'
popover-menu: Fix buttons' position in RTL

See merge request GNOME/gtk!4587
2022-03-23 02:16:41 +00:00
Cheng-Chia Tseng
0aca2a03b4 Update Chinese (Taiwan) translation 2022-03-22 14:47:50 +00:00
Matthias Clasen
fd358990a2 Merge branch 'wip/chergert/reduce-overlay-overhead' into 'main'
Default: avoid use of opacity for overlay scrollbars

See merge request GNOME/gtk!4590
2022-03-22 13:27:54 +00:00
Matthias Clasen
01b91c1ba3 Merge branch 'fix-high-depth-switch' into 'main'
surface: Use correct display when destroying a surface for depth switch

Closes #4773

See merge request GNOME/gtk!4591
2022-03-22 12:58:07 +00:00
Sebastian Keller
cc02076b75 surface: Use correct display when destroying a surface for depth switch
When surface depth switches from non-high-depth to high-depth (or vice
versa) the current surface has to be destroyed before a new one can be
created for this window. eglDestroySurface however was getting passed a
GdkDisplay, rather than the EGLDisplay it expects. As a result the old
surface did not get destroyed and the new surface could not be created
causing rendering to freeze.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4773
2022-03-22 08:18:26 +01:00
Christian Hergert
b726a2d902 Default: avoid use of opacity for overlay scrollbars
If using the opacity CSS property the renderer cannot optimize these
handles without the use of offscreens due to the use of both a border
and rgb render node.

Instead, we can apply the alpha to the color values and get the same
effect in a way that the GL renderer can optimize without the use of
offscreen textures for a sizeable reduction in runtime overhead.
2022-03-21 22:10:23 -07:00
Marek Černocký
654ae5928a Updated Czech translation 2022-03-21 14:57:35 +01:00
Marek Černocký
1c24514798 Updated Czech translation 2022-03-21 12:14:36 +01:00
Yosef Or Boczko
33f3ab9991 popover-menu: Fix buttons' position in RTL
The radio/check/previous buttons shows in
the wrong place in RTL. Fix it.

#4641

Signed-off-by: Yosef Or Boczko <yoseforb@gmail.com>
2022-03-20 00:54:26 +02:00
aneejit1
91511a80ac Check for 'rst2man' misses installed 'rst2man.py' (#4728)
By default, 'docutils' installs 'rst2man' as 'rst2man.py'. Amend the
check for 'rst2man' to look for 'rst2man.py' as well if 'rst2man' is
not found.
2022-03-19 13:58:40 +00:00
Philipp Kiemle
a585457861 Update German translation
(cherry picked from commit d9c39f6795)
2022-03-19 12:32:43 +00:00
Carlos Garnacho
4a0ddac307 Merge branch 'wip/carlosg/fix-accumulated-velocity' into 'main'
kinetic scroll fixes

See merge request GNOME/gtk!4572
2022-03-19 12:02:56 +00:00
Carlos Garnacho
f7d9ede82d gtkkineticscrolling: Do not take distance based shortcuts
The pixel distance could be small enough between tick() calls that
this kind of checks might potentially become a problem. Rely only on
the calculated velocity to trigger the STOPPED phase, and use a lower
threshold to avoid cutting the animation too early.

Related: https://gitlab.gnome.org/GNOME/gtk/-/issues/4725
2022-03-19 12:35:11 +01:00
Carlos Garnacho
65839f67f8 gtkscrolledwindow: Do not trigger kinetic helpers on 0 velocity
Doing this is pointless, so it could be skipped.
2022-03-19 12:35:11 +01:00
Carlos Garnacho
df40db137b gtkscrolledwindow: Change lifetime of kinetic scroll helpers
In order to properly accumulate scroll velocities, we need to keep
the kinetic scroll helpers after we have possibly stopped them
in the process of initiating a further scroll flick.

So, instead of stopping (and destroying) those helpers on scroll-begin,
keep them until the next scroll-end if a scroll was initiated before
kinetic scroll finished. This way we can fetch the last velocity when
calculating the extra kick.

In order to ensure the helpers don't live beyond what it is expected,
we now also remove them after a finished hold event.

Fixes the accumulation of scrolling velocity on consecutive scroll
sequences.
2022-03-19 12:35:11 +01:00
Carlos Garnacho
129bc27d53 gtkscrolledwindow: Refactor kinetic scroll animation
Do not depend on the kinetic scroll helpers existing or not before
exiting the animation, as we may want to keep those a little bit
longer after stopped.
2022-03-19 12:35:11 +01:00
Carlos Garnacho
274e2b221f gtkkineticscroll: Do not reset velocity after stop()
We may want to fetch the last velocity obtained, even though we
preemptively called stop() on a kinetic scroll helper. Keep this
velocity so it can be queried later on.
2022-03-19 12:35:11 +01:00
Emmanuele Bassi
adc4009354 Merge branch 'search-delay-versions' into 'main'
Fix GtkSearchEntry:search-delay docs

See merge request GNOME/gtk!4585
2022-03-19 10:14:04 +00:00
Sebastian Dröge
f058a42bd3 Add version marker to GtkSearchEntry:search-delay property 2022-03-19 11:56:05 +02:00
Sebastian Dröge
3a8cb276e7 Fix typo in gtk_search_entry_set_search_delay() docs causing it to not show up 2022-03-19 11:55:03 +02:00
Matthias Clasen
eeaa73c12a Merge branch 'macos-fix-scroll-unit-build' into 'main'
macos: fix scroll-unit build

See merge request GNOME/gtk!4584
2022-03-19 03:57:48 +00:00
panoplie
3873861b27 macos: fix scroll-unit build 2022-03-19 02:55:02 +01:00
Carlos Garnacho
8e455e333b Merge branch 'scroll-unit' into 'main'
GdkScrollEvent: indicate the delta unit with a new GdkScrollUnit enum

See merge request GNOME/gtk!4508
2022-03-19 00:47:08 +00:00
Matthias Clasen
3d10e6c3d1 Merge branch 'wip/carlosg/rewritten-events-from-other-toplevels' into 'main'
gtk/main: Make coords out of surface when rewriting events for grabs

Closes #4760

See merge request GNOME/gtk!4566
2022-03-19 00:34:17 +00:00
Matthias Clasen
dcc7cf7114 Merge branch 'wip/chergert/gsk-gl-texture-library' into 'main'
gsk/gl: texture libraries, shader creation

See merge request GNOME/gtk!4583
2022-03-18 23:46:17 +00:00
panoplie
f1d0886087 gtkeventcontrollerscroll: Map surface scroll unit in discrete steps 2022-03-19 00:41:26 +01:00
panoplie
951e4ee6b2 recorder: Show scroll events deltas unit 2022-03-19 00:41:26 +01:00
panoplie
f9e2c106bc gtkrange: Add scroll unit handling 2022-03-19 00:41:26 +01:00
panoplie
53956e5389 gtkscrolledwindow: Add scroll unit handling
On the "scroll" signal, the widget uses
gtk_event_controller_scroll_get_unit() to get the
scroll unit.

When the unit is GDK_SCROLL_UNIT_WHEEL, the
behavior is unchanged: the widget scrolls a
certain number of pixels at each wheel detent
click. This number of pixels is determined by the
window dimensions in get_wheel_detent_scroll_step().

When the delta unit is GDK_SCROLL_UNIT_SURFACE, the
widget directly adds the delta to the number of
scrolled pixels no matter the window dimensions.
2022-03-19 00:41:26 +01:00
panoplie
3ab63fd03b gtkeventcontrollerscroll: Add scroll unit getter
The scroll unit is accessible through
gtk_event_controller_scroll_get_unit() after the
"scroll" signal reception.
2022-03-19 00:41:26 +01:00
panoplie
fb4927827b gdk: Add enum to indicate the unit of scroll deltas
Add a new GdkScrollUnit enum that represent the
unit of scroll deltas provided by GdkScrollEvent.
The unit is accessible through
gdk_scroll_event_get_unit().
2022-03-19 00:41:26 +01:00
Christian Hergert
cbbca38d88 gsk/gl: use consistent library naming 2022-03-18 14:59:49 -07:00
Christian Hergert
c64836e1c9 gsk/gl: make texture libraries more autonomous
This moves a lot of the texture atlas control out of the driver and into
the various texture libraries through their base GskGLTextureLibrary class.

Additionally, this gives more control to libraries on allocating which can
be necessary for some tooling such as future Glyphy integration.

As part of this, the 1x1 pixel initialization is moved to the Glyph library
which is the only place where it is actually needed.

The compact vfunc now is responsible for compaction and it allows for us
to iterate the atlas hashtable a single time instead of twice as we were
doing previously.

The init_atlas vfunc is used to do per-library initialization such as
adding a 1x1 pixel in the Glyph cache used for coloring lines.

The allocate vfunc purely allocates but does no upload. This can be useful
for situations where a library wants to reuse the allocator from the
base class but does not want to actually insert a key/value entry. The
glyph library uses this for it's 1x1 pixel.

In the future, we will also likely want to decouple the rectangle packing
implementation from the atlas structure, or at least move it into a union
so that we do not allocate unused memory for alternate allocators.
2022-03-18 14:59:46 -07:00
Christian Hergert
6b23fe3aa7 gsk/gl: pin atlases to single texture library
This removes the sharing of atlases across various texture libraries. Doing
so is necessary so that atlases can have different semantics for how they
allocate within the texture as well as potentially allowing for different
formats of texture data.

For example, in the future we might store non-pixel data in the textures
such as Glyphy or even keep glyphs with color content separate from glyphs
which do not and can use alpha channel only.
2022-03-18 12:48:43 -07:00
Christian Hergert
9defc7fc64 gsk/gl: add more control over shader generation
This allows the gskglprograms.defs a bit more control over how a shader
will get generated and if it needs to combine sources. Currently, none of
the built-in shaders do that, but upcoming shaders which come from external
libraries will need the ability to inject additional sources in-between
layers.
2022-03-18 12:34:32 -07:00
Christian Hergert
9d56f44cdf gsk/gl: rename glyphs to glyphs_library
This naming style is less likely to collide with shader naming and makes
it clear where it is consumed what it is.
2022-03-18 12:34:32 -07:00
Christian Hergert
1b9da2bb17 gsk/gl: allow configuring atlas size 2022-03-18 12:34:27 -07:00
Christian Hergert
2efc1729e2 gsk/gl: check for format as well
This could potentially happen if a uniform had never been set.
2022-03-18 12:33:33 -07:00
Christian Hergert
a66a0dde81 gsk/gl: only clear glyph cache durign reclaimation
We don't need to clear the front cache on every frame as we can clear it
specifically when we do reclaimation to avoid unnecessary memset() calls.
2022-03-18 12:33:33 -07:00
Christian Hergert
7062411bad gsk/gl: ignore max_entry_size when zero
If the max_entry_size is zero, then assume we can add anything to the
atlas. This allows for situations where we might be uploading an arc list
to the atlas instead of pixel data for GPU font rendering.
2022-03-18 12:33:33 -07:00
Christian Hergert
9dbd137ec8 gsk/gl: make max-frame-age configurable
This is nice for some texture libraries that we might want to keep around
for longer than say 60 frames such as a glyph cache.
2022-03-18 12:33:33 -07:00
Matthias Clasen
79fad9f221 gtk-demo: Don't hardcode a title font
We want a large font size, but we don't have to
hardcode Sans.
2022-03-18 12:33:33 -07:00
Matthias Clasen
8f9ee48aaa Merge branch 'filefilter-suffixes' into 'main'
filefilter: Fix <suffixes> in buildable

See merge request GNOME/gtk!4581
2022-03-17 16:57:09 +00:00
James Westman
8eb9844a45
filefilter: Fix <suffixes> in buildable
A bug in GtkFileFilter's GtkBuildable implementation caused the
<suffixes> tag not to be recognized.
2022-03-17 10:52:20 -05:00
Milo Casagrande
b90132c917 Update Italian translation
(cherry picked from commit 3e4bfa2bae)
2022-03-17 08:36:13 +00:00
Milo Casagrande
23806b7788 Update Italian translation
(cherry picked from commit 9bbf09fb0a)
2022-03-17 08:34:32 +00:00
Мирослав Николић
d266c0d105 Update Serbian translation
(cherry picked from commit c874f65d95)
2022-03-17 06:04:41 +00:00
Carlos Garnacho
581461c2b5 Merge branch 'wip/carlosg/im-wayland-serials' into 'main'
gtk/imwayland: Use serial to control outbound messages

Closes #3641

See merge request GNOME/gtk!4398
2022-03-16 18:52:24 +00:00
Carlos Garnacho
f108f053d4 gtk/imwayland: Use serial to control outbound messages
Following the text-input protocol changes at
https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/115,
use the serial number to have the client push changes to the
zwp_text_input_v3 object only after compositor/client states match.

This specifically is more lenient to compositors pushing multiple
.done events ahead of the client replying to them.

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3641
2022-03-16 17:38:14 +01:00