slint icon indicating copy to clipboard operation
slint copied to clipboard

Border around ScrollView native widget

Open jrmoulton opened this issue 3 years ago • 5 comments

https://github.com/sixtyfpsui/sixtyfps/blob/ce7a13b70d0a4be183626a234834251e62046589/sixtyfps_runtime/rendering_backends/qt/qt_widgets/scrollview.rs#L270

This section of code and it's references create a black border around a ScrollView that becomes obvious and distracting and non-removable when it's x or y are set inside the window. Why does this border exist? If I delete this section of code and its references everything compiles fine and the ScrollView looks much better in my opinion without the distracting border. Why is that border created by default?

jrmoulton avatar Jan 10 '22 05:01 jrmoulton

Screen Shot 2022-01-09 at 10 05 18 PM vs. Screen Shot 2022-01-09 at 10 05 05 PM

jrmoulton avatar Jan 10 '22 05:01 jrmoulton

It depends on the QStyle used. For some QStyle it might be required. But there is definitively something wrong. Looks like we should draw this differently. As this is a problem for this style. What desktop environment are you using? Is that Gnome? Do you know if Qt is using the GTK style? Is it Qt5 or Qt6 ?

ogoffart avatar Jan 10 '22 07:01 ogoffart

I'm currently on macOS and I'm running Qt6

jrmoulton avatar Jan 10 '22 13:01 jrmoulton

I also agree with @jrmoulton. I also don't like border around ScrollView and ListView. Is there a simple way to disable the border? I am on Windows + Rust, and using defaults.

image

dilawar avatar Jun 13 '22 06:06 dilawar

Setting border-width : 0px for ScrollView removed the border for me. I feel dumb for not trying the first obvious thing before commenting here 😳.

dilawar avatar Jun 13 '22 06:06 dilawar

Perhaps this is related to https://github.com/slint-ui/slint/issues/686 ?

ogoffart avatar Nov 29 '22 11:11 ogoffart

As discussed with Florian, this does not seem relevant anymore - with QStyle not being used on macOS and Windows anymore, and the ability to set the border-width manually.

tronical avatar Jan 18 '24 10:01 tronical