2022-10-04 13:21:05 +08:00
|
|
|
//----------------------------------------
|
|
|
|
//
|
|
|
|
// Copyright © yanghy. All Rights Reserved.
|
|
|
|
//
|
2022-10-04 16:38:43 +08:00
|
|
|
// Licensed under GNU General Public License v3.0
|
2022-10-04 13:21:05 +08:00
|
|
|
//
|
|
|
|
//----------------------------------------
|
|
|
|
|
|
|
|
package cef
|
|
|
|
|
2022-12-12 17:34:57 +08:00
|
|
|
//适用于 windows linux macos 系统托盘
|
2023-01-04 22:47:30 +08:00
|
|
|
func (m *LCLBrowserWindow) NewTray() ITray {
|
2023-01-06 21:42:29 +08:00
|
|
|
if m.tray == nil {
|
|
|
|
m.tray = newTray(m.TForm)
|
|
|
|
}
|
2023-01-06 19:27:12 +08:00
|
|
|
return m.tray
|
|
|
|
}
|
2023-01-24 18:55:02 +08:00
|
|
|
|
|
|
|
func (m *LCLBrowserWindow) NewSysTray() ITray {
|
|
|
|
if m.tray == nil {
|
|
|
|
m.tray = newSysTray()
|
|
|
|
}
|
|
|
|
return m.tray
|
|
|
|
}
|
2023-01-24 23:08:39 +08:00
|
|
|
|
|
|
|
//只适用于windows的无菜单托盘
|
|
|
|
func (m *ViewsFrameworkBrowserWindow) NewSysTray() ITray {
|
|
|
|
if m == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
if m.tray == nil {
|
|
|
|
m.tray = newSysTray()
|
|
|
|
}
|
|
|
|
return m.tray
|
|
|
|
}
|