Fix for Qt 4.
This commit is contained in:
parent
80a5a257f9
commit
4b63db95f9
@ -113,7 +113,11 @@ void Notification::paintEvent(QPaintEvent *event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Draw background.
|
// Draw background.
|
||||||
|
#if QT_VERSION >= 0x050000
|
||||||
painter.setRenderHints(QPainter::HighQualityAntialiasing | QPainter::Qt4CompatiblePainting);
|
painter.setRenderHints(QPainter::HighQualityAntialiasing | QPainter::Qt4CompatiblePainting);
|
||||||
|
#else
|
||||||
|
painter.setRenderHints(QPainter::HighQualityAntialiasing);
|
||||||
|
#endif
|
||||||
painter.setBrush(QColor(220, 220, 220));
|
painter.setBrush(QColor(220, 220, 220));
|
||||||
|
|
||||||
painter.setPen(Qt::NoPen);
|
painter.setPen(Qt::NoPen);
|
||||||
@ -187,8 +191,11 @@ void Notification::loadSettings() {
|
|||||||
void Notification::setupWidget() {
|
void Notification::setupWidget() {
|
||||||
// Set window flags.
|
// Set window flags.
|
||||||
Qt::WindowFlags window_flags = Qt::FramelessWindowHint | Qt::WindowSystemMenuHint |
|
Qt::WindowFlags window_flags = Qt::FramelessWindowHint | Qt::WindowSystemMenuHint |
|
||||||
Qt::WindowStaysOnTopHint | Qt::X11BypassWindowManagerHint |
|
Qt::WindowStaysOnTopHint | Qt::X11BypassWindowManagerHint;
|
||||||
Qt::WindowDoesNotAcceptFocus;
|
|
||||||
|
#if QT_VERSION >= 0x050000
|
||||||
|
window_flags |= Qt::WindowDoesNotAcceptFocus;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined (Q_OS_MAC)
|
#if defined (Q_OS_MAC)
|
||||||
window_flags |= Qt::SubWindow;
|
window_flags |= Qt::SubWindow;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user