Update registrar code

This commit is contained in:
Sasha Koshka 2024-07-25 17:48:47 -04:00
parent 5382f9e881
commit 6451050fd3
2 changed files with 29 additions and 8 deletions

View File

@ -5,11 +5,10 @@ import "os"
import "log"
import "git.tebibyte.media/tomo/tomo"
import "git.tebibyte.media/tomo/backend/x"
import "git.tebibyte.media/tomo/nasin/internal/style"
import "git.tebibyte.media/tomo/nasin/internal/icons/xdg"
import "git.tebibyte.media/tomo/nasin/internal/icons/fallback"
import "git.tebibyte.media/tomo/nasin/internal/style/fallback"
import "git.tebibyte.media/tomo/nasin/internal/style/aluminum"
// import "git.tebibyte.media/tomo/nasin/internal/style/aluminum"
func RegisterBackend () error {
tomo.Register(1, x.New)
@ -17,14 +16,15 @@ func RegisterBackend () error {
}
func SetTheme () error {
var styl *style.Style
var styl *tomo.Style
// TODO eventually get rid of this when we make a file format for
// storing visual styles
if os.Getenv("TOMO_USE_ALUMINUM_STYLE") != "" {
styl = aluminumStyle.New()
} else {
// TODO migrate aluminum
// if os.Getenv("TOMO_USE_ALUMINUM_STYLE") != "" {
// styl = aluminumStyle.New()
// } else {
styl = fallbackStyle.New()
}
// }
icons := fallbackIcons.New()
iconThemeName := os.Getenv("TOMO_XDG_ICON_THEME")
@ -38,6 +38,6 @@ func SetTheme () error {
}
tomo.SetStyle(styl)
tomo.SetIcons(icons)
tomo.SetIconSet(icons)
return nil
}

View File

@ -0,0 +1,21 @@
$colorBlack = #000000FF
$borderOutline = $black / 1
*.Slider {
Border: $borderOutline, $borderColorFocused / 1
Color: $colorGutter
Padding: 0 1 1 0
}
*.Slider[focused] {
Border: $borderOutline
Padding: 0
}
*.Slider[horizontal] {
MinimumSize: 48 0
}
*.Slider[vertical] {
MinimumSize: 0 48
}