mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-11-01 00:03:53 +08:00
1 parent
2abc0b878c
commit
d5533841c0
5 files changed
+43
-30
No files matched your search
@@ -1214,8 +1214,8 @@ func windowOptions(dataDir string) (guigo.Options, error) {
|
||||
return guigo.Options{}, err
|
||||
}
|
||||
material := guigo.TitleBarSolid
|
||||
if guigo.SupportsTitleBarMaterial(guigo.TitleBarMica) {
|
||||
material = guigo.TitleBarMica
|
||||
if guigo.SupportsTitleBarMaterial(guigo.TitleBarAcrylic) {
|
||||
material = guigo.TitleBarAcrylic
|
||||
}
|
||||
return guigo.Options{
|
||||
AppID: appID,
|
||||
|
||||
@@ -49,7 +49,7 @@ func themeColors(dark bool) guigo.TitleBarColors {
|
||||
// loadTheme 在创建窗口前读取用户目录中的主题偏好
|
||||
// 返回: error 读取或解析错误
|
||||
func (h *Host) loadTheme() error {
|
||||
h.theme = applicationTheme{Mode: "system", Material: "mica"}
|
||||
h.theme = applicationTheme{Mode: "system", Material: "acrylic"}
|
||||
data, err := os.ReadFile(h.themePath)
|
||||
if os.IsNotExist(err) {
|
||||
return nil
|
||||
@@ -92,7 +92,7 @@ func (h *Host) themeIndex() ([]byte, error) {
|
||||
mode = "system"
|
||||
}
|
||||
materials := []string{"solid"}
|
||||
for _, choice := range []string{"mica", "acrylic"} {
|
||||
for _, choice := range []string{"acrylic", "mica"} {
|
||||
if titleBarMaterial(choice) != guigo.TitleBarSolid {
|
||||
materials = append(materials, choice)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user