Before this change, a radio button with the empty key ("") would be
displayed as hovering if no other button were.
It's still not possible to have no radio buttons selected when one of
them is the empty key. If that's becomes necessary, Enum.Value can be
converted to a *string.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
checkable.layout forces the label to take up at least constraints.min
space. However, for min == max, the total checkbox plus label would then
overflow. The minimum constraint doesn't seem necessary anymore, so drop
it.
Remove a superfluous layout.W layout as well.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
The Windows tests on builds.sr.ht are still flaky:
TestEndToEnd/Windows: e2e_test.go:130: retrying after 400ms
TestEndToEnd/Windows: e2e_test.go:130: retrying after 800ms
TestEndToEnd/Windows: e2e_test.go:130: retrying after 1.6s
TestEndToEnd/Windows: e2e_test.go:130: retrying after 2s
TestEndToEnd/Windows: e2e_test.go:130: last error: encountered 6 color mismatches:
5,5 got 0xffffffffffff, want 0xffff00000000
395,5 got 0xffffffffffff, want 0xffff00000000
5,305 got 0xffff00000000, want 0x000000000000
395,305 got 0xffff00000000, want 0x000000000000
405,305 got 0xffffffffffff, want 0xffff00000000
795,305 got 0xffffffffffff, want 0xffff00000000
TestEndToEnd/Windows: e2e_test.go:130: hit timeout of 4s after 6 tries
Bump the window movement delay in the hope that it helps.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
For example, ButtonLeft may be the right-most button for a left-handed user.
Rename the button names to match their intended use.
This is an API change. Use the following commands to update your
projects:
$ gofmt -r 'pointer.ButtonLeft -> pointer.ButtonPrimary' -w .
$ gofmt -r 'pointer.ButtonRight -> pointer.ButtonSecondary' -w .
$ gofmt -r 'pointer.ButtonMiddle -> pointer.ButtonTertiary' -w .
Signed-off-by: Elias Naur <mail@eliasnaur.com>
A previous commit removed the assumption that the output framebuffer
is constant across frames. Thus it is no longer necessary to track
and update a backend's current framebuffer when the window is resized.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
Return the output framebuffer from BeginFrame, to make it clear that
it may change between frames. Delete CurrentFramebuffer which is no
longer needed.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
d3d11Context.Present would return a nil error if the underlying error
d3d11.ErrorCode.
While here, use defer for a resource cleanup.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
Currently every user needs to manually adjust for system insets.
This is rather verbose and most don't need to deviate from this behavior.
To disable the automatic adjustment, use:
e.Insets = system.Insets{}
ctx := layout.NewContext(ops, e)
Signed-off-by: Egon Elbre <egonelbre@gmail.com>
Commit 94d242d broke the widget.Image's Scale field so
that it no longer had any effect on the actual size of
the displayed image. This commit fixes that, as well as
adding tests to confirm that the widget.Image type
scales appropriately with DPI changes and its own Scale
field.
Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
Use dxc (DirectXShaderCompiler) for compiling, which is newer than fxc
and doesn't not fail compilation with dynamically uniform flows with
barriers.
Currently requires -directcompute to enable generating the shaders.
Signed-off-by: Egon Elbre <egonelbre@gmail.com>
That change makes possible to provide custom PKCS#12 (JKS/PFX) using `-signkey` and the password with `-signpass`.
By default the gogio will use the `debug.keystore`, if no key is provided.
Signed-off-by: Inkeliz <inkeliz@inkeliz.com>
Previously that patch, gogio unzip the `link.apk` (generated by AAPT2) to an temporary folder and then compress it again to a new `app.ap_` file.
For some unknown reason, that unzip-then-zip doesn't work. The resources are included but is corrupted in somehow. That PR aims to fix that by avoid the extraction to an temporary folder.
Signed-off-by: Inkeliz <inkeliz@inkeliz.com>
The Wayland protocol implicitly dup(2)s the pipe write end descriptor passed to
wl_data_offer_receive. As long as we also have an open descriptor for the write
end, the pipe will not close and signal the completion of the clipboard read.
This change explicitly and immediately closes our write descriptor. Before this
change, reading the Wayland clipboard worked with some delay because the Go
garbage collector closed the write end of the transfer pipe after some time.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
We're about to change the last stage of the compute pipeline to only
accept images, not sampled textures. This change prepares materials
for pixel-aligned image copying by pre-rendering images to a texture,
applying transforms.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
The webassembly port changed to use transparent black to allow content
below Gio to show through. However, the end-to-end tests expect a white
background.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
EGL_PLATFORM=surfaceless allows rendering tests to complete in headless
mode. However, the headless chrome tests fail with that setting. Change
the linux builder to only set the variable when needed.
Enable verbose output of tests while here. We can keep an eye on skipped
tests that way.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
A recent change to the native toolchain or system on the builder infrastructure
made the arguments for the apple cross compiler needed always, not just in
CGO_CFLAGS and CGO_LDFLAGS.
Remove them altogether and rely on a recent change to the giouiorg repository
for including them in the clang-ios and clang-macos wrappers.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
The order of subtraction when calculating f.pos from value was wrong,
so setting a minimum value for a Float never really worked, although
min = 0 worked as intended which is why this probably went unnoticed.
Signed-off-by: vsariola <5684185+vsariola@users.noreply.github.com>
The README is deliberately light; we want users to use the gioui.org site for
resources, not the site that happens to host the project Git repository.
Signed-off-by: Elias Naur <mail@eliasnaur.com>