Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
d29cd4c2
Unverified
Commit
d29cd4c2
authored
Aug 15, 2024
by
Daniel Hiltgen
Committed by
GitHub
Aug 15, 2024
Browse files
Merge pull request #6381 from eust-w/main
fix: Add tooltip to system tray icon
parents
e3d7f32a
a84c05cf
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
app/tray/wintray/tray.go
app/tray/wintray/tray.go
+7
-1
app/tray/wintray/w32api.go
app/tray/wintray/w32api.go
+1
-0
No files found.
app/tray/wintray/tray.go
View file @
d29cd4c2
...
...
@@ -11,6 +11,7 @@ import (
"path/filepath"
"sort"
"sync"
"syscall"
"unsafe"
"golang.org/x/sys/windows"
...
...
@@ -433,7 +434,12 @@ func (t *winTray) setIcon(src string) error {
t
.
muNID
.
Lock
()
defer
t
.
muNID
.
Unlock
()
t
.
nid
.
Icon
=
h
t
.
nid
.
Flags
|=
NIF_ICON
t
.
nid
.
Flags
|=
NIF_ICON
|
NIF_TIP
if
toolTipUTF16
,
err
:=
syscall
.
UTF16FromString
(
commontray
.
ToolTip
);
err
==
nil
{
copy
(
t
.
nid
.
Tip
[
:
],
toolTipUTF16
)
}
else
{
return
err
}
t
.
nid
.
Size
=
uint32
(
unsafe
.
Sizeof
(
*
t
.
nid
))
return
t
.
nid
.
modify
()
...
...
app/tray/wintray/w32api.go
View file @
d29cd4c2
...
...
@@ -61,6 +61,7 @@ const (
MIIM_SUBMENU
=
0x00000004
MIM_APPLYTOSUBMENUS
=
0x80000000
NIF_ICON
=
0x00000002
NIF_TIP
=
0x00000004
NIF_INFO
=
0x00000010
NIF_MESSAGE
=
0x00000001
SW_HIDE
=
0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment