| 557 | } |
| 558 | |
| 559 | void adaptComboBoxes(QWidget* root) { |
| 560 | if (root == nullptr) { |
| 561 | return; |
| 562 | } |
| 563 | // Unlike radios/checkboxes, PJ::ComboBox IS a QComboBox, so there is no swap: |
| 564 | // we upgrade each plain QComboBox in place (gradient delegate + popup frame |
| 565 | // fixes), which preserves its model, current index, and signal connections. |
| 566 | // Skip ones already promoted to PJ::ComboBox, ones inside opaque host |
| 567 | // composites, and ones already upgraded (marker keeps it idempotent). |
| 568 | static constexpr const char* kComboStyledProperty = "_pj_combo_styled"; |
| 569 | const QList<QComboBox*> combos = root->findChildren<QComboBox*>(); |
| 570 | for (QComboBox* combo : combos) { |
| 571 | if (qobject_cast<ComboBox*>(combo) != nullptr || combo->property(kComboStyledProperty).toBool() || |
| 572 | isInsideHostComposite(combo)) { |
| 573 | continue; |
| 574 | } |
| 575 | applyComboBoxStyling(combo); |
| 576 | combo->setProperty(kComboStyledProperty, true); |
| 577 | } |
| 578 | } |
| 579 | |
| 580 | void adaptScrollAreas(QWidget* root) { |
| 581 | if (root == nullptr) { |