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

Method paintEvent

ElaWidgetTools/ElaWidget.cpp:132–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected