Just like GtkInscription does since commit 883011f2. The layout offsets
are maintained as floats, and only converted to integers when exposing
them to callers.
With our current font rendering stack, subpixel positioning simply does
not look good on non-HiDPI displays compared to font hinting.
While we have a setting as a way to restore font hinting, it's fairly
clunky to use with sandboxed applications, since it requires injecting a
settings.ini file in every application's configuration directory, or
adding the user's own configuration directory into the sandbox.
As a workaround, we can check the scaling factor used by GTK, and only
enable subpixel positioning if the factor is greater than one.
If we don't set the alignment then there is a chance that it ends up
commonly on a 4-byte boundary and GResources will have to malloc/memcpy
the static data.
With --set-section-alignment (which takes a byte offset not ^2) available
in objcopy >= 2.33 we ensure that expectation is met.
To use markup label in menu items, when the menu item has a submenu.
Small additions to 'gtk/gtkmenusectionbox.c' to set the markup attribute
for menu items with submenus.
Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5946
The GtkFileDialog code was asserting that
we get exactly one file back. But the function
is nullable anyway, so lets just return NULL
if we don't have a file.
Fixes: #5975
If we have a non-zero Adjustment:page-size, the actual amount we draw is
reduced by that page-size. We account for this in various places, but we
did not when deciding how far to allocate the highlight widget, so we
were drawing the highlight not far enough, falling short of the value.
This fixes by subtracting the page-size from the drawn range here too.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5976
Instead of scale and whatnot, pass:
1. The image size
2. The viewport to map to that image size
and compute everything else from there.
In particular, we set the Vulkan viewport to the image dimensions
instead of the viewport size.
All of this makes things a lot simpler while keeping the required
functionality.
If people specify the filename, they should know what they're doing.
If they don't, abort if the guessed filename already exists and insist
on the user explicitly giving it.
As pointed out in #3417, there is a long-standing
difference in how GtkEntry and GtkTextView treat
Ctrl-Shift-Backspace (and other variations): GtkEntry
always operates on the selection first, if it exists.
GtkTextView only handled plain Backspace that way, and
ignores the selection for other variations.
There is no good reason for this difference, so just
remove it and make GtkTextView behave the same as
GtkEntry.
Fixes: #3417