on xenial help sign in
drop shadow (glow) around the window
commit0876c086f9d02b97cb3822b4c3bece2321df681f authorLukáš Tinkl <lukas.tinkl@canonical.com> dateTue 3 Nov 2015, 21:13 (11 years ago) parent31be9b0
3 files changed+10−14
qml/Stages/DecoratedWindow.qml+9−11 qml/Stages/DesktopStage.qml−2 qml/Stages/WindowDecoration.qml+1−1
qml/Stages/DecoratedWindow.qml+9−11
@@ -16,8 +16,9 @@
1616 * Authors: Michael Zanetti <michael.zanetti@canonical.com>
1717 */
1818
19−import QtQuick 2.3
20−import Ubuntu.Components 1.1
19+import QtQuick 2.4
20+import QtGraphicalEffects 1.0
21+import Ubuntu.Components 1.2
2122import Unity.Application 0.1
2223
2324FocusScope {
@@ -37,15 +38,6 @@ FocusScope {
3738 signal minimize()
3839 signal decorationPressed()
3940
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−
4941 Rectangle {
5042 id: selectionHighlight
5143 anchors.fill: parent
@@ -61,6 +53,12 @@ FocusScope {
6153 visible: highlightShown
6254 }
6355
56+ RectangularGlow {
57+ anchors.fill: parent
58+ color: "#333333"
59+ glowRadius: active ? units.dp(6) : units.dp(4)
60+ }
61+
6462 WindowDecoration {
6563 id: decoration
6664 target: root.parent
qml/Stages/DesktopStage.qml−2
@@ -12,8 +12,6 @@
1212 *
1313 * You should have received a copy of the GNU General Public License
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− *
16− * Authors: Michael Zanetti <michael.zanetti@canonical.com>
1715 */
1816
1917import QtQuick 2.4
qml/Stages/WindowDecoration.qml+1−1
@@ -93,7 +93,7 @@ MouseArea {
9393 width: parent.width - buttons.width - parent.anchors.rightMargin - parent.anchors.leftMargin
9494 verticalAlignment: Text.AlignVCenter
9595 fontSize: "medium"
96− font.weight: Font.Light
96+ font.weight: root.active ? Font.Light : Font.Normal
9797 elide: Text.ElideRight
9898 }
9999 }