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

贡献者指南

The ListView's viewport-width is not working and no horizontal bar · slint-ui/slint#5485 | Good First Issue