MCPcopy Create free account
hub / github.com/Liniyous/ElaWidgetTools / paintEvent

Method paintEvent

ElaWidgetTools/ElaContentDialog.cpp:178–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176 d->_maskWidget->doMaskAnimation(90);
177 d->_moveToCenter();
178 QDialog::showEvent(event);
179}
180
181void ElaContentDialog::paintEvent(QPaintEvent* event)
182{
183 Q_D(ElaContentDialog);
184 QPainter painter(this);
185 painter.save();
186 painter.setRenderHints(QPainter::Antialiasing | QPainter::TextAntialiasing);
187 painter.setPen(Qt::NoPen);
188 painter.setBrush(ElaColorAnimation::getColor(this, ElaThemeColor(d->_themeMode, PopupBase), "Background"));
189 // 背景绘制
190 painter.drawRect(rect());
191 // 按钮栏背景绘制
192 painter.setBrush(ElaColorAnimation::getColor(this, ElaThemeColor(d->_themeMode, WindowBase), "LayoutArea"));
193 painter.drawRoundedRect(d->_buttonWidget->geometry(), 8, 8);
194 painter.restore();
195}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected