on xenial help sign in
theme -> fakeTheme and SuruGradient is deprecated
1a740f8Albert Astals Cid
qml/Stages/MainViewStyle.qml+1−2
@@ -65,8 +65,7 @@ Item {
65
65
66 Qt bug: https://bugreports.qt-project.org/browse/QTBUG-11712
66 Qt bug: https://bugreports.qt-project.org/browse/QTBUG-11712
67 */
67 */
68− property string theme: (ColorUtils.luminance(styledItem.backgroundColor) >= 0.85) ? "Ambiance" :
68+ property string theme: (ColorUtils.luminance(styledItem.backgroundColor) >= 0.85) ? "Ambiance" : "SuruDark"
69− (isGradient ? "SuruGradient" : "SuruDark")
70 }
69 }
71
70
72 // automatically select the appropriate theme depending on the background colors
71 // automatically select the appropriate theme depending on the background colors
qml/Stages/Splash.qml+6−6
@@ -63,17 +63,17 @@ Item {
63 : root.footerColor
63 : root.footerColor
64
64
65 // FIXME: fake a Theme object as to expose the Palette corresponding to the backgroundColor (see MainViewStyle.qml)
65 // FIXME: fake a Theme object as to expose the Palette corresponding to the backgroundColor (see MainViewStyle.qml)
66− property var theme: QtObject {
66+ property var fakeTheme: QtObject {
67 property string name
67 property string name
68 property Palette palette: Qt.createQmlObject("import QtQuick 2.2;\
68 property Palette palette: Qt.createQmlObject("import QtQuick 2.2;\
69 import Ubuntu.Components.Themes.%1 1.3;\
69 import Ubuntu.Components.Themes.%1 1.3;\
70− Palette {}".arg(styledItem.theme.name),
70+ Palette {}".arg(styledItem.fakeTheme.name),
71 styledItem, "dynamicPalette");
71 styledItem, "dynamicPalette");
72 }
72 }
73
73
74 // FIXME: should instead use future toolkit API:
74 // FIXME: should instead use future toolkit API:
75 // style: theme.createStyleComponent("MainViewStyle.qml", styledItem)
75 // style: theme.createStyleComponent("MainViewStyle.qml", styledItem)
76− style: Component { MainViewStyle {theme: styledItem.theme} }
76+ style: Component { MainViewStyle {theme: styledItem.fakeTheme} }
77 }
77 }
78
78
79 StyledItem {
79 StyledItem {
@@ -90,13 +90,13 @@ Item {
90 property string title
90 property string title
91 property var tabsModel
91 property var tabsModel
92 property var config: QtObject {
92 property var config: QtObject {
93− property color foregroundColor: styledItem.theme.palette.selected.backgroundText
93+ property color foregroundColor: styledItem.fakeTheme.palette.selected.backgroundText
94 property var sections: QtObject {}
94 property var sections: QtObject {}
95 }
95 }
96
96
97 // FIXME: should instead use future toolkit API:
97 // FIXME: should instead use future toolkit API:
98 // style: theme.createStyleComponent("PageHeadStyle.qml", header)
98 // style: theme.createStyleComponent("PageHeadStyle.qml", header)
99− style: Component { PageHeadStyle {theme: styledItem.theme} }
99+ style: Component { PageHeadStyle {theme: styledItem.fakeTheme} }
100 }
100 }
101
101
102 Image {
102 Image {
@@ -140,7 +140,7 @@ Item {
140 anchors.topMargin: units.gu(2)
140 anchors.topMargin: units.gu(2)
141 fontSize: "large"
141 fontSize: "large"
142
142
143− color: styledItem.theme.palette.selected.backgroundText
143+ color: styledItem.fakeTheme.palette.selected.backgroundText
144 visible: d.showIcon
144 visible: d.showIcon
145 }
145 }
146
146