Add aluminum style
This commit is contained in:
@@ -5,12 +5,22 @@ import "os"
|
||||
import "log"
|
||||
import "git.tebibyte.media/tomo/backend/x"
|
||||
import "git.tebibyte.media/tomo/tomo"
|
||||
import dataTheme "git.tebibyte.media/tomo/nasin/internal/theme"
|
||||
import "git.tebibyte.media/tomo/nasin/internal/theme/icons/xdg"
|
||||
import "git.tebibyte.media/tomo/nasin/internal/theme/icons/fallback"
|
||||
import "git.tebibyte.media/tomo/nasin/internal/theme/style/fallback"
|
||||
import "git.tebibyte.media/tomo/nasin/internal/theme/style/aluminum"
|
||||
|
||||
func Init () error {
|
||||
theme := fallbackStyle.New()
|
||||
var theme *dataTheme.Theme
|
||||
// TODO eventually get rid of this when we make a file format for
|
||||
// storing visual styles
|
||||
if os.Getenv("TOMO_USE_ALUMINUM_STYLE") != "" {
|
||||
theme = aluminumStyle.New()
|
||||
} else {
|
||||
theme = fallbackStyle.New()
|
||||
}
|
||||
theme.IconTheme = fallbackIcons.New()
|
||||
|
||||
iconThemeName := os.Getenv("TOMO_XDG_ICON_THEME")
|
||||
if iconThemeName != "" {
|
||||
@@ -21,10 +31,6 @@ func Init () error {
|
||||
log.Printf("nasin: could not load icon theme '%s': %v", iconThemeName, err)
|
||||
}
|
||||
}
|
||||
|
||||
if theme.IconTheme == nil {
|
||||
theme.IconTheme = fallbackIcons.New()
|
||||
}
|
||||
|
||||
tomo.SetTheme(theme)
|
||||
tomo.Register(1, x.New)
|
||||
|
||||
Reference in New Issue
Block a user