| 62 | } |
| 63 | |
| 64 | void DsComboBox::showPopup() |
| 65 | { |
| 66 | _bPopup = true; |
| 67 | |
| 68 | #ifdef Q_OS_DARWIN |
| 69 | |
| 70 | measureSize(); |
| 71 | QComboBox::showPopup(); |
| 72 | |
| 73 | QWidget *popup = this->findChild<QFrame*>(); |
| 74 | auto rc = popup->geometry(); |
| 75 | int x = rc.left() + 6; |
| 76 | int y = rc.top(); |
| 77 | int w = rc.right() - rc.left(); |
| 78 | int h = rc.bottom() - rc.top() + 20; |
| 79 | popup->setGeometry(x, y, w, h); |
| 80 | |
| 81 | int sy = QGuiApplication::primaryScreen()->size().height(); |
| 82 | if (sy <= 1080){ |
| 83 | popup->setMaximumHeight(750); |
| 84 | } |
| 85 | |
| 86 | popup->setStyleSheet("background-color:" + AppConfig::Instance().GetStyleColor().name()); |
| 87 | |
| 88 | #else |
| 89 | QComboBox::showPopup(); |
| 90 | #endif |
| 91 | |
| 92 | } |
| 93 | |
| 94 | void DsComboBox::hidePopup() |
| 95 | { |
nothing calls this directly
no test coverage detected