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

Method updateOverlayStyle

pj_widgets/src/DateRangePicker.cpp:1002–1014  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1000}
1001
1002void DateRangePicker::updateOverlayStyle() {
1003 if (!overlay_) {
1004 return;
1005 }
1006 // Drive the overlay popup from the theme tokens so it matches the active QSS
1007 // theme. Same precedent as the app's QFrame#DiagnosticsPopup (background =
1008 // dark_background, 1px solid border_default), with square corners. palette()
1009 // can't be used here: the app pins QPalette at Fusion defaults regardless of
1010 // theme, so it would resolve to Fusion light-grey on both.
1011 const PickerTokens tok = pickerTokens();
1012 overlay_->setStyleSheet(QStringLiteral("QWidget#PickerOverlay { background-color: %1; border: 1px solid %2; }")
1013 .arg(tok.surface.name(), tok.border.name()));
1014}
1015
1016void DateRangePicker::resizeEvent(QResizeEvent* event) {
1017 QWidget::resizeEvent(event);

Callers

nothing calls this directly

Calls 2

pickerTokensFunction · 0.85
nameMethod · 0.45

Tested by

no test coverage detected