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

(GTK) Changing DetailedList's Source makes rows invisible #2026

Closed
volxage opened this issue Jul 5, 2023 · 1 comment · Fixed by #2025
Closed

(GTK) Changing DetailedList's Source makes rows invisible #2026

volxage opened this issue Jul 5, 2023 · 1 comment · Fixed by #2025
Labels
bug A crash or error in behavior. linux The issue relates Linux support.

Comments

@volxage
Copy link

volxage commented Jul 5, 2023

Describe the bug

Assigning data to a DetailedList works at first, but reassigning the data always causes the rows to become small and "invisible" (no data is visible on them). By hovering the mouse over them you can still select them, and the correct number of rows are present, but the DetailedList is still unusable in that state because of its appearance.

Steps to reproduce

import toga
from toga.style import Pack

list1 = [{"title" : str(n), "subtitle": "sub", "icon" : None} for n in range(30)]
list2 = [{"title" : str(n), "subtitle": "sub", "icon" : None} for n in range(30,60)]

def build(app):
    box = toga.Box()
    dl = toga.DetailedList(style=Pack(flex=1), on_select=on_sel)
    dl.data = list1
    box.add(dl)
    return box

def on_sel(widget, row):
    widget.data = list2

def main():
    return toga.App("First App", "org.volxage", startup=build)

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


Running this code, you can see the rows initially render correctly, but after selecting a row the symptoms appear.

Expected behavior

The data is supposed to be reassigned without causing the rows to be "invisible".

Screenshots

No response

Environment

  • Operating System: Arch Linux
  • Python version: 3.11.3-2
  • Software versions:
    • Briefcase: (Not applicable) 0.3.14
    • Toga: Latest git commit (48eaff3)

Logs


Additional context

No response

@volxage volxage added the bug A crash or error in behavior. label Jul 5, 2023
@freakboy3742 freakboy3742 added the linux The issue relates Linux support. label Jul 5, 2023
@freakboy3742
Copy link
Member

Thanks for the report; I'm in the middle of an audit of DetailedList right now, so I'll make sure this is addressed.

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. linux The issue relates Linux support.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants