make it compilable again

This commit is contained in:
Travis McLane
2023-05-10 09:10:03 -05:00
parent 54ba6d47f4
commit 9da5df354e
5 changed files with 30 additions and 2 deletions
+10
View File
@@ -395,3 +395,13 @@ func newZoomMenuItem() *MenuItem {
}
})
}
func newFullScreenMenuItem() *MenuItem {
return newMenuItem("Fullscreen").
OnClick(func(ctx *Context) {
currentWindow := globalApplication.CurrentWindow()
if currentWindow != nil {
currentWindow.Fullscreen()
}
})
}
@@ -391,3 +391,13 @@ func newZoomMenuItem() *MenuItem {
}
})
}
func newFullScreenMenuItem() *MenuItem {
return newMenuItem("Fullscreen").
OnClick(func(ctx *Context) {
currentWindow := globalApplication.CurrentWindow()
if currentWindow != nil {
currentWindow.Fullscreen()
}
})
}
+8
View File
@@ -51,6 +51,14 @@ func (s *linuxSystemTray) setIcon(icon []byte) {
})
}
func (s *linuxSystemTray) setDarkModeIcon(icon []byte) {
s.icon = icon
globalApplication.dispatchOnMainThread(func() {
// s.nsImage = unsafe.Pointer(C.imageFromBytes((*C.uchar)(&icon[0]), C.int(len(icon))))
// C.systemTraySetIcon(s.nsStatusItem, s.nsImage, C.int(s.iconPosition), C.bool(s.isTemplateIcon))
})
}
func (s *linuxSystemTray) setTemplateIcon(icon []byte) {
s.icon = icon
s.isTemplateIcon = true
+1 -1
View File
@@ -527,7 +527,7 @@ func newWindowImpl(parent *WebviewWindow) *linuxWebviewWindow {
// (*C.struct__GtkWidget)(m.native)
//var menubar *C.struct__GtkWidget
return &linuxWebviewWindow{
application: getNativeApplication(),
application: getNativeApplication().application,
parent: parent,
// menubar: menubar,
}
@@ -442,7 +442,7 @@ func (w *linuxWebviewWindow) setAlwaysOnTop(alwaysOnTop bool) {
func newWindowImpl(parent *WebviewWindow) *linuxWebviewWindow {
return &linuxWebviewWindow{
application: getNativeApplication(),
application: getNativeApplication().application,
parent: parent,
}
}