From 53890c9f0ef40ce78aab691ddd5709eb2c32e9f1 Mon Sep 17 00:00:00 2001 From: nowrep Date: Sun, 12 May 2013 10:59:33 +0200 Subject: [PATCH] [Oxygen] Workaround for transparent background of tooltips. Closes #865 --- CHANGELOG | 1 + src/lib/app/qupzilla.cpp | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 34b04d278..baa756ddd 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -9,6 +9,7 @@ Version 1.5.0 * cancel upload when trying to upload non-readable files * GreaseMonkey: added support for GM_Settings * oxygen: set rounded corners for tooltips + * oxygen: workaround for transparent background of tooltips * fixed: size of preferences dialog on low-res screens * fixed: loading plugins with relative paths in portable build diff --git a/src/lib/app/qupzilla.cpp b/src/lib/app/qupzilla.cpp index 201281745..88ad29aa7 100644 --- a/src/lib/app/qupzilla.cpp +++ b/src/lib/app/qupzilla.cpp @@ -85,6 +85,7 @@ #include #include #include +#include #if QT_VERSION < 0x050000 #include "qwebkitversion.h" @@ -343,6 +344,13 @@ void QupZilla::setupUi() statusBar()->insertPermanentWidget(1, m_ipLabel); statusBar()->insertPermanentWidget(2, m_privateBrowsing); statusBar()->insertPermanentWidget(3, m_adblockIcon); + + // Workaround for Oxygen tooltips not having transparent background + QPalette pal = QToolTip::palette(); + QColor col = pal.window().color(); + col.setAlpha(0); + pal.setColor(QPalette::Window, col); + QToolTip::setPalette(pal); } void QupZilla::setupMenu() @@ -802,7 +810,7 @@ void QupZilla::loadSettings() m_sideBarManager->showSideBar(activeSideBar, false); - //Private browsing + // Private browsing m_privateBrowsing->setVisible(mApp->isPrivateSession()); #ifdef Q_OS_WIN @@ -817,7 +825,8 @@ void QupZilla::loadSettings() if (!makeTransparent) { return; } - //Opacity + + // Transparency on X11 (no blur like on Windows) #ifdef QZ_WS_X11 setAttribute(Qt::WA_TranslucentBackground); setAttribute(Qt::WA_NoSystemBackground, false);