iced icon indicating copy to clipboard operation
iced copied to clipboard

`column!` not working in styling example

Open Barugon opened this issue 1 year ago • 3 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues.

Is this issue related to iced?

  • [X] My hardware is compatible and my graphics drivers are up-to-date.

What happened?

Here's the result of running the styling example: Screenshot from 2023-08-29 17-08-33

Note the missing checkbox and toggler to the right of the scroll area.

This code doesn't seem to be working properly.

What is the expected behavior?

Checkbox and toggler should be visible to the right of the scroll area.

Version

master

Operating System

Linux

Do you have any log output?

No response

Barugon avatar Aug 30 '23 00:08 Barugon

let scrollable = scrollable( column!["Scroll me!", vertical_space(800), "You did it!"] .width(Length::Fill), ) .height(100); Length::Fill of column inside scrollable is causing this issue as scrollable is not having width defined so column inside it is taking entire width that is why checkbox and togger are getting hidden Can be patched by adding width or removing Length::Fill

        let scrollable = scrollable(
            column!["Scroll me!", vertical_space(800), "You did it!"]
                .width(Length::Fill),
        )
        .width(300)
        .height(100);

akshayr-mecha avatar Sep 01 '23 20:09 akshayr-mecha

Created PR #2062.

akshayr-mecha avatar Sep 01 '23 20:09 akshayr-mecha

This also seems to work:

    let scrollable = scrollable(column!["Scroll me!", vertical_space(800), "You did it!"])
      .width(Length::Fill)
      .height(100);

Barugon avatar Sep 01 '23 22:09 Barugon