outlay: add rigid rows layout
This commit adds a new layout primitive that acts like a multi-column flexed
layout with only rigid children.
Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
explorer: add multi-file import for Windows
Intorduce the ability to import multiple files at once on Windows.
The selected file paths are split by null characters and the directory
is appended to each filename. If any file fails to open, all opened
files are closed and the error is returned.
Signed-off-by: Lajos Koszti <ajnasz@ajnasz.hu>
outlay: update grid to new scroll API
This commit makes the Grid layout compatible with the new ScrollRange API on
gesture.Scroll upstream.
Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
component: fix textfield animation state
This commit fixes a state bug in the textfield. If the textfield had text set
*and* received focus on the first frame, it would accidentally skip over the
logic that would transition the label into a header. While here, I eliminated
several expensive calls to Editor.Len().
Fixes: https://todo.sr.ht/~eliasnaur/gio/586
Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
explorer: [Android,iOS,macOS] fix view event handling
This commit fixes a build-time issue from the conversion of app.ViewEvent to
an interface on these platforms.
Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
go.*,richtext: update to gio v0.6.0
This commit bumps the dependency and fixes the richtext example using that API.
Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
explorer: Ensure the ChooseFile API returns in WASM when no file is selected
Current implementation relies on change event callback to return. However, if no file is selected, there is no change. Hence, it should also listen to the cancel event (see https://stackoverflow.com/a/76926836).
Signed-off-by: Siva Dirisala <siva.dirisala@gmail.com>
explorer: make CreateFile API work for WASM
Earlier js.CopyBytesToJS(value, b) was used on a blank destination array. As per go docs, it copies as many bytes as min of source and destination array length, hence 0 bytes. To fix this, we just store the bytes of each Write call separately and use the Blob's feature of assembling it via parts.
Signed-off-by: Siva Dirisala <siva.dirisala@gmail.com>
colorpicker: [API] update to event filtering API
This commit updates the colorpicker to process events using the new event filters
API and also renames colorpicker.State.Layout to colorpicker.State.Update. This
method now returns whether the colorpicker's color may have changed as a result of
user input. The Changed method has been deleted as unnecessary. Note that previously,
Changed would return true if the color was changed by a setter method, but now
Update only returns true if event processing changed the color.
Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
richtext: [API] update to new upstream APIs
This commit makes package richtext compatible with the new usptream event
filtering while also updating the richtext API with separate Update and Layout
events. Like all Update() methods, the text ones must be invoked in a loop until
they indicate no remaining events for the current frame.
Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>