88
88
iconName: 'torch-off'
89
89
visible: gallery.theme.name == 'Ubuntu.Components.Themes.SuruDark'
90
90
onTriggered: gallery.theme.name = 'Ubuntu.Components.Themes.Ambiance'
93
text: i18n.tr('About')
95
onTriggered: layout.addPageToCurrentColumn(mainPage, Qt.resolvedUrl("About.qml"))
100
if (layout.columns < 2) {
101
widgetList.currentIndex = -1;
104
widgetList.openPage();
95
109
color: Qt.rgba(0.0, 0.0, 0.0, 0.01)
96
110
anchors.fill: parent
100
114
objectName: "widgetList"
101
115
anchors.fill: parent
102
116
model: widgetsModel
104
delegate: ListItem.Standard {
119
onCurrentIndexChanged: openPage()
121
function openPage() {
122
if (!mainPage.active || currentIndex < 0) return;
123
var modelData = model.get(currentIndex);
124
var source = Qt.resolvedUrl(modelData.source);
125
layout.addPageToNextColumn(mainPage, source, {title: modelData.label});
106
129
objectName: model.objectName
107
enabled: model.source != ""
109
selected: index === widgetList.currentIndex
111
var source = Qt.resolvedUrl(model.source);
112
layout.addPageToNextColumn(mainPage, source, {title: model.label});
114
widgetList.currentIndex = index;
131
anchors.leftMargin: units.gu(2)
132
anchors.rightMargin: units.gu(2)
134
enabled: source != ""
135
onClicked: widgetList.currentIndex = index
140
rightMargin: units.gu(4)
143
verticalAlignment: Text.AlignVCenter
150
verticalCenter: parent.verticalCenter
155
highlight: Rectangle {
156
color: theme.palette.selected.background
158
highlightMoveDuration: 0