slint icon indicating copy to clipboard operation
slint copied to clipboard

`ScrollView` shows unneeded scrollbars in the QT style

Open FireFragment opened this issue 2 years ago • 0 comments

When using the Qt style, ScrollView always shows both vertical and horizontal scrollbars, even when they aren't needed. This doesn't look good and is cluttering the interface. In contrast, fluent and material styles handle this correctly, hiding scrollbars that aren't needed.

Screenshots

These screenshots were produced by the code below

Native style Fluent style
There is a useless horizontal scrollbar, cluttering the interface
d-29
The horizontal scrollbar is hidden, as it should be
d-28

To reproduce

Run the following code with slint-viewer in native style:

import { Button, VerticalBox, ScrollView} from "std-widgets.slint";
export component Test {
    ScrollView {
        VerticalBox {
            Button { text: "Button 1"; }
            Button { text: "Button 2"; }
            Button { text: "Button 3"; }
            Button { text: "Button 4"; }
            Button { text: "Button 5"; }
            Button { text: "Button 6"; }
            Button { text: "Button 7"; }
            Button { text: "Button 8"; }
            Button { text: "Button 9"; }
        }
    }
}

Platform: Linux, KDE, X11

FireFragment avatar Sep 27 '23 11:09 FireFragment