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

Method paintEvent

ElaWidgetTools/ElaDialog.cpp:135–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133ElaAppBarType::ButtonFlags ElaDialog::getWindowButtonFlags() const
134{
135 return d_ptr->_appBar->getWindowButtonFlags();
136}
137
138void ElaDialog::paintEvent(QPaintEvent* event)
139{
140 Q_D(ElaDialog);
141#if (QT_VERSION >= QT_VERSION_CHECK(6, 5, 3) && QT_VERSION <= QT_VERSION_CHECK(6, 6, 1))
142 if (d->_windowDisplayMode != ElaApplicationType::WindowDisplayMode::ElaMica)
143#else
144 if (d->_windowDisplayMode == ElaApplicationType::WindowDisplayMode::Normal)
145#endif
146 {
147 QPainter painter(this);
148 painter.save();
149 painter.setRenderHints(QPainter::Antialiasing | QPainter::TextAntialiasing);
150 painter.setPen(Qt::NoPen);
151 painter.setBrush(ElaColorAnimation::getColor(this, ElaThemeColor(d->_themeMode, PopupBase), "Background"));
152 painter.drawRect(rect());
153 painter.restore();
154 }
155 QWidget::paintEvent(event);
156}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected