on xenial help sign in
display the maximized window's title in the panel, next to the buttons
1da1ee8Lukáš Tinkl
qml/Panel/Panel.qml+18−1
@@ -137,7 +137,7 @@ Item {
137 }
137 }
138
138
139 shown: false
139 shown: false
140− width: root.width - (windowControlButtons.visible ? windowControlButtons.width : 0)
140+ width: root.width - (windowControlButtons.visible ? windowControlButtons.width + titleLabel.width : 0)
141 minimizedPanelHeight: units.gu(3)
141 minimizedPanelHeight: units.gu(3)
142 expandedPanelHeight: units.gu(7)
142 expandedPanelHeight: units.gu(7)
143 openedHeight: root.height - indicatorOrangeLine.height
143 openedHeight: root.height - indicatorOrangeLine.height
@@ -178,6 +178,23 @@ Item {
178 onMaximize: PanelState.maximize()
178 onMaximize: PanelState.maximize()
179 }
179 }
180
180
181+ Label {
182+ id: titleLabel
183+ objectName: "windowDecorationTitle"
184+ anchors {
185+ left: windowControlButtons.right
186+ top: parent.top
187+ margins: units.gu(0.7)
188+ }
189+ color: "#DFDBD2"
190+ height: windowControlButtons.height
191+ visible: windowControlButtons.visible
192+ verticalAlignment: Text.AlignVCenter
193+ fontSize: "small"
194+ font.bold: true
195+ text: PanelState.title
196+ }
197+
181 PanelSeparatorLine {
198 PanelSeparatorLine {
182 id: indicatorOrangeLine
199 id: indicatorOrangeLine
183 anchors {
200 anchors {
qml/Stages/DecoratedWindow.qml+1
@@ -26,6 +26,7 @@ FocusScope {
26 property alias window: applicationWindow
26 property alias window: applicationWindow
27 property alias application: applicationWindow.application
27 property alias application: applicationWindow.application
28 property alias active: decoration.active
28 property alias active: decoration.active
29+ property alias title: decoration.title
29
30
30 property bool decorationShown: true
31 property bool decorationShown: true
31 property bool highlightShown: false
32 property bool highlightShown: false
qml/Stages/DesktopStage.qml+9
@@ -211,6 +211,14 @@ Rectangle {
211 property: "buttonsVisible"
211 property: "buttonsVisible"
212 value: priv.focusedAppDelegate !== null && priv.focusedAppDelegate.maximized
212 value: priv.focusedAppDelegate !== null && priv.focusedAppDelegate.maximized
213 }
213 }
214+
215+ Binding {
216+ target: PanelState
217+ property: "title"
218+ value: priv.focusedAppDelegate.title
219+ when: priv.focusedAppDelegate && priv.focusedAppDelegate.maximized
220+ }
221+
214 Component.onDestruction: PanelState.buttonsVisible = false;
222 Component.onDestruction: PanelState.buttonsVisible = false;
215
223
216 FocusScope {
224 FocusScope {
@@ -246,6 +254,7 @@ Rectangle {
246 property bool minimized: false
254 property bool minimized: false
247 readonly property string appId: model.appId
255 readonly property string appId: model.appId
248 property bool animationsEnabled: true
256 property bool animationsEnabled: true
257+ property alias title: decoratedWindow.title
249
258
250 onFocusChanged: {
259 onFocusChanged: {
251 if (focus && ApplicationManager.focusedApplicationId !== appId) {
260 if (focus && ApplicationManager.focusedApplicationId !== appId) {