Debian Codegraph @

tests/unit/subtheming13/TestStyleChange.qml

raw
1 /*
2 * Copyright 2015 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16 import QtQuick 2.4
17 import Lomiri.Components 1.3
18
19 StyledItem {
20 width: units.gu(40)
21 height: units.gu(71)
22 objectName: "mainStyled"
23
24 ThemeSettings {
25 objectName: "Theme"
26 }
27
28 Component {
29 id: dynamicComponent
30 Item {
31 property alias nestedStyled: innerItem
32 StyledItem {
33 id: innerItem
34 anchors.fill: parent
35 }
36 }
37 }
38
39 Column {
40 objectName: "simpleColumn"
41 anchors.fill: parent
42 StyledItem {
43 objectName: "firstLevelStyled"
44 width: parent.width
45 height: units.gu(20)
46 Item {
47 anchors.fill: parent
48 objectName: "simpleItem"
49 StyledItem {
50 objectName: "secondLevelStyled"
51 anchors.fill: parent
52 Loader {
53 objectName: "thirdLevelLoader"
54 anchors.fill: parent
55 onItemChanged: if (item) item.nestedStyled.objectName = "thirdLevelLoaderStyled"
56 sourceComponent: dynamicComponent
57 }
58 }
59 }
60 }
61 Loader {
62 objectName: "firstLevelLoader"
63 width: parent.width
64 height: units.gu(40)
65 onItemChanged: if (item) item.nestedStyled.objectName = "firstLevelLoaderStyled"
66 sourceComponent: dynamicComponent
67 }
68 }
69 }