~ken-vandine/ubuntu-system-settings/no_s_i_d

« back to all changes in this revision

Viewing changes to plugins/reset/PageComponent.qml

  • Committer: Bileto Bot
  • Author(s): Ken VanDine
  • Date: 2016-07-22 14:38:13 UTC
  • mfrom: (1556.3.32 slotsLayout)
  • Revision ID: ci-train-bot@canonical.com-20160722143813-ht9e4766lm0ie5fa
Ported to use Slots layout and updated visuals (LP: #1596529)

Approved by: Jonas G. Drange

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * This file is part of system-settings
3
3
 *
4
 
 * Copyright (C) 2013 Canonical Ltd.
 
4
 * Copyright (C) 2013-2016 Canonical Ltd.
5
5
 *
6
6
 * Contact: Alberto Mardegan <alberto.mardegan@canonical.com>
7
7
 *
21
21
import GSettings 1.0
22
22
import QtQuick 2.4
23
23
import SystemSettings 1.0
 
24
import SystemSettings.ListItems 1.0 as SettingsListItems
24
25
import Ubuntu.Components 1.3
25
 
import Ubuntu.Components.ListItems 1.3 as ListItem
26
26
import Ubuntu.Components.Popups 1.3
27
27
import Ubuntu.SystemSettings.Reset 1.0
28
28
 
66
66
            anchors.left: parent.left
67
67
            anchors.right: parent.right
68
68
 
69
 
            ListItem.SingleControl {
70
 
                control: Button {
 
69
            Label {
 
70
                anchors {
 
71
                    left: parent.left
 
72
                    right: parent.right
 
73
                    margins: units.gu(2)
 
74
                }
 
75
                text: i18n.tr("Reset Launcher")
 
76
                color: UbuntuColors.orange
 
77
                height: units.gu(6)
 
78
                verticalAlignment: Text.AlignVCenter
 
79
            }
 
80
 
 
81
            SettingsListItems.Standard {
 
82
 
 
83
                Button {
71
84
                    id: resetLauncherHomeButton
72
85
                    objectName: "resetLauncher"
73
86
                    text: i18n.tr("Reset Launcher")
74
 
                    width: parent.width - units.gu(4)
75
87
                    onClicked: {
76
88
                        buttonActions.source = "ResetLauncherHome.qml";
77
89
                        root.popup = PopupUtils.open(buttonActions.item);
78
90
                    }
79
91
                }
80
 
                showDivider: false
81
 
            }
82
 
 
83
 
            ListItem.SingleControl {
84
 
                visible: false // enabled when backend is ready/useful
85
 
                control: Button {
 
92
            }
 
93
 
 
94
            Label {
 
95
                anchors {
 
96
                    left: parent.left
 
97
                    right: parent.right
 
98
                    margins: units.gu(2)
 
99
                }
 
100
                visible: showAllUI
 
101
                text: i18n.tr("Reset all system settings…")
 
102
                color: UbuntuColors.orange
 
103
                height: units.gu(6)
 
104
                verticalAlignment: Text.AlignVCenter
 
105
            }
 
106
 
 
107
            SettingsListItems.Standard {
 
108
                visible: showAllUI
 
109
 
 
110
                Button {
86
111
                    id: resetAllSettingsButton
87
112
                    text: i18n.tr("Reset all system settings…")
88
 
                    width: parent.width - units.gu(4)
89
113
                    onClicked: {
90
114
                        buttonActions.source = "ResetAllSettings.qml";
91
115
                        root.popup = PopupUtils.open(buttonActions.item);
92
116
                    }
93
117
                }
94
 
                showDivider: false
95
 
            }
96
 
 
97
 
            ListItem.SingleControl {
98
 
                control: Button {
 
118
            }
 
119
 
 
120
            Label {
 
121
                anchors {
 
122
                    left: parent.left
 
123
                    right: parent.right
 
124
                    margins: units.gu(2)
 
125
                }
 
126
                text: i18n.tr("Erase & Reset All")
 
127
                color: UbuntuColors.orange
 
128
                height: units.gu(6)
 
129
                verticalAlignment: Text.AlignVCenter
 
130
            }
 
131
 
 
132
            SettingsListItems.Standard {
 
133
 
 
134
                Button {
99
135
                    id: eraseEverythingButton
100
136
                    objectName: "factoryReset"
101
 
                    text: i18n.tr("Erase & Reset Everything…")
102
 
                    width: parent.width - units.gu(4)
 
137
 
 
138
                    text: i18n.tr("Erase & Reset All")
103
139
                    onClicked: {
104
140
                        buttonActions.source = "EraseEverything.qml";
105
141
                        root.popup = PopupUtils.open(buttonActions.item);
106
142
                    }
107
143
                }
108
 
                showDivider: false
109
144
            }
110
145
        }
111
146
    }