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

Function defaultAccent

pj_widgets/src/Scrollbar.cpp:45–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45QColor defaultAccent(const QColor& window_color) {
46 // The app sets QPalette::Window per theme but not QPalette::Highlight, so we
47 // derive the theme from the window lightness rather than trusting the (system)
48 // highlight. Dark chrome -> pale grey; light chrome -> info blue.
49 return window_color.lightness() < 128 ? kPillAccentDark : kPillAccentLight;
50}
51
52} // namespace PJ::scrollbar_detail
53

Callers 3

ScrollbarMethod · 0.85
changeEventMethod · 0.85
TESTFunction · 0.85

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.68