Found by running and debugging the Linux build on a virtual display: - impl_linux.go: set fontSize (16, like Darwin). It was only defined for the Android and Darwin builds, so on Linux every label and button was rendered at size zero (all text invisible). - ui.go: extend the Button click area to the full button width, not just the label width. Short labels (e.g. a few characters in a full-width list row) had a tiny tap target that was easy to miss. - main.go: set Color: black on the insert-page buttons (<, >, generate, @, #). A zero-value NRGBA has A=0 (transparent), so their labels were invisible even though the buttons worked. - main.go: gofmt (modern operator spacing).
34 lines
512 B
Go
34 lines
512 B
Go
//go:build linux && !android
|
|
|
|
package main
|
|
|
|
import (
|
|
"os"
|
|
|
|
"gioui.org/app"
|
|
)
|
|
|
|
var (
|
|
noidLabelText = "No GPG ids available"
|
|
)
|
|
|
|
func init() {
|
|
fontSize = 16
|
|
}
|
|
|
|
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
|
|
}
|