window.openDialog 不会删除 Linux 上的标题栏
我使用以下代码来显示弹出窗口:
var win = window.openDialog("chrome://broceliand/content/view/popup/nameMapPopup.xul",
"",
"all=no," +
"titlebar=no," +
"chrome=yes," +
"toolbar=no," +
"dialog=no," +
"resizable=no," +
"modal=yes," +
"dependent=yes," +
"top="+popupY+"px," +
"left="+popupX+"px",
args);
在 Windows 上,弹出窗口非常干净。没有剩余的共同元素。 但在 Linux 上, 标题栏 仍然保留,并且弹出窗口是可调整大小的。
I use the following code to display a popup:
var win = window.openDialog("chrome://broceliand/content/view/popup/nameMapPopup.xul",
"",
"all=no," +
"titlebar=no," +
"chrome=yes," +
"toolbar=no," +
"dialog=no," +
"resizable=no," +
"modal=yes," +
"dependent=yes," +
"top="+popupY+"px," +
"left="+popupX+"px",
args);
On windows the popup is pretty clean. There are no common elements remaining.
But on linux le titlebar still remains and the popup is resizable.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试将
window
元素上的hidechrome
属性设置为true
。请参阅https://developer.mozilla.org/en/xul/windowTry setting the
hidechrome
attribute on thewindow
element totrue
. See https://developer.mozilla.org/en/xul/window这可能是因为在 Linux 上窗口装饰器负责标题栏。这甚至可以是窗口管理器的单独程序。
弹出窗口是否需要作为单独的窗口?也许 panel 正是您正在寻找的。
That might be because on Linux the window decorator is responsible for the titlebar. This can even be a seperate program to the window manager.
Does the popup need to be as a seperate window? Perhaps panel is really what you are looking for.