| 54 | namespace PJ { |
| 55 | |
| 56 | Scrollbar::Scrollbar(Qt::Orientation orientation, QWidget* parent) : QWidget(parent), orientation_(orientation) { |
| 57 | // Transparent overlay: never intercepts mouse events, paints over the native |
| 58 | // scroll-bar gutter without a system background or opaque window behind it. |
| 59 | setAttribute(Qt::WA_TransparentForMouseEvents, true); |
| 60 | setAttribute(Qt::WA_NoSystemBackground, true); |
| 61 | setAttribute(Qt::WA_TranslucentBackground, true); |
| 62 | |
| 63 | // Theme-aware default accent (info-blue on light, pale grey on dark), keyed |
| 64 | // off QPalette::Window — NOT QPalette::Highlight, which the app never sets and |
| 65 | // would otherwise leak the OS accent (e.g. Yaru orange). Re-read on theme |
| 66 | // changes in changeEvent() unless the caller pins a color via setAccentColor(). |
| 67 | accent_ = scrollbar_detail::defaultAccent(QGuiApplication::palette().window().color()); |
| 68 | } |
| 69 | |
| 70 | void Scrollbar::attach(QAbstractScrollArea* area) { |
| 71 | area_ = area; |
nothing calls this directly
no test coverage detected