Skip to content

Commit

Permalink
U: sys-tray 图标修改
Browse files Browse the repository at this point in the history
  • Loading branch information
sxmxta committed Nov 13, 2023
1 parent 5e8e9d2 commit 3f86741
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions example/tray/lcltray/lcltray.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ func trayDemo(browserWindow cef.IBrowserWindow) {
menu1 := tray.AddMenuItem("父菜单", nil)
//带图标的菜单
iconItem := tray.NewMenuItem("带个图标", nil)
iconItem.Bitmap().SetSize(32, 32) //图标情况调整大小
iconItem.Bitmap().SetSize(16, 16) //图标情况调整大小
iconItem.Bitmap().SetTransparent(true) //透明
icon := lcl.NewIcon()
icon.LoadFromFSFile("resources/icon_1.ico")
icon.LoadFromFSFile("resources/icon_menu.ico")
iconItem.Bitmap().Canvas().Draw(0, 0, icon) //画上去
tray.TrayMenu().Items().Add(iconItem)

Expand Down
Binary file modified example/tray/lcltray/resources/icon.ico
Binary file not shown.
Binary file removed example/tray/lcltray/resources/icon_1.ico
Binary file not shown.
Binary file added example/tray/lcltray/resources/icon_menu.ico
Binary file not shown.

0 comments on commit 3f86741

Please sign in to comment.