MCPcopy Create free account
hub / github.com/DreamSourceLab/DSView / showPopup

Method showPopup

DSView/pv/ui/dscombobox.cpp:64–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64void 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
94void DsComboBox::hidePopup()
95{

Callers

nothing calls this directly

Calls 4

setGeometryMethod · 0.80
sizeMethod · 0.80
nameMethod · 0.80
GetStyleColorMethod · 0.80

Tested by

no test coverage detected