Skip to content
This repository has been archived by the owner on Nov 4, 2023. It is now read-only.

Commit

Permalink
Merge pull request #454 from ubports/xenial_-_blurturbo
Browse files Browse the repository at this point in the history
qml: Even faster blurred Drawer
  • Loading branch information
Flohack74 authored Oct 20, 2022
2 parents aed2ffe + d0947b3 commit 9e34d82
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 16 deletions.
6 changes: 2 additions & 4 deletions qml/Launcher/BackgroundBlur.qml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2016 Canonical, Ltd.
* Copyright (C) 2022 UBports Foundation
*
* 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
Expand Down Expand Up @@ -35,10 +36,7 @@ Item {

FastBlur {
id: fastBlur
x: blurRect.x
y: blurRect.y
width: blurRect.width
height: blurRect.height
anchors.fill: parent
source: shaderEffectSource
radius: units.gu(3)
cached: false
Expand Down
31 changes: 20 additions & 11 deletions qml/Launcher/Launcher.qml
Original file line number Diff line number Diff line change
Expand Up @@ -366,17 +366,26 @@ FocusScope {
}
}

BackgroundBlur {
id: backgroundBlur
anchors.fill: parent
anchors.topMargin: root.inverted ? 0 : -root.topPanelHeight
visible: root.interactiveBlur && root.blurSource && drawer.x > -drawer.width
sourceItem: root.blurSource
blurRect: Qt.rect(panel.width,
root.topPanelHeight,
drawer.width + drawer.x - panel.width,
height - root.topPanelHeight)
occluding: (drawer.width == root.width) && drawer.fullyOpen
Item {
clip: true
x: 0
y: drawer.y
width: drawer.width + drawer.x
height: drawer.height
BackgroundBlur {
id: backgroundBlur
x: 0
y: 0
width: drawer.width
height: drawer.height
visible: root.interactiveBlur && root.blurSource && drawer.x > -drawer.width
sourceItem: root.blurSource
blurRect: Qt.rect(0,
root.topPanelHeight,
drawer.width,
drawer.height)
occluding: (drawer.width == root.width) && drawer.fullyOpen
}
}

Drawer {
Expand Down
2 changes: 1 addition & 1 deletion src/ShellApplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ ShellApplication::ShellApplication(int & argc, char ** argv, bool isMirServer)

{
char buffer[200];
property_get("ubuntu.unity8.interactive_blur", buffer, "false");
property_get("ubuntu.unity8.interactive_blur", buffer, "true");
m_qmlArgs.setInteractiveBlur(QString(buffer) == QStringLiteral("true"));
}

Expand Down

0 comments on commit 9e34d82

Please sign in to comment.