outlay: multi list
The multi list allows easily building up a single "list" composed of
several list widgets.
Signed-off-by: Jack Mordaunt <jackmordaunt.dev@gmail.com>
outlay: conditional helpers
outlay.If can be used to conditionally layout a subwidget. It has flex
and stack helpers so it can be used in many common places.
Signed-off-by: Jack Mordaunt <jackmordaunt.dev@gmail.com>
pref/locale: [Linux] add fallback for C locale
Since C is a relatively common locale, but is not a language code, we should fall
back to English if the locale is C. This at least gives the caller a language to work
with instead of returning an error indicating language detection is unsupported.
Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
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>