| 50 | { |
| 51 | } |
| 52 | |
| 53 | void ElaDockWidget::paintEvent(QPaintEvent* event) |
| 54 | { |
| 55 | Q_D(ElaDockWidget); |
| 56 | if (isFloating()) |
| 57 | { |
| 58 | QPainter painter(this); |
| 59 | painter.save(); |
| 60 | painter.setRenderHints(QPainter::Antialiasing); |
| 61 | #ifdef Q_OS_WIN |
| 62 | // 背景 |
| 63 | if (d->_windowDisplayMode != ElaApplicationType::WindowDisplayMode::ElaMica) |
| 64 | { |
| 65 | painter.setPen(Qt::NoPen); |
| 66 | painter.setBrush(ElaColorAnimation::getColor(this, ElaThemeColor(d->_themeMode, PopupBase), "Background")); |
| 67 | painter.drawRect(rect()); |
| 68 | } |
| 69 | #else |
| 70 | // 背景 |
| 71 | painter.setPen(Qt::NoPen); |
| 72 | painter.setBrush(ElaColorAnimation::getColor(this, d->_windowDisplayMode == ElaApplicationType::WindowDisplayMode::ElaMica ? Qt::transparent : ElaThemeColor(d->_themeMode, PopupBase), "Background")); |
| 73 | QRect foregroundRect(d->_shadowBorderWidth, d->_shadowBorderWidth, width() - 2 * d->_shadowBorderWidth, height() - 2 * d->_shadowBorderWidth); |
| 74 | painter.drawRect(rect()); |
| 75 | #endif |
| 76 | painter.restore(); |
| 77 | } |
| 78 | QDockWidget::paintEvent(event); |
| 79 | } |
| 80 | |
| 81 | #ifdef Q_OS_WIN |
nothing calls this directly
no outgoing calls
no test coverage detected