简体   繁体   English

在GNU + Linux的Electron中,子窗口无法最大化

[英]Child windows can't be maximized in Electron in GNU+Linux

I am writing a program in Electron. 我正在Electron写一个程序。 I have a parent window which creates child windows. 我有一个创建子窗口的父窗口。 My problem is that it is not possible to maximize the child windows. 我的问题是无法最大化子窗口。 I have read in Electron Doc that the option maximizable is default true, but not implemented in Linux. 我在Electron Doc中读过, maximizable选项默认为true,但在Linux中没有实现。

maximizable Boolean - Whether window is maximizable. maximizable Boolean - 窗口是否可以最大化。 This is not implemented on Linux. 这不是在Linux上实现的。 Default is true. 默认为true。

Aparently, the default true does only apply to non-child windows and is default false at child windows. 显然,默认的true仅适用于非子窗口,在子窗口默认为false。 The method win.setMaximizable(true) is not implemented in Linux either. 方法win.setMaximizable(true)也没有在Linux中实现。

win.setMaximizable(maximizable) macOS Windows win.setMaximizable(maximizable) macOS Windows

 maximizable Boolean 

Sets whether the window can be manually maximized by user. 设置是否可以由用户手动最大化窗口。 On Linux does nothing. 在Linux上什么都不做。

I have also tried the method win.maximize() which is implemented but it didn't work as well, probably because the option maximizable is set to false. 我也尝试过实现win.maximize()的方法但是它没有用,可能是因为选项maximizable被设置为false。

win.maximize() Maximizes the window win.maximize()最大化窗口

Is there an other way to make these windows maximizable? 还有其他方法可以使这些窗口最大化吗?

对不起,我看到这个问题差不多晚了一年,你可能已经找到了解决这个问题的方法,但是你知道,在Windows上你可以“win.maximize()”来完成这个任务,但是在mac和Linux上它也需要设置“win.resizable = true”,否则它不会最大化窗口,它只会将界限设置到屏幕的左下角,希望这有帮助,祝你好运!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM