mirror of
https://github.com/AynaLivePlayer/AynaLivePlayer.git
synced 2025-12-06 10:22: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")
|
||||
black_magic()
|
||||
logger.Info("Initializing GUI")
|
||||
if !config.General.UseSystemFonts {
|
||||
_ = os.Setenv("FYNE_FONT", config.GetAssetPath("msyh.ttc"))
|
||||
if config.General.CustomFonts != "" {
|
||||
_ = os.Setenv("FYNE_FONT", config.GetAssetPath(config.General.CustomFonts))
|
||||
}
|
||||
App = app.NewWithID(config.ProgramName)
|
||||
//App.Settings().SetTheme(&myTheme{})
|
||||
|
||||
@@ -11,8 +11,8 @@ type _GeneralConfig struct {
|
||||
PlayNextOnFail bool
|
||||
UseSystemPlaylist bool
|
||||
FixedSize bool
|
||||
EnableSMC bool // enable system media control
|
||||
UseSystemFonts bool // using system fonts
|
||||
EnableSMC bool // enable system media control
|
||||
CustomFonts string // use custom fonts, under ./assets file
|
||||
|
||||
}
|
||||
|
||||
@@ -31,5 +31,5 @@ var General = &_GeneralConfig{
|
||||
UseSystemPlaylist: true,
|
||||
FixedSize: true,
|
||||
EnableSMC: true,
|
||||
UseSystemFonts: true,
|
||||
CustomFonts: "",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user