on xenial help sign in
added iconst below tiles
7012206Michael Zanetti
qml/Stages/DesktopStage.qml+49−18
@@ -17,6 +17,7 @@
17 */
17 */
18
18
19import QtQuick 2.3
19import QtQuick 2.3
20+import QtQuick.Layouts 1.1
20import Ubuntu.Components 1.1
21import Ubuntu.Components 1.1
21import Unity.Application 0.1
22import Unity.Application 0.1
22import "../Components/PanelState"
23import "../Components/PanelState"
@@ -166,6 +167,10 @@ FocusScope {
166 target: decoratedWindow
167 target: decoratedWindow
167 decorationShown: false
168 decorationShown: false
168 }
169 }
170+ PropertyChanges {
171+ target: tileInfo
172+ visible: true
173+ }
169 }
174 }
170 ]
175 ]
171 transitions: [
176 transitions: [
@@ -179,19 +184,6 @@ FocusScope {
179 property real itemScale: 1
184 property real itemScale: 1
180 property int itemScaleOriginX: 0
185 property int itemScaleOriginX: 0
181 property int itemScaleOriginY: 0
186 property int itemScaleOriginY: 0
182− transform: [
183− Scale {
184− origin.x: itemScaleOriginX
185− origin.y: itemScaleOriginY
186− xScale: itemScale
187− yScale: itemScale
188− },
189− Rotation {
190− origin { x: 0; y: (appDelegate.height - (appDelegate.height * itemScale / 2)) }
191− axis { x: 0; y: 1; z: 0 }
192− angle: appDelegate.angle
193− }
194− ]
195
187
196 SpreadMaths {
188 SpreadMaths {
197 id: spreadMaths
189 id: spreadMaths
@@ -222,13 +214,52 @@ FocusScope {
222 onClose: ApplicationManager.stopApplication(model.appId)
214 onClose: ApplicationManager.stopApplication(model.appId)
223 onMaximize: appDelegate.state = (appDelegate.state == "maximized" ? "normal" : "maximized")
215 onMaximize: appDelegate.state = (appDelegate.state == "maximized" ? "normal" : "maximized")
224 onMinimize: appDelegate.state = "minimized"
216 onMinimize: appDelegate.state = "minimized"
217+
218+ transform: [
219+ Scale {
220+ origin.x: itemScaleOriginX
221+ origin.y: itemScaleOriginY
222+ xScale: itemScale
223+ yScale: itemScale
224+ },
225+ Rotation {
226+ origin { x: 0; y: (appDelegate.height - (appDelegate.height * itemScale / 2)) }
227+ axis { x: 0; y: 1; z: 0 }
228+ angle: appDelegate.angle
229+ }
230+ ]
231+ Rectangle {
232+ id: darkenOverlay
233+ anchors.fill: parent
234+ color: "black"
235+ opacity: 0
236+ }
225 }
237 }
226
238
227− Rectangle {
239+
228− id: darkenOverlay
240+ RowLayout {
241+ id: tileInfo
242+ height: units.gu(6)
243+ width: units.gu(20)
244+ anchors { left: parent.left; top: parent.bottom; topMargin: units.gu(5) }
245+ visible: false
246+ spacing: units.gu(1)
247+
248+ UbuntuShape {
249+ Layout.preferredHeight: parent.height
250+ Layout.preferredWidth: height
251+ image: Image {
229− anchors.fill: parent
252+ anchors.fill: parent
230− color: "black"
253+ source: model.icon
231− opacity: 0
254+ }
255+ }
256+ Label {
257+ Layout.fillWidth: true
258+ Layout.preferredHeight: tileInfo.height * 0.8
259+ text: model.name
260+ wrapMode: Text.WordWrap
261+ maximumLineCount: 2
262+ }
232 }
263 }
233 }
264 }
234 }
265 }
qml/Stages/SpreadMaths.qml+1−1
@@ -18,7 +18,7 @@ QtObject {
18 }
18 }
19
19
20 function desktopY(sceneHeight, itemHeight) {
20 function desktopY(sceneHeight, itemHeight) {
21− return sceneHeight - itemHeight - (sceneHeight * 0.1);
21+ return sceneHeight - itemHeight - (sceneHeight * 0.2);
22 }
22 }
23
23
24 function desktopAngle(index, flickableX) {
24 function desktopAngle(index, flickableX) {