UN-GCPDS / qt-material

Material inspired stylesheet for PySide2, PySide6, PyQt5 and PyQt6
https://qt-material.readthedocs.io/en/latest/
BSD 2-Clause "Simplified" License
2.33k stars 247 forks source link

Scroll Bar Background on Dark Themes #80

Closed avenzi closed 1 year ago

avenzi commented 1 year ago

OS: Windows 11 Python version: 3.9.0

With no extra styling (just the base theme), the QScrollBar appears to have a strange, checkered background texture in all the dark themes:

screenshot

I was able to find the reason for this: https://stackoverflow.com/questions/17935691/stylesheet-on-qscrollbar-leaves-background-of-scrollbar-with-checkerboard-patter Evidently this is due to the add-page and sub-page backgrounds not being set.

In order to get the scrollbar to display properly, I had to add the following custom styling:

QScrollBar::sub-page:horizontal,
QScrollBar::add-page:horizontal,
QScrollBar::sub-page:vertical,
QScrollBar::add-page:vertical,
QScrolLBar:vertical {
    background: transparent;
}

Is this intended? I'm not sure if this is simply due to my specific platform or something, but it seemed odd to me.

YeisonCardona commented 1 year ago

Hi, I will add your code in the default CSS styles since I cannot access a Windows machine :/