app, app/internal: [wasm,android] new Option to change navigation/status color

Signed-off-by: Inkeliz <inkeliz@inkeliz.com>
This commit is contained in:
Inkeliz
2021-04-18 08:22:41 +01:00
committed by Elias Naur
parent 2296c80d28
commit 9dae29844c
5 changed files with 158 additions and 15 deletions
+15
View File
@@ -6,6 +6,7 @@ import (
"errors"
"fmt"
"image"
"image/color"
"time"
"gioui.org/io/event"
@@ -525,4 +526,18 @@ func MinSize(w, h unit.Value) Option {
}
}
// StatusColor sets the color of the Android status bar.
func StatusColor(color color.NRGBA) Option {
return func(opts *wm.Options) {
opts.StatusColor = &color
}
}
// NavigationColor sets the color of the navigation bar on Android, or the address bar in browsers.
func NavigationColor(color color.NRGBA) Option {
return func(opts *wm.Options) {
opts.NavigationColor = &color
}
}
func (driverEvent) ImplementsEvent() {}