bczsalba / pytermgui

Python TUI framework with mouse support, modular widget system, customizable and rapid terminal markup language and more!
https://ptg.bczsalba.com
MIT License
2.25k stars 56 forks source link

[BUG] Checkbox not visible in Splitter #101

Closed edkirk30 closed 1 year ago

edkirk30 commented 1 year ago

Describe the bug Checkbox not rendered correctly inside Splitter in 7.2.0. Works as expected in 7.1.0. Checkbox action does work via mouse if right co-ords clicked.

To Reproduce Steps to reproduce the behavior:

        with ptg.WindowManager() as manager:
            window = (
                ptg.Window(
                    "",
                    ptg.Splitter(
                        ptg.Checkbox(), # isn't visible when not selected
                        ptg.Label("some label"),
                        ptg.Checkbox(), # isn't visible when not selected AND doesn't contribute space to layout until selected
                        ptg.Label("some label"),
                    ),
                   ptg.Checkbox(), # renders fine
                    "",
                    ptg.Button("Done", lambda *_: return),
                    width=80,
                    box="DOUBLE",
                )
                .set_title("[210 bold]Some Title")
                .center()
            )

            manager.add(window)

Expected behavior Visible checkboxes :)

Screenshots

7.2.0 (nothing selected) image

(second checkbox selected) image

7.1.0 image

System information

PyTermGUI version 7.2.0

System details:
    Python version: 3.8.13
    $TERM:          xterm-256color
    $COLORTERM:     truecolor
    Color support:  ColorSystem.TRUE
    OS Platform:    Linux-5.15.0-39-generic-x86_64-with-glibc2.35
bczsalba commented 1 year ago

Should be fixed now, and the patch includes a snazzier look for checkboxes as well! Sorry about the delay.