window.openDialog 不会删除 Linux 上的标题栏

发布于 2024-08-04 06:38:08 字数 663 浏览 8 评论 0原文

我使用以下代码来显示弹出窗口:

    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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

笑叹一世浮沉 2024-08-11 06:38:08

尝试将 window 元素上的 hidechrome 属性设置为 true。请参阅https://developer.mozilla.org/en/xul/window

Try setting the hidechrome attribute on the window element to true. See https://developer.mozilla.org/en/xul/window

哀由 2024-08-11 06:38:08

这可能是因为在 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文