| 124 | if (widget->property("ElaBaseClassName").toString() == "ElaWindow") |
| 125 | { |
| 126 | parent = widget; |
| 127 | } |
| 128 | } |
| 129 | if (!parent) |
| 130 | { |
| 131 | return; |
| 132 | } |
| 133 | } |
| 134 | ElaMessageBar* bar = new ElaMessageBar(policy, ElaMessageBarType::Error, title, text, displayMsec, parent); |
| 135 | Q_UNUSED(bar); |
| 136 | } |
| 137 | #include <QDebug> |
| 138 | void ElaMessageBar::paintEvent(QPaintEvent* event) |
| 139 | { |
| 140 | Q_D(ElaMessageBar); |
| 141 | int fontPixelSize = eApp->getFontPixelSize(); |
| 142 | QPainter painter(this); |
| 143 | painter.setOpacity(d->_pOpacity); |
| 144 | painter.setRenderHints(QPainter::SmoothPixmapTransform | QPainter::Antialiasing | QPainter::TextAntialiasing); |
| 145 | // 高性能阴影 |
| 146 | eTheme->drawEffectShadow(&painter, rect(), d->_shadowBorderWidth, d->_borderRadius); |
| 147 | |
| 148 | // 背景和图标绘制 |
nothing calls this directly
no outgoing calls
no test coverage detected