英文:
gio UI. how to make fullscreen
问题
我想使用Gio UI框架创建一个全屏窗口。但是应用程序始终处于窗口模式。
根据我的理解,这段代码应该实现全屏应用程序。
func main() {
go func() {
w := app.NewWindow(app.Title("fullscr"),
app.Fullscreen.Option(),
app.Decorated(false),
)
if err := draw(w); err != nil {
log.Fatal(err)
}
}()
app.Main()
}
英文:
I want to make a full screen window using the Gio UI framework.
But the application is in windowed mode all the time.
As I understood it, this code was supposed to result in a full screen application.
func main() {
go func() {
w := app.NewWindow(app.Title("fullscr"),
app.Fullscreen.Option(),
app.Decorated(false),
)
if err := draw(w); err != nil {
log.Fatal(err)
}
}()
app.Main()
}
答案1
得分: 1
感谢@kostix和他的评论,我找到了一个解决方案。我将w.Option(app.Fullscreen.Option())
放在draw
函数中。
英文:
Thanks to @kostix and his comment, I found a solution. I placed w.Option(app.Fullscreen.Option())
in draw
function
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论