- Event loop: call w.Event() and FrameEvent.Frame() on the same goroutine; no channel bridge (the bridge broke frame rendering). - clip: use clip.UniformRRect(...).Push(gtx.Ops) / Pop() for real clipping in layoutRRect (old .Add(ops) painted unclipped). - Window clear color is white in v0.10.2. - Fonts: always provide gofont; on Android use WithCollection(gofont.Collection()). - Button labels: explicitly set Color (zero-value NRGBA has A=0, i.e. transparent, so labels were invisible). - Filter: detect changes by comparing the editor text, since material.Editor.Layout consumes the editor's input events internally and a later FilterEd.Update(gtx) never sees them. - idPage: persist the manually entered ID with store.SetID (on Android nativeIdentities is unimplemented, so there are no id buttons to click). - Use U+2026 (gofont) instead of U+22EE (not in gofont) for the menu button. - Split getConfDir/noidLabelText out into impl_linux.go for the Linux build.
30 lines
480 B
Go
30 lines
480 B
Go
//go:build linux && !android
|
|
|
|
package main
|
|
|
|
import (
|
|
"os"
|
|
|
|
"gioui.org/app"
|
|
)
|
|
|
|
var (
|
|
noidLabelText = "No GPG ids available"
|
|
)
|
|
|
|
func getConfDir() (string, error) {
|
|
ret, err := app.DataDir()
|
|
if err != nil {
|
|
log(Error, "Cannot get data directory:", err)
|
|
return "", err
|
|
}
|
|
if _, err := os.Stat(ret); os.IsNotExist(err) {
|
|
err = os.MkdirAll(ret, 0700)
|
|
if err != nil {
|
|
log(Error, "Cannot create configuration directory ", ret)
|
|
return "", err
|
|
}
|
|
}
|
|
return ret, nil
|
|
}
|