mirror of
https://gitee.com/energye/energy.git
synced 2024-12-02 03:37:48 +08:00
U: 禁用主窗口配置, 系统托盘创建的父组件修改
This commit is contained in:
parent
506fc0dfed
commit
7a6bb8acd7
@ -1112,9 +1112,10 @@ func (m *LCLBrowserWindow) closeQuery(sender lcl.IObject, close *bool) {
|
||||
ret = m.onCloseQuery(sender, close)
|
||||
}
|
||||
if !ret {
|
||||
if m.tray != nil {
|
||||
m.tray.close()
|
||||
}
|
||||
// TODO 标记,可能需要移除
|
||||
//if m.tray != nil {
|
||||
// m.tray.close()
|
||||
//}
|
||||
logger.Debug("window.onCloseQuery windowType:", m.WindowType())
|
||||
if IsDarwin() {
|
||||
//main window close
|
||||
|
@ -8,14 +8,19 @@
|
||||
//
|
||||
//----------------------------------------
|
||||
|
||||
// CEF 扩展组件
|
||||
// 扩展组件
|
||||
|
||||
package cef
|
||||
|
||||
// NewTray 适用于 windows linux macos 系统托盘
|
||||
func (m *LCLBrowserWindow) NewTray() ITray {
|
||||
if m.tray == nil {
|
||||
m.tray = newTray(m.TForm)
|
||||
if BrowserWindow.Config.EnableMainWindow {
|
||||
m.tray = newTray(m.TForm)
|
||||
} else {
|
||||
// 禁用主窗口, 这时需要使用 disabledMainWindow, 因为它才是实际的主窗口
|
||||
m.tray = newTray(disabledMainWindow.TForm)
|
||||
}
|
||||
}
|
||||
return m.tray
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user