[solved] How to increase contrast of default scrollbar handles

Use this forum to ask questions about how to do things in QCAD.

Moderator: andrew

Forum rules
Always indicate Operating system, QCAD version
Attach Drawing files, Screenshots
Post one question per topic.
Post Reply
Hunter2
Registered Member
Posts: 2
Joined: Mon Oct 02, 2017 12:57 am

[solved] How to increase contrast of default scrollbar handles

Post by Hunter2 » Mon Oct 02, 2017 3:26 am

I have used QCAD for many years and am very happy with it, but at present the scrollbar handles are very hard to see (see attachment).

I tried the "Dark" theme and got better contrast. I was also able to change the colors of the scrollbar handles.

I prefer the Default theme, and would like to increase the contrast of the scrollbar handles, but I haven't found a way to do so.

Is there a "Light" theme available or is there a way to change the default scrollbar handle colors?

OpenSUSE Leap 42.2
QCAD Version: 3.17.3.0 (3.17.3)
Build Date: Jun 30 2017
Revision: 9c7770f
Qt Version: 5.8.0
Architecture: x86_64
Compiler: gcc 4.8.1
Attachments
invisible scroll handles.jpg
invisible scroll handles.jpg (304.06 KiB) Viewed 1490 times

User avatar
andrew
Site Admin
Posts: 6158
Joined: Fri Mar 30, 2007 6:07 am

Re: How to increase contrast of default scrollbar handles

Post by andrew » Mon Oct 02, 2017 10:02 am

You can easily create your own theme as follows:
- Add a directory themes/MyTheme to your QCAD installation directory
- Add a plain text file "stylesheet.css" into that folder
- To make the scrollbar handles red, add the following contents into that file:

Code: Select all

QScrollBar {
    background-color: transparent;
}
QScrollBar::handle {
    background-color: red;
}
QScrollBar::add-line, QScrollBar::sub-line {
    height: 0;
    width: 0;
}
To play around with other styles, have a look at themes/Dark/stylesheet.css or the stylesheet documentation at:
http://doc.qt.io/qt-5/stylesheet-syntax.html
http://doc.qt.io/qt-5/stylesheet-reference.html

Hunter2
Registered Member
Posts: 2
Joined: Mon Oct 02, 2017 12:57 am

Re: How to increase contrast of default scrollbar handles

Post by Hunter2 » Mon Oct 02, 2017 2:30 pm

Thank you. That solved the problem.

I didn't know enough about Qt to realize that the stylesheet is just a modification and not a complete definition of the style.

It might be good to mention that the theme change requires a restart to take effect.

Post Reply

Return to “QCAD 'How Do I' Questions”