Skip to content

Style visibility=HIDDEN has no effect on GTK #2447

Open
@LordOfDragons

Description

@LordOfDragons

Describe the bug

Using this code:

        self.sel_control = toga.Selection(
            items=[], style=tp.Pack(flex=1), accessor="name",
            on_change=self.on_selection_control_sel_changed)
        box.add(self.sel_control)
        self.sel_control.style.update(visibility=toga.style.pack.HIDDEN)

The widget is still visible. Makes it impossible to have a box with different widgets showing only the one matching an input type. And no the OptionContainer is not an option since it has tabs and does not guarantee invisibility.

Steps to reproduce

Use the code above. Widget is still visible

Expected behavior

Widget is invisible

Screenshots

No response

Environment

Linux, most recent Toga

Logs

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA crash or error in behavior.linuxThe issue relates Linux support.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions