-
-
Notifications
You must be signed in to change notification settings - Fork 785
Closed
Labels
bugA crash or error in behavior.A crash or error in behavior.windowsThe issue relates to Microsoft Windows support.The issue relates to Microsoft Windows support.
Description
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
Originally posted by YTLoudYN June 8, 2023
https://github.com/beeware/toga/assets/131869902/b6d49a5f-28be-4365-8e9c-abb87af18ed2
Metadata
Metadata
Assignees
Labels
bugA crash or error in behavior.A crash or error in behavior.windowsThe issue relates to Microsoft Windows support.The issue relates to Microsoft Windows support.