mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
[Windows] Fixed disabling transparent effect when composition is disabled by OS.
This commit is contained in:
parent
13b3bc0409
commit
dfa2218893
|
@ -1600,6 +1600,7 @@ SideBar* QupZilla::addSideBar()
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
if (QtWin::isCompositionEnabled()) {
|
if (QtWin::isCompositionEnabled()) {
|
||||||
|
applyBlurToMainWindow();
|
||||||
m_sideBar.data()->installEventFilter(this);
|
m_sideBar.data()->installEventFilter(this);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -2491,6 +2492,9 @@ bool QupZilla::nativeEvent(const QByteArray &eventType, void* _message, long* re
|
||||||
}
|
}
|
||||||
setUpdatesEnabled(true);
|
setUpdatesEnabled(true);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
m_usingTransparentBackground = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#if (QT_VERSION < 0x050000)
|
#if (QT_VERSION < 0x050000)
|
||||||
return QMainWindow::winEvent(message, result);
|
return QMainWindow::winEvent(message, result);
|
||||||
|
@ -2501,7 +2505,7 @@ bool QupZilla::nativeEvent(const QByteArray &eventType, void* _message, long* re
|
||||||
|
|
||||||
void QupZilla::paintEvent(QPaintEvent* event)
|
void QupZilla::paintEvent(QPaintEvent* event)
|
||||||
{
|
{
|
||||||
if (m_usingTransparentBackground && !m_actionShowFullScreen->isChecked()) {
|
if (isTransparentBackgroundAllowed()) {
|
||||||
QPainter p(this);
|
QPainter p(this);
|
||||||
p.setCompositionMode(QPainter::CompositionMode_Clear);
|
p.setCompositionMode(QPainter::CompositionMode_Clear);
|
||||||
p.fillRect(event->rect(), QColor(0, 0, 0, 0));
|
p.fillRect(event->rect(), QColor(0, 0, 0, 0));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user