on xenial help sign in
drop shadow (glow) around the window
0876c08Lukáš Tinkl
qml/Stages/DecoratedWindow.qml+9−11
@@ -16,8 +16,9 @@
16 * Authors: Michael Zanetti <michael.zanetti@canonical.com>
16 * Authors: Michael Zanetti <michael.zanetti@canonical.com>
17 */
17 */
18
18
19−import QtQuick 2.3
19+import QtQuick 2.4
20+import QtGraphicalEffects 1.0
20−import Ubuntu.Components 1.1
21+import Ubuntu.Components 1.2
21import Unity.Application 0.1
22import Unity.Application 0.1
22
23
23FocusScope {
24FocusScope {
@@ -37,15 +38,6 @@ FocusScope {
37 signal minimize()
38 signal minimize()
38 signal decorationPressed()
39 signal decorationPressed()
39
40
40− BorderImage {
41− anchors {
42− fill: root
43− margins: -units.gu(2)
44− }
45− source: "graphics/dropshadow2gu.sci"
46− opacity: root.shadowOpacity * .3
47− }
48−
49 Rectangle {
41 Rectangle {
50 id: selectionHighlight
42 id: selectionHighlight
51 anchors.fill: parent
43 anchors.fill: parent
@@ -61,6 +53,12 @@ FocusScope {
61 visible: highlightShown
53 visible: highlightShown
62 }
54 }
63
55
56+ RectangularGlow {
57+ anchors.fill: parent
58+ color: "#333333"
59+ glowRadius: active ? units.dp(6) : units.dp(4)
60+ }
61+
64 WindowDecoration {
62 WindowDecoration {
65 id: decoration
63 id: decoration
66 target: root.parent
64 target: root.parent
qml/Stages/DesktopStage.qml−2
@@ -12,8 +12,6 @@
12 *
12 *
13 * You should have received a copy of the GNU General Public License
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− *
16− * Authors: Michael Zanetti <michael.zanetti@canonical.com>
17 */
15 */
18
16
19import QtQuick 2.4
17import QtQuick 2.4
qml/Stages/WindowDecoration.qml+1−1
@@ -93,7 +93,7 @@ MouseArea {
93 width: parent.width - buttons.width - parent.anchors.rightMargin - parent.anchors.leftMargin
93 width: parent.width - buttons.width - parent.anchors.rightMargin - parent.anchors.leftMargin
94 verticalAlignment: Text.AlignVCenter
94 verticalAlignment: Text.AlignVCenter
95 fontSize: "medium"
95 fontSize: "medium"
96− font.weight: Font.Light
96+ font.weight: root.active ? Font.Light : Font.Normal
97 elide: Text.ElideRight
97 elide: Text.ElideRight
98 }
98 }
99 }
99 }