mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 14:45:49 +01:00
Remove C.toggleFullscreen
This commit is contained in:
parent
41779866c4
commit
5187641e25
2 changed files with 12 additions and 17 deletions
|
|
@ -29,7 +29,6 @@ type (
|
|||
destroy()
|
||||
reload()
|
||||
forceReload()
|
||||
toggleFullscreen()
|
||||
toggleDevTools()
|
||||
resetZoom()
|
||||
zoomIn()
|
||||
|
|
@ -380,7 +379,11 @@ func (w *Window) ToggleFullscreen() {
|
|||
if w.impl == nil {
|
||||
return
|
||||
}
|
||||
w.impl.toggleFullscreen()
|
||||
if w.IsFullscreen() {
|
||||
w.UnFullscreen()
|
||||
} else {
|
||||
w.Fullscreen()
|
||||
}
|
||||
}
|
||||
|
||||
func (w *Window) ToggleDevTools() {
|
||||
|
|
@ -467,6 +470,7 @@ func (w *Window) Maximise() *Window {
|
|||
return w
|
||||
}
|
||||
if !w.IsMaximised() {
|
||||
w.disableSizeConstraints()
|
||||
w.impl.maximise()
|
||||
}
|
||||
return w
|
||||
|
|
|
|||
|
|
@ -338,27 +338,22 @@ bool windowIsMinimised(void* nsWindow) {
|
|||
return [(NSWindow*)nsWindow isMiniaturized];
|
||||
}
|
||||
|
||||
// toggle fullscreen
|
||||
void windowToggleFullscreen(void* nsWindow) {
|
||||
// Toggle fullscreen on main thread
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[(NSWindow*)nsWindow toggleFullScreen:nil];
|
||||
});
|
||||
}
|
||||
|
||||
// Set Window fullscreen
|
||||
void windowFullscreen(void* nsWindow) {
|
||||
if( windowIsFullscreen(nsWindow) ) {
|
||||
return;
|
||||
}
|
||||
windowToggleFullscreen(nsWindow);
|
||||
}
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[(NSWindow*)nsWindow toggleFullScreen:nil];
|
||||
});}
|
||||
|
||||
void windowUnFullscreen(void* nsWindow) {
|
||||
if( !windowIsFullscreen(nsWindow) ) {
|
||||
return;
|
||||
}
|
||||
windowToggleFullscreen(nsWindow);
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[(NSWindow*)nsWindow toggleFullScreen:nil];
|
||||
});
|
||||
}
|
||||
|
||||
// restore window to normal size
|
||||
|
|
@ -773,10 +768,6 @@ func (w *macosWindow) toggleDevTools() {
|
|||
showDevTools(w.nsWindow)
|
||||
}
|
||||
|
||||
func (w *macosWindow) toggleFullscreen() {
|
||||
C.windowToggleFullscreen(w.nsWindow)
|
||||
}
|
||||
|
||||
func (w *macosWindow) reload() {
|
||||
//TODO: Implement
|
||||
println("reload called on Window", w.parent.id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue