Commit d58b545f fixed a double counting of value size, but didn't check
whether that actually looked great. It doesn't.
Because the slider has negative margins, we need to add margin to the
value if it's on a side with no marks. If it is on a side with marks,
the scale will make it touch the marks. We therefore apply a mark's size
of margin to have the value be in the same place, with or without marks.
The texture ID is not deleted on dmabuf export; a copy is made, the
GskGpuImage retains ownership.
However when doing GL export, the texture *does* take ownership, so we
need the stealing semantics for that case.
We do this because:
a) The parent class (GdkGLContext) already stores the paint regions of
previous frames, no need to do the same.
b) The painted region passed to end_frame () includes the backbuffer's
damage region, so it's not really what we want.
This also fixes a leak of cairo_region_t that I introduced by mistake
in !7418
The measured size of the range already includes borders that the scale
calculates. This includes the drawn value. So in the measurement of
scale, the size of the value shouldn't just be added to the size of the
scale, as then the size is effectively added twice.
To fix this, we first measure the minimum size of the range. Then, we
determine the minimum size of our scale. Only then do we set the minimum
size to maximum of those two values.
If both marks are set on top, and the value is drawn on top, the value
should be drawn outside the marks for a horizontal scale.
Currently, that order is incorrect, with the marks shifted up and the
value drawn between the slider and the marks.
This fixes that order.
We can get the position of the trough from the parent GtkRange class,
and can therefore align directly to that. There is no need to add
symmetry, which can always be added in CSS if needed.
Fixes#5171, #6639
This only makes the value allocation logic easier to understand, but
doesn't change anything, apart from not mixing integer and floating
operations anymore which can give a warning under some compiler
settings.
This reverts commit 2799632c02, reversing
changes made to 154035e76f.
That MR tried to fix#5171, but by doing a forced symmetry it introduced
another issue for users on Libadwaita, see #6639.
The logic can be much simplified, as the next commits show.
CI is hitting various limits after we started out with 32. In
particular, the default runners hit 90s test timeouts.
And the asan runner runs into max threads limits, so reduce that one to
4 tests max.
This is a test balloon tests that use /dev/udmabuf to produce
dmabufs that we can use in ci, even if we don't have a GPU.
Currently, the tests we can do are somewhat limited, since mesas
software renderers don't support dmabufs yet.
Instead of every test spawning their own dbus, make the tests share the
same server, just like they share their own compositor.
This should speed up things a bit and avoid weird interactions when
multiple dbus processes exist.
There are spurious failures happening in CI runs and I blame those on
too many processes running at the same time overloading either the
compositor we're running against, or causing OOM situations or just
genereally slowing things down and hitting timeout limits.
The choice of 32 is rather arbitrary. I just picked a number that felt
good.
We write a debug message and then handle things using fallback.
Fixes error messages when trying to import incompatible dmabufs.
(in my case: llvmpipe dmabufs into radv)
The value of `gtk-font-rendering` currently can't be specified
in "settings.ini", as the parser doesn't handle enums.
Allow reading values by enum nicknames.
Also cleanup obsolete references to rc files.
The non-shared context's surface must survive the lifetime of the
GL texture, and when the renderer gets unrealized the surface goes away,
but we cannot guarantee that all GL textures have been destroyed by
then.
So better use a context we know will survive becuase it isn't bound to a
surface.
This is the same fix for NGL as f3ac0535f8
was for GL.