on xenial help sign in
added iconst below tiles
commit701220604bc384b3d6d7576fb67b225e87bdcab0 authorMichael Zanetti <michael.zanetti@canonical.com> dateThu 19 Mar 2015, 15:03 (12 years ago) parente059971
2 files changed+50−19
qml/Stages/DesktopStage.qml+49−18 qml/Stages/SpreadMaths.qml+1−1
qml/Stages/DesktopStage.qml+49−18
@@ -17,6 +17,7 @@
1717 */
1818
1919import QtQuick 2.3
20+import QtQuick.Layouts 1.1
2021import Ubuntu.Components 1.1
2122import Unity.Application 0.1
2223import "../Components/PanelState"
@@ -166,6 +167,10 @@ FocusScope {
166167 target: decoratedWindow
167168 decorationShown: false
168169 }
170+ PropertyChanges {
171+ target: tileInfo
172+ visible: true
173+ }
169174 }
170175 ]
171176 transitions: [
@@ -179,19 +184,6 @@ FocusScope {
179184 property real itemScale: 1
180185 property int itemScaleOriginX: 0
181186 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− ]
195187
196188 SpreadMaths {
197189 id: spreadMaths
@@ -222,13 +214,52 @@ FocusScope {
222214 onClose: ApplicationManager.stopApplication(model.appId)
223215 onMaximize: appDelegate.state = (appDelegate.state == "maximized" ? "normal" : "maximized")
224216 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+ }
225237 }
226238
227− Rectangle {
228− id: darkenOverlay
229− anchors.fill: parent
230− color: "black"
231− opacity: 0
239+
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 {
252+ anchors.fill: parent
253+ source: model.icon
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+ }
232263 }
233264 }
234265 }
qml/Stages/SpreadMaths.qml+1−1
@@ -18,7 +18,7 @@ QtObject {
1818 }
1919
2020 function desktopY(sceneHeight, itemHeight) {
21− return sceneHeight - itemHeight - (sceneHeight * 0.1);
21+ return sceneHeight - itemHeight - (sceneHeight * 0.2);
2222 }
2323
2424 function desktopAngle(index, flickableX) {