slint-ui/slint

The ListView's viewport-width is not working and no horizontal bar

Open

#5,485 opened on Jun 26, 2024

View on GitHub
 (2 comments) (0 reactions) (0 assignees)Rust (22,596 stars) (881 forks)batch import
a:models&viewsgood first issue

Description

like this:

import { ListView } from "std-widgets.slint";

export component Demo {
    ListView {
        viewport-width: 10000px;

        private property <[string]> names: [
            "111111111111111111111111111111111",
            "222222222222222222222222222222222222",
            "33333333333333333333333333333333333333",
            "33333333333333333333333333333333333333",
            "33333333333333333333333333333333333333",
            "33333333333333333333333333333333333333",
            "33333333333333333333333333333333333333",
            "33333333333333333333333333333333333333",
            "33333333333333333333333333333333333333",
            "33333333333333333333333333333333333333333333333333333333333333333",
            "33333333333333333333333333333333333333",
            "33333333333333333333333333333333333333444444444444444444444",
            "3333333333333333333333333333333333333344444444444444444444444444444444444",
            "33333333333333333333333333333333333333",
            "33333333333333333333333333333333333333",
            "33333333333333333333333333333333333333",
            "33333333333333333333333333333333333333",
            "33333333333333333333333333333333333333",
            "33333333333333333333333333333333333333111111111111111111",
        ];

        for name[idx] in names: Rectangle {
            Text {
                text: name;
            }
        }
    }
}

Contributor guide