on xenial help sign in
theme -> fakeTheme and SuruGradient is deprecated
commit1a740f8e811a15db9a295328cb876d7fd992f816 authorAlbert Astals Cid <albert.astals@canonical.com> dateFri 10 Jul 2015, 10:19 (11 years ago) parent49c31a8
2 files changed+7−8
qml/Stages/MainViewStyle.qml+1−2 qml/Stages/Splash.qml+6−6
qml/Stages/MainViewStyle.qml+1−2
@@ -65,8 +65,7 @@ Item {
6565
6666 Qt bug: https://bugreports.qt-project.org/browse/QTBUG-11712
6767 */
68− property string theme: (ColorUtils.luminance(styledItem.backgroundColor) >= 0.85) ? "Ambiance" :
69− (isGradient ? "SuruGradient" : "SuruDark")
68+ property string theme: (ColorUtils.luminance(styledItem.backgroundColor) >= 0.85) ? "Ambiance" : "SuruDark"
7069 }
7170
7271 // automatically select the appropriate theme depending on the background colors
qml/Stages/Splash.qml+6−6
@@ -63,17 +63,17 @@ Item {
6363 : root.footerColor
6464
6565 // 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 {
6767 property string name
6868 property Palette palette: Qt.createQmlObject("import QtQuick 2.2;\
6969 import Ubuntu.Components.Themes.%1 1.3;\
70− Palette {}".arg(styledItem.theme.name),
70+ Palette {}".arg(styledItem.fakeTheme.name),
7171 styledItem, "dynamicPalette");
7272 }
7373
7474 // FIXME: should instead use future toolkit API:
7575 // style: theme.createStyleComponent("MainViewStyle.qml", styledItem)
76− style: Component { MainViewStyle {theme: styledItem.theme} }
76+ style: Component { MainViewStyle {theme: styledItem.fakeTheme} }
7777 }
7878
7979 StyledItem {
@@ -90,13 +90,13 @@ Item {
9090 property string title
9191 property var tabsModel
9292 property var config: QtObject {
93− property color foregroundColor: styledItem.theme.palette.selected.backgroundText
93+ property color foregroundColor: styledItem.fakeTheme.palette.selected.backgroundText
9494 property var sections: QtObject {}
9595 }
9696
9797 // FIXME: should instead use future toolkit API:
9898 // style: theme.createStyleComponent("PageHeadStyle.qml", header)
99− style: Component { PageHeadStyle {theme: styledItem.theme} }
99+ style: Component { PageHeadStyle {theme: styledItem.fakeTheme} }
100100 }
101101
102102 Image {
@@ -140,7 +140,7 @@ Item {
140140 anchors.topMargin: units.gu(2)
141141 fontSize: "large"
142142
143− color: styledItem.theme.palette.selected.backgroundText
143+ color: styledItem.fakeTheme.palette.selected.backgroundText
144144 visible: d.showIcon
145145 }
146146