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

SplitContainer not expanding correctly. #2060

Closed
chipbeaulieu opened this issue Aug 2, 2023 · 1 comment
Closed

SplitContainer not expanding correctly. #2060

chipbeaulieu opened this issue Aug 2, 2023 · 1 comment
Labels
bug A crash or error in behavior.

Comments

@chipbeaulieu
Copy link

chipbeaulieu commented Aug 2, 2023

Describe the bug

I create a simple vertical two part split container with a label in each pane. When I run the app and increase the size of the window, the split changes accordingly as expected. However, if I first move the split divider in either direction, and then resize the window, the split divider will first go back to the location it was at start up and then move.

macOS Ventura 13.4.1
MacBook Pro M2 ARM Processor

Code:

class Main(toga.App):
    def startup(self):
        self.main_window = toga.MainWindow(title=self.name)

        l = toga.Label("Left",style=Pack(text_align=LEFT,width=100))
        r = toga.Label("Right",style=Pack(text_align=LEFT,flex=1))

        split = toga.SplitContainer()
        split.content = [l,r]

        box = toga.Box()
        box.style.update(direction=COLUMN)
        box.add(split)

        self.main_window.content = box

        self.main_window.show()

Steps to reproduce

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

I expect the split divider to start at its current location and move smoothly as the window expands.

Screenshots

No response

Environment

  • Operating System: macOS 13.4.1
  • Python version: 3.11
  • Software versions:
    • Briefcase:
    • Toga: 0.3.1
    • ...

Logs


Additional context

No response

@chipbeaulieu chipbeaulieu added the bug A crash or error in behavior. label Aug 2, 2023
@freakboy3742
Copy link
Member

Thanks for the report - I believe this has been fixed recently as part of #1984, which will be in the next Toga release.

If you're able to reproduce the problem you're seeing on the main branch, let us know; otherwise, I'm going to close this as fixed.

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.
Projects
None yet
Development

No branches or pull requests

2 participants