| 1000 | } |
| 1001 | |
| 1002 | void 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 | |
| 1016 | void DateRangePicker::resizeEvent(QResizeEvent* event) { |
| 1017 | QWidget::resizeEvent(event); |
nothing calls this directly
no test coverage detected