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

WebView inside OptionContainer not resizing when maximising #1968

Closed
freakboy3742 opened this issue Jun 8, 2023 Discussed in #1967 · 0 comments · Fixed by #1996
Closed

WebView inside OptionContainer not resizing when maximising #1968

freakboy3742 opened this issue Jun 8, 2023 Discussed in #1967 · 0 comments · Fixed by #1996
Labels
bug A crash or error in behavior. windows The issue relates to Microsoft Windows support.

Comments

@freakboy3742
Copy link
Member

On Winforms, if you have a window that contains an OptionContainer, with a tab that contains a web content, and you resize the window, the web view responds. However, if you press the maximise button, the OptionContainer and Webvew don't resize to fit the window.

When you de-minimize, the OptionContainer resizes to fit the smaller window, but the WebView appears to be resized to fit the old, maximized size.

Example:

import toga
from toga.style import Pack
from toga.constants import COLUMN


class BugReport(toga.App):
    def startup(self):
        self.main_box = toga.Box(style=Pack(direction=COLUMN, flex=1))

        self.optioncontainer = toga.OptionContainer(style=Pack(flex=1))
        self.optioncontainer.add("A Tab", toga.WebView(url="https://beeware.org"))
        self.main_box.add(self.optioncontainer)

        self.main_window = toga.MainWindow(
            title=self.formal_name, size=(510, 600), position=(100, 0)
        )
        self.main_window.content = self.main_box
        self.main_window.show()


def main():
    return BugReport("Bug report", "org.beeware.bug")


if __name__ == "__main__":
    main().main_loop()

The resize works as expected on Cocoa and GTK.

Discussed in #1967

@freakboy3742 freakboy3742 added bug A crash or error in behavior. windows The issue relates to Microsoft Windows support. labels Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A crash or error in behavior. windows The issue relates to Microsoft Windows support.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant