@@ -28,6 +28,7 @@ Item {
2828 property color headerColor: d.undefinedColor
2929 property color footerColor: d.undefinedColor
3030 property alias imageSource: overlaidImage.source
31+ property url icon
3132 property alias title: header.title
3233 property alias showHeader: header.visible
3334
@@ -42,7 +43,10 @@ Item {
4243 // This is also the default value of a color property in QML.
4344 readonly property color undefinedColor: "#00000000"
4445
45− readonly property color defaultBackgroundColor: ambiancePalette.normal.background
46+ readonly property color defaultBackgroundColor: header.visible ? ambiancePalette.normal.background : "black"
47+
48+ // Splash screen that shows the application icon and splashTitle
49+ readonly property bool showIcon: overlaidImage.status == Image.Null && !root.showHeader
4650 }
4751
4852 StyledItem {
@@ -77,6 +81,7 @@ Item {
7781 left: parent.left
7882 right: parent.right
7983 }
84+ visible: false
8085
8186 // mimic API of toolkit's AppHeader component required by PageHeadStyle
8287 property Item pageStack
@@ -105,10 +110,48 @@ Item {
105110 cache: false
106111 }
107112
113+ UbuntuShape {
114+ id: iconShape
115+ anchors.horizontalCenter: parent.horizontalCenter
116+ anchors.verticalCenter: parent.verticalCenter
117+ anchors.verticalCenterOffset: -units.gu(4)
118+ width: units.gu(8)
119+ height: units.gu(7.5)
120+
121+ visible: d.showIcon
122+
123+ radius: "medium"
124+ borderSource: "none"
125+
126+ image: Image {
127+ id: iconImage
128+ sourceSize.width: iconShape.width
129+ sourceSize.height: iconShape.height
130+ source: d.showIcon ? root.icon : ""
131+ fillMode: Image.PreserveAspectCrop
132+ }
133+ }
134+
135+ Label {
136+ text: root.title
137+ anchors.horizontalCenter: parent.horizontalCenter
138+ anchors.top: iconShape.bottom
139+ anchors.topMargin: units.gu(2)
140+ fontSize: "large"
141+
142+ color: styledItem.theme.palette.selected.backgroundText
143+ visible: d.showIcon
144+ }
145+
108146 ActivityIndicator {
109− anchors.centerIn: parent
147+ anchors.centerIn: header.visible ? parent : undefined
110148 anchors.verticalCenterOffset: header.visible ? header.height / 2 : 0
111− running: overlaidImage.status == Image.Error || overlaidImage.status == Image.Null
149+
150+ anchors.horizontalCenter: header.visible ? undefined : parent.horizontalCenter
151+ anchors.bottom: header.visible ? undefined : parent.bottom
152+ anchors.bottomMargin: header.visible ? 0 : units.gu(12)
153+
154+ running: true//overlaidImage.status == Image.Error || overlaidImage.status == Image.Null
112155 }
113156
114157 MouseArea {