mirror of
https://github.com/AynaLivePlayer/AynaLivePlayer.git
synced 2025-12-07 19:02:50 +08:00
change config UseSystemFonts to CustomFonts, allow user to specify which font to use
This commit is contained in:
@@ -35,8 +35,8 @@ func Initialize() {
|
|||||||
logger = global.Logger.WithPrefix("GUI")
|
logger = global.Logger.WithPrefix("GUI")
|
||||||
black_magic()
|
black_magic()
|
||||||
logger.Info("Initializing GUI")
|
logger.Info("Initializing GUI")
|
||||||
if !config.General.UseSystemFonts {
|
if config.General.CustomFonts != "" {
|
||||||
_ = os.Setenv("FYNE_FONT", config.GetAssetPath("msyh.ttc"))
|
_ = os.Setenv("FYNE_FONT", config.GetAssetPath(config.General.CustomFonts))
|
||||||
}
|
}
|
||||||
App = app.NewWithID(config.ProgramName)
|
App = app.NewWithID(config.ProgramName)
|
||||||
//App.Settings().SetTheme(&myTheme{})
|
//App.Settings().SetTheme(&myTheme{})
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ type _GeneralConfig struct {
|
|||||||
PlayNextOnFail bool
|
PlayNextOnFail bool
|
||||||
UseSystemPlaylist bool
|
UseSystemPlaylist bool
|
||||||
FixedSize bool
|
FixedSize bool
|
||||||
EnableSMC bool // enable system media control
|
EnableSMC bool // enable system media control
|
||||||
UseSystemFonts bool // using system fonts
|
CustomFonts string // use custom fonts, under ./assets file
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -31,5 +31,5 @@ var General = &_GeneralConfig{
|
|||||||
UseSystemPlaylist: true,
|
UseSystemPlaylist: true,
|
||||||
FixedSize: true,
|
FixedSize: true,
|
||||||
EnableSMC: true,
|
EnableSMC: true,
|
||||||
UseSystemFonts: true,
|
CustomFonts: "",
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user