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

Method paintEvent

ElaWidgetTools/ElaToolTip.cpp:95–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95void ElaToolTip::paintEvent(QPaintEvent* event)
96{
97 Q_D(ElaToolTip);
98 QPainter painter(this);
99 painter.save();
100 painter.setRenderHint(QPainter::Antialiasing);
101 //阴影
102 eTheme->drawEffectShadow(&painter, rect(), d->_shadowBorderWidth, d->_pBorderRadius);
103 QRect foregroundRect = rect();
104 foregroundRect.adjust(d->_shadowBorderWidth, d->_shadowBorderWidth, -d->_shadowBorderWidth, -d->_shadowBorderWidth);
105 painter.setPen(ElaThemeColor(d->_themeMode, PopupBorder));
106 painter.setBrush(ElaThemeColor(d->_themeMode, PopupBase));
107 painter.drawRoundedRect(foregroundRect, d->_pBorderRadius, d->_pBorderRadius);
108 painter.restore();
109}

Callers

nothing calls this directly

Calls 1

drawEffectShadowMethod · 0.80

Tested by

no test coverage detected