From d0587e9f6ce2e34318a1e93bbd9fd34effcfa19f Mon Sep 17 00:00:00 2001 From: David Rosca Date: Wed, 10 Jan 2018 13:11:06 +0100 Subject: [PATCH] DesktopNotification: Don't change window opacity --- src/lib/notifications/desktopnotification.cpp | 22 ++----------------- src/lib/notifications/desktopnotification.h | 4 +--- 2 files changed, 3 insertions(+), 23 deletions(-) diff --git a/src/lib/notifications/desktopnotification.cpp b/src/lib/notifications/desktopnotification.cpp index 08818ae80..b1f3f4e1c 100644 --- a/src/lib/notifications/desktopnotification.cpp +++ b/src/lib/notifications/desktopnotification.cpp @@ -1,6 +1,6 @@ /* ============================================================ * Falkon - Qt web browser -* Copyright (C) 2010-2017 David Rosca +* Copyright (C) 2010-2018 David Rosca * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -30,11 +30,7 @@ DesktopNotification::DesktopNotification(bool setPosition) { ui->setupUi(this); setAttribute(Qt::WA_DeleteOnClose); - Qt::WindowFlags flags = Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::X11BypassWindowManagerHint; - setWindowFlags(flags); - - setAttribute(Qt::WA_TranslucentBackground); - setWindowOpacity(0.9); + setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::X11BypassWindowManagerHint); m_timer->setSingleShot(true); connect(m_timer, SIGNAL(timeout()), this, SLOT(close())); @@ -59,20 +55,6 @@ void DesktopNotification::show() QWidget::show(); } -void DesktopNotification::enterEvent(QEvent*) -{ - if (!m_settingPosition) { - setWindowOpacity(0.5); - } -} - -void DesktopNotification::leaveEvent(QEvent*) -{ - if (!m_settingPosition) { - setWindowOpacity(0.9); - } -} - void DesktopNotification::mousePressEvent(QMouseEvent* e) { if (!m_settingPosition) { diff --git a/src/lib/notifications/desktopnotification.h b/src/lib/notifications/desktopnotification.h index da76864eb..fe040bd03 100644 --- a/src/lib/notifications/desktopnotification.h +++ b/src/lib/notifications/desktopnotification.h @@ -1,6 +1,6 @@ /* ============================================================ * Falkon - Qt web browser -* Copyright (C) 2010-2014 David Rosca +* Copyright (C) 2010-2018 David Rosca * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -42,8 +42,6 @@ public: ~DesktopNotification(); private: - void enterEvent(QEvent* e); - void leaveEvent(QEvent* e); void mousePressEvent(QMouseEvent* e); void mouseMoveEvent(QMouseEvent* e);