on xenial help sign in
panel improvements
8072745Lukáš Tinkl
qml/Panel/IndicatorsMenu.qml+2−2
@@ -38,7 +38,7 @@ Showable {
38 property bool enableHint: true
38 property bool enableHint: true
39 property bool contentEnabled: true
39 property bool contentEnabled: true
40 property bool showOnClick: true
40 property bool showOnClick: true
41− property color panelColor: "black"
41+ property color panelColor: "#333333"
42
42
43 signal showTapped(point position)
43 signal showTapped(point position)
44
44
@@ -110,7 +110,7 @@ Showable {
110 height: units.gu(0.5)
110 height: units.gu(0.5)
111 gradient: Gradient {
111 gradient: Gradient {
112 GradientStop { position: 0.0; color: "transparent" }
112 GradientStop { position: 0.0; color: "transparent" }
113− GradientStop { position: 1.0; color: "black" }
113+ GradientStop { position: 1.0; color: "#333333" }
114 }
114 }
115 opacity: 0.3
115 opacity: 0.3
116 }
116 }
qml/Panel/MenuContent.qml+1−1
@@ -27,7 +27,7 @@ Rectangle {
27
27
28 property QtObject indicatorsModel: null
28 property QtObject indicatorsModel: null
29 property int currentMenuIndex: -1
29 property int currentMenuIndex: -1
30− color: "#221e1c" // FIXME not in palette yet
30+ color: "#333333" // FIXME not in palette yet
31
31
32 width: units.gu(40)
32 width: units.gu(40)
33 height: units.gu(42)
33 height: units.gu(42)
qml/Panel/Panel.qml+20−10
@@ -39,7 +39,7 @@ Item {
39 fill: parent
39 fill: parent
40 topMargin: panelHeight
40 topMargin: panelHeight
41 }
41 }
42− color: "#333333"
42+ color: "black"
43 opacity: indicators.unitProgress * darkenedOpacity
43 opacity: indicators.unitProgress * darkenedOpacity
44 visible: !indicators.fullyClosed
44 visible: !indicators.fullyClosed
45
45
@@ -57,7 +57,7 @@ Item {
57 anchors.fill: parent
57 anchors.fill: parent
58
58
59 Behavior on anchors.topMargin {
59 Behavior on anchors.topMargin {
60− NumberAnimation { duration: UbuntuAnimation.FastDuration; easing: UbuntuAnimation.StandardEasing }
60+ UbuntuNumberAnimation {}
61 }
61 }
62
62
63 transform: Translate {
63 transform: Translate {
@@ -115,13 +115,16 @@ Item {
115 }
115 }
116
116
117 MouseArea {
117 MouseArea {
118+ id: mouseArea
118 anchors {
119 anchors {
119 top: parent.top
120 top: parent.top
120 left: parent.left
121 left: parent.left
121 right: indicators.left
122 right: indicators.left
122 }
123 }
123 height: indicators.minimizedPanelHeight
124 height: indicators.minimizedPanelHeight
125+ hoverEnabled: true
124 onClicked: { if (callHint.visible) { callHint.showLiveCall(); } }
126 onClicked: { if (callHint.visible) { callHint.showLiveCall(); } }
127+ onDoubleClicked: PanelState.maximize()
125 }
128 }
126
129
127 IndicatorsMenu {
130 IndicatorsMenu {
@@ -166,10 +169,13 @@ Item {
166 anchors {
169 anchors {
167 left: parent.left
170 left: parent.left
168 top: parent.top
171 top: parent.top
172+ leftMargin: units.gu(1)
173+ topMargin: units.gu(0.5)
169− margins: units.gu(0.7)
174+ bottomMargin: units.gu(0.5)
170 }
175 }
171− height: indicators.minimizedPanelHeight - anchors.margins * 2
176+ height: indicators.minimizedPanelHeight - anchors.topMargin - anchors.bottomMargin
172− visible: PanelState.buttonsVisible && !root.locked
177+ visible: PanelState.buttonsVisible && mouseArea.containsMouse && !root.locked && !callHint.visible
178+ active: PanelState.buttonsVisible
173 onClose: PanelState.close()
179 onClose: PanelState.close()
174 onMinimize: PanelState.minimize()
180 onMinimize: PanelState.minimize()
175 onMaximize: PanelState.maximize()
181 onMaximize: PanelState.maximize()
@@ -179,19 +185,23 @@ Item {
179 id: titleLabel
185 id: titleLabel
180 objectName: "windowDecorationTitle"
186 objectName: "windowDecorationTitle"
181 anchors {
187 anchors {
182− left: PanelState.buttonsVisible ? windowControlButtons.right : parent.left // FIXME this should be separate from the buttons, also based on LIM
188+ left: parent.left
183 top: parent.top
189 top: parent.top
190+ leftMargin: units.gu(1)
191+ topMargin: units.gu(0.5)
184− margins: units.gu(0.7)
192+ bottomMargin: units.gu(0.5)
185 }
193 }
186 color: PanelState.buttonsVisible ? "#ffffff" : "#5d5d5d"
194 color: PanelState.buttonsVisible ? "#ffffff" : "#5d5d5d"
187− height: windowControlButtons.height
195+ height: indicators.minimizedPanelHeight - anchors.topMargin - anchors.bottomMargin
188− visible: true // TODO the title should exchange with the menu on mouse hover
196+ visible: !windowControlButtons.visible && !root.locked && !callHint.visible
189 verticalAlignment: Text.AlignVCenter
197 verticalAlignment: Text.AlignVCenter
190 fontSize: "medium"
198 fontSize: "medium"
191− font.weight: Font.Light
199+ font.weight: Font.Normal
192 text: PanelState.title
200 text: PanelState.title
193 }
201 }
194
202
203+ // TODO here would the LIM come
204+
195 PanelSeparatorLine {
205 PanelSeparatorLine {
196 id: indicatorOrangeLine
206 id: indicatorOrangeLine
197 anchors {
207 anchors {
qml/Panel/PanelBackground.qml+1−1
@@ -17,5 +17,5 @@
17import QtQuick 2.0
17import QtQuick 2.0
18
18
19Rectangle {
19Rectangle {
20− color: "black"
20+ color: "#333333"
21}
21}
qml/Stages/DecoratedWindow.qml+1−2
@@ -31,7 +31,6 @@ FocusScope {
31
31
32 property bool decorationShown: true
32 property bool decorationShown: true
33 property bool highlightShown: false
33 property bool highlightShown: false
34− property real shadowOpacity: 1
35
34
36 signal close()
35 signal close()
37 signal maximize()
36 signal maximize()
@@ -53,7 +52,7 @@ FocusScope {
53 visible: highlightShown
52 visible: highlightShown
54 }
53 }
55
54
56− RectangularGlow {
55+ RectangularGlow { // drop shadow around the window
57 anchors.fill: parent
56 anchors.fill: parent
58 color: "#333333"
57 color: "#333333"
59 glowRadius: active ? units.dp(6) : units.dp(4)
58 glowRadius: active ? units.dp(6) : units.dp(4)
qml/Stages/DesktopStage.qml+13−3
@@ -175,7 +175,8 @@ Rectangle {
175 ApplicationManager.stopApplication(ApplicationManager.focusedApplicationId)
175 ApplicationManager.stopApplication(ApplicationManager.focusedApplicationId)
176 }
176 }
177 onMinimize: appRepeater.itemAt(0).minimize(true);
177 onMinimize: appRepeater.itemAt(0).minimize(true);
178− onMaximize: appRepeater.itemAt(0).restore();
178+ onMaximize: priv.focusedAppDelegate // don't restore minimized apps when double clicking the panel
179+ && priv.focusedAppDelegate.restore();
179 }
180 }
180
181
181 Binding {
182 Binding {
@@ -187,8 +188,16 @@ Rectangle {
187 Binding {
188 Binding {
188 target: PanelState
189 target: PanelState
189 property: "title"
190 property: "title"
191+ value: {
190− value: priv.focusedAppDelegate !== null && priv.focusedAppDelegate.title
192+ if (priv.focusedAppDelegate !== null) {
193+ if (priv.focusedAppDelegate.maximized)
194+ return priv.focusedAppDelegate.title
195+ else
196+ return priv.focusedAppDelegate.appName
197+ }
198+ return ""
199+ }
191− when: priv.focusedAppDelegate && priv.focusedAppDelegate.maximized
200+ when: priv.focusedAppDelegate
192 }
201 }
193
202
194 Component.onDestruction: PanelState.buttonsVisible = false;
203 Component.onDestruction: PanelState.buttonsVisible = false;
@@ -227,6 +236,7 @@ Rectangle {
227 readonly property string appId: model.appId
236 readonly property string appId: model.appId
228 property bool animationsEnabled: true
237 property bool animationsEnabled: true
229 property alias title: decoratedWindow.title
238 property alias title: decoratedWindow.title
239+ readonly property string appName: model.name
230
240
231 onFocusChanged: {
241 onFocusChanged: {
232 if (focus && ApplicationManager.focusedApplicationId !== appId) {
242 if (focus && ApplicationManager.focusedApplicationId !== appId) {
qml/Stages/WindowDecoration.qml+3
@@ -32,6 +32,8 @@ MouseArea {
32 signal minimize()
32 signal minimize()
33 signal maximize()
33 signal maximize()
34
34
35+ onDoubleClicked: root.maximize()
36+
35 QtObject {
37 QtObject {
36 id: priv
38 id: priv
37 property real distanceX
39 property real distanceX
@@ -71,6 +73,7 @@ MouseArea {
71 anchors {
73 anchors {
72 fill: parent
74 fill: parent
73 leftMargin: units.gu(1)
75 leftMargin: units.gu(1)
76+ rightMargin: units.gu(1)
74 topMargin: units.gu(0.5)
77 topMargin: units.gu(0.5)
75 bottomMargin: units.gu(0.5)
78 bottomMargin: units.gu(0.5)
76 }
79 }