Dark vertical scrollbar

Share your scripts and packages with other Mudlet users.
Post Reply
chrio
Posts: 73
Joined: Mon Aug 22, 2016 11:34 am

Dark vertical scrollbar

Post by chrio »

If you want a dark style for the scrollbar, but don't necessarily want the whole dark theme package you can use this script:
Code: [show] | [select all] lua
setAppStyleSheet [[
    QScrollBar:vertical {
        border: 1px solid #303030;
        background: #222222;
        width: 15px;
        margin: 12px 0 12px 0;
    }
    QScrollBar::handle:vertical {
        background: #444444;
        min-height: 50px;
    }
    QScrollBar::add-line:vertical {
        border: 1px solid #303030;
        background: #222222;
        height: 10px;
        subcontrol-position: bottom;
        subcontrol-origin: margin;
    }
    QScrollBar::sub-line:vertical {
        border: 1px solid #303030;
        background: #222222;
        height: 10px;
        subcontrol-position: top;
        subcontrol-origin: margin;
    }
    QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical {
        border: 2px solid #303030;
        width: 5px;
        height: 5px;
        background: #888888;
    }
    QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
        background: none;
    }
]]
The resulting look will be something like this:
darkscrollbar.png
darkscrollbar.png (791 Bytes) Viewed 2147 times

If you use more styles you need to merge them with this, since setAppStyleSheet always replace earlier style changes.

Post Reply