Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The ListView control does not trigger the horizontal scroll bar #7799

Open
zxscn opened this issue Mar 5, 2025 · 1 comment
Open

The ListView control does not trigger the horizontal scroll bar #7799

zxscn opened this issue Mar 5, 2025 · 1 comment
Labels
a:models&views The implementation of the `for` and ListView (mO,bF) bug Something isn't working candidate-for-bugfix-release Label for PRs that would make sense to cherry-pick into a spontaneously created bug fix release bran

Comments

@zxscn
Copy link

zxscn commented Mar 5, 2025

Bug Description

After upgrading from v1.9.2 to v1.10.0, the ListView control no longer triggers the horizontal scroll bar.

Works fine in v1.9.2 :
Image

No horizontal in v1.10.0 :
Image

Reproducible Code (if applicable)

slint::slint!{

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

    export component TestApp inherits Window {
        preferred_width: 200px;
        preferred_height: 100px;

        ListView {
            for i in 10 : HorizontalLayout {
                spacing: 5px;
                height: 20px;
                width: 400px;

                Rectangle {
                    background: red.with_alpha(i * 0.1);

                    Text {
                        text: @tr("{}_1", i);
                    }
                }
                Rectangle {
                    background: blue.with_alpha(i * 0.1);

                    Text {
                        text: @tr("{}_2", i);
                    }
                }
            }
        }
    }
}
fn main() {
    TestApp::new().unwrap().run().unwrap();
}

Environment Details

  • Slint Version: V1.10.0
  • Platform/OS: macOS 15.3.1
  • Programming Language: Rust
  • Backend/Renderer: Default

Product Impact

No response

@zxscn zxscn added bug Something isn't working need triaging Issue that the owner of the area still need to triage labels Mar 5, 2025
@ogoffart ogoffart added candidate-for-bugfix-release Label for PRs that would make sense to cherry-pick into a spontaneously created bug fix release bran a:models&views The implementation of the `for` and ListView (mO,bF) and removed need triaging Issue that the owner of the area still need to triage labels Mar 5, 2025
@ogoffart
Copy link
Member

ogoffart commented Mar 5, 2025

Thanks for the bug report.

This is caused by commit 2df0b8b

But it is strange because the minimum with should be equal to the width in this case, so there is again a layouting bug somewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:models&views The implementation of the `for` and ListView (mO,bF) bug Something isn't working candidate-for-bugfix-release Label for PRs that would make sense to cherry-pick into a spontaneously created bug fix release bran
Projects
None yet
Development

No branches or pull requests

2 participants