Fix for Qt 4.

This commit is contained in:
Martin Rotter 2015-06-29 16:56:54 +02:00
parent 80a5a257f9
commit 4b63db95f9

View File

@ -113,7 +113,11 @@ void Notification::paintEvent(QPaintEvent *event) {
}
// Draw background.
#if QT_VERSION >= 0x050000
painter.setRenderHints(QPainter::HighQualityAntialiasing | QPainter::Qt4CompatiblePainting);
#else
painter.setRenderHints(QPainter::HighQualityAntialiasing);
#endif
painter.setBrush(QColor(220, 220, 220));
painter.setPen(Qt::NoPen);
@ -187,8 +191,11 @@ void Notification::loadSettings() {
void Notification::setupWidget() {
// Set window flags.
Qt::WindowFlags window_flags = Qt::FramelessWindowHint | Qt::WindowSystemMenuHint |
Qt::WindowStaysOnTopHint | Qt::X11BypassWindowManagerHint |
Qt::WindowDoesNotAcceptFocus;
Qt::WindowStaysOnTopHint | Qt::X11BypassWindowManagerHint;
#if QT_VERSION >= 0x050000
window_flags |= Qt::WindowDoesNotAcceptFocus;
#endif
#if defined (Q_OS_MAC)
window_flags |= Qt::SubWindow;