@@ -22,8 +22,13 @@ import "../Components"
22StyledItem {
22StyledItem {
25− property string name: ""
25+ property string title: ""
26 property url image: ""
26 property url image: ""
27+ property bool showHeader: true
28+ // mimic API of toolkit's MainView component required by MainViewStyle
29+ property color backgroundColor: theme.palette.normal.background
30+ property color headerColor: backgroundColor
31+ property color footerColor: backgroundColor
28 // FIXME: fake a Theme object as to expose the Palette corresponding to the backgroundColor (see MainViewStyle.qml)
33 // FIXME: fake a Theme object as to expose the Palette corresponding to the backgroundColor (see MainViewStyle.qml)
29 property var theme: QtObject {
34 property var theme: QtObject {
@@ -36,12 +41,6 @@ StyledItem {
36 source: "%1Palette.qml".arg(theme.name)
41 source: "%1Palette.qml".arg(theme.name)
39− // mimic API of toolkit's MainView component required by MainViewStyle
40− property color headerColor: backgroundColor
41− // FIXME: should be read from desktop file and set by SpreadDelegate
42− property color backgroundColor: theme.palette.normal.background
43− property color footerColor: backgroundColor
45 // FIXME: should instead use to be created API from toolkit
44 // FIXME: should instead use to be created API from toolkit
46 // style: theme.createStyleComponent("MainViewStyle.qml", root)
45 // style: theme.createStyleComponent("MainViewStyle.qml", root)
47 style: Component { MainViewStyle {theme: root.theme} }
46 style: Component { MainViewStyle {theme: root.theme} }
@@ -53,10 +52,12 @@ StyledItem {
53 right: parent.right
52 right: parent.right
55+ visible: root.showHeader
56 // mimic API of toolkit's AppHeader component required by PageHeadStyle
57 // mimic API of toolkit's AppHeader component required by PageHeadStyle
57 property Item pageStack
58 property Item pageStack
58 property Item contents
59 property Item contents
59− property string title: root.name
60+ property string title: root.title
60 property var tabsModel
61 property var tabsModel
61 property var config: QtObject {
62 property var config: QtObject {
62 property color foregroundColor: theme.palette.selected.backgroundText
63 property color foregroundColor: theme.palette.selected.backgroundText
@@ -68,10 +69,20 @@ StyledItem {
68 style: Component { PageHeadStyle {theme: root.theme} }
69 style: Component { PageHeadStyle {theme: root.theme} }
73+ anchors.centerIn: parent
74+ anchors.verticalCenterOffset: root.showHeader ? header.height / 2 : 0
71 ActivityIndicator {
82 ActivityIndicator {
72 anchors.centerIn: parent
83 anchors.centerIn: parent
73− anchors.verticalCenterOffset: header.height / 2
84+ anchors.verticalCenterOffset: root.showHeader ? header.height / 2 : 0
74− running: true
85+ running: root.image === ""
77 MouseArea {
88 MouseArea {