Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dialogs can disrupt simple tile layout #2242

Open
killown opened this issue Mar 22, 2024 · 5 comments
Open

Dialogs can disrupt simple tile layout #2242

killown opened this issue Mar 22, 2024 · 5 comments
Labels
bug low-priority Issues that aren't likely to be resolved soon PRs-welcome Issues which are unlikely to be fixed unless someone sends a PR

Comments

@killown
Copy link
Contributor

killown commented Mar 22, 2024

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

nice

@killown killown added the bug label Mar 22, 2024
@ammen99
Copy link
Member

ammen99 commented Mar 23, 2024

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 ammen99 added low-priority Issues that aren't likely to be resolved soon PRs-welcome Issues which are unlikely to be fixed unless someone sends a PR labels Mar 23, 2024
@killown
Copy link
Contributor Author

killown commented Jun 19, 2024

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()

@ammen99
Copy link
Member

ammen99 commented Jun 19, 2024

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.

@killown
Copy link
Contributor Author

killown commented Jun 19, 2024

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

@ammen99
Copy link
Member

ammen99 commented Jun 19, 2024

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug low-priority Issues that aren't likely to be resolved soon PRs-welcome Issues which are unlikely to be fixed unless someone sends a PR
Projects
None yet
Development

No branches or pull requests

2 participants