wayfire icon indicating copy to clipboard operation
wayfire copied to clipboard

Dialogs can disrupt simple tile layout

Open killown opened this issue 1 year ago • 5 comments

Dialogs can disrupt the layout depending on the number of views open

nice

killown avatar Mar 22 '24 11:03 killown

This is partially caused by the same issue as #2243, however here we can see that firefox does not get stretched/squeezed to fit into its box which is a separate problem.

However I don't consider this too high of a priority, because stretching views is not significantly better in my opinion.

ammen99 avatar Mar 23 '24 07:03 ammen99

I cannot reproduce this issue anymore, the dialog just floats

ipython-391

import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk

class SmallDialog(Gtk.Dialog):

    def __init__(self, parent):
        Gtk.Dialog.__init__(self, "Small Dialog", parent, 0,
                            (Gtk.STOCK_OK, Gtk.ResponseType.OK))

        self.set_default_size(200, 100)

        label = Gtk.Label(label="This is a small dialog.")
        box = self.get_content_area()
        box.add(label)
        self.show_all()

class MainWindow(Gtk.Window):

    def __init__(self):
        Gtk.Window.__init__(self, title="Main Window")
        self.set_border_width(10)

        button = Gtk.Button(label="Open Dialog")
        button.connect("clicked", self.on_button_clicked)
        self.add(button)

    def on_button_clicked(self, widget):
        dialog = SmallDialog(self)
        response = dialog.run()

        if response == Gtk.ResponseType.OK:
            print("Dialog closed")

        dialog.destroy()

def main():
    win = MainWindow()
    win.connect("destroy", Gtk.main_quit)
    win.show_all()
    Gtk.main()

if __name__ == "__main__":
    main()

killown avatar Jun 19 '24 15:06 killown

I think the problem in this issue is more that the windows are not correctly scaled to fit the available space, see for example the firefox window on the left.

ammen99 avatar Jun 19 '24 16:06 ammen99

I think the problem in this issue is more that the windows are not correctly scaled to fit the available space, see for example the firefox window on the left.

it's very specific for firefox https://support.mozilla.org/en-US/questions/1281933 btw

killown avatar Jun 19 '24 18:06 killown

I think the problem in this issue is more that the windows are not correctly scaled to fit the available space, see for example the firefox window on the left.

it's very specific for firefox https://support.mozilla.org/en-US/questions/1281933 btw

Well it would apply to any application that has minimum width set. But it is not a big deal hence the low-priority label :)

ammen99 avatar Jun 19 '24 18:06 ammen99