MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / Scrollbar

Method Scrollbar

pj_widgets/src/Scrollbar.cpp:56–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54namespace PJ {
55
56Scrollbar::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
70void Scrollbar::attach(QAbstractScrollArea* area) {
71 area_ = area;

Callers

nothing calls this directly

Calls 2

defaultAccentFunction · 0.85
colorMethod · 0.45

Tested by

no test coverage detected