on xenial help sign in
some minor improvements
8df007eMichael Zanetti
qml/Stages/DesktopStage.qml+5−2
@@ -17,9 +17,11 @@ Item {
17
17
18 onFocusRequested: {
18 onFocusRequested: {
19 var appIndex = priv.indexOf(appId);
19 var appIndex = priv.indexOf(appId);
20− ApplicationManager.move(appIndex, 0);
20+ var appDelegate = appRepeater.itemAt(appIndex);
21+ if (appDelegate.state === "minimized") {
22+ appDelegate.state = "normal"
23+ }
21 ApplicationManager.focusApplication(appId);
24 ApplicationManager.focusApplication(appId);
22− appRepeater.itemAt(appIndex).state = "normal"
23 }
25 }
24 }
26 }
25
27
@@ -128,6 +130,7 @@ Item {
128 onClose: ApplicationManager.stopApplication(model.appId)
130 onClose: ApplicationManager.stopApplication(model.appId)
129 onMaximize: appDelegate.state = (appDelegate.state == "maximized" ? "normal" : "maximized")
131 onMaximize: appDelegate.state = (appDelegate.state == "maximized" ? "normal" : "maximized")
130 onMinimize: appDelegate.state = "minimized"
132 onMinimize: appDelegate.state = "minimized"
133+ active: ApplicationManager.focusedApplicationId == model.appId
131 }
134 }
132
135
133 ApplicationWindow {
136 ApplicationWindow {
qml/Stages/WindowDecoration.qml+2
@@ -6,6 +6,7 @@ Item {
6 clip: true
6 clip: true
7
7
8 property alias title: titleLabel.text
8 property alias title: titleLabel.text
9+ property bool active: false
9
10
10 signal close()
11 signal close()
11 signal minimize()
12 signal minimize()
@@ -24,6 +25,7 @@ Item {
24 Row {
25 Row {
25 anchors { left: parent.left; top: parent.top; bottom: parent.bottom; margins: units.gu(0.7) }
26 anchors { left: parent.left; top: parent.top; bottom: parent.bottom; margins: units.gu(0.7) }
26 spacing: units.gu(0.5)
27 spacing: units.gu(0.5)
28+ opacity: root.active ? 1 : 0.5
27 Rectangle {
29 Rectangle {
28 height: parent.height; width: height; radius: height / 2
30 height: parent.height; width: height; radius: height / 2
29 gradient: Gradient {
31 gradient: Gradient {