mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-31 22:04:06 +08:00
feat(界面设计): 默认窗口材质改为纯色
This commit is contained in:
1 parent
841020b881
commit
60f805fab4
3 files changed
+3
-7
No files matched your search
@@ -1213,16 +1213,12 @@ func windowOptions(dataDir string) (guigo.Options, error) {
|
||||
if err != nil {
|
||||
return guigo.Options{}, err
|
||||
}
|
||||
material := guigo.WindowSolid
|
||||
if guigo.SupportsWindowMaterial(guigo.WindowAcrylic) {
|
||||
material = guigo.WindowAcrylic
|
||||
}
|
||||
return guigo.Options{
|
||||
AppID: appID,
|
||||
Title: "OFDGo - OFD编辑器",
|
||||
TitleBar: guigo.TitleBarContent,
|
||||
TitleBarColors: themeColors(false),
|
||||
WindowMaterial: material,
|
||||
WindowMaterial: guigo.WindowSolid,
|
||||
Icon: icon,
|
||||
Width: 1440,
|
||||
Height: 900,
|
||||
|
||||
@@ -49,7 +49,7 @@ func themeColors(dark bool) guigo.TitleBarColors {
|
||||
// loadTheme 在创建窗口前读取用户目录中的主题偏好
|
||||
// 返回: error 读取或解析错误
|
||||
func (h *Host) loadTheme() error {
|
||||
h.theme = applicationTheme{Mode: "system", Material: "acrylic"}
|
||||
h.theme = applicationTheme{Mode: "system", Material: "solid"}
|
||||
data, err := os.ReadFile(h.themePath)
|
||||
if os.IsNotExist(err) {
|
||||
return nil
|
||||
|
||||
Reference in new issue
Block a user