slint-ui/slint

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

Open

#5,485 建立於 2024年6月26日

在 GitHub 查看
 (2 留言) (0 反應) (0 負責人)Rust (22,596 star) (881 fork)batch import
a:models&viewsgood first issue

描述

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;
            }
        }
    }
}

貢獻者指南