Changeset View
Changeset View
Standalone View
Standalone View
gemini/qml/welcomepages/cloud/dropbox/SetupPage.qml
Show All 12 Lines | |||||
13 | * | 13 | * | ||
14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
17 | */ | 17 | */ | ||
18 | 18 | | |||
19 | import QtQuick 2.0 | 19 | import QtQuick 2.0 | ||
20 | import Calligra.Gemini.Dropbox 1.0 | 20 | import Calligra.Gemini.Dropbox 1.0 | ||
21 | import QtQuick.Controls 1.4 as QtControls | ||||
22 | import org.kde.kirigami 2.1 as Kirigami | ||||
21 | import "../../../components" | 23 | import "../../../components" | ||
22 | 24 | | |||
23 | Item { | 25 | Item { | ||
24 | anchors.fill: parent; | 26 | anchors.fill: parent; | ||
25 | clip: true; | 27 | clip: true; | ||
26 | Rectangle { | 28 | Rectangle { | ||
27 | anchors.fill: parent; | 29 | anchors.fill: parent; | ||
28 | opacity: 0.6; | 30 | opacity: 0.6; | ||
Show All 24 Lines | 49 | CohereButton { | |||
53 | onClicked: { | 55 | onClicked: { | ||
54 | if(controllerMIT.needAuthenticate) { | 56 | if(controllerMIT.needAuthenticate) { | ||
55 | pageStack.push( loginPage ); | 57 | pageStack.push( loginPage ); | ||
56 | } | 58 | } | ||
57 | else { | 59 | else { | ||
58 | signOutNow(); | 60 | signOutNow(); | ||
59 | } | 61 | } | ||
60 | } | 62 | } | ||
61 | Text { | 63 | Kirigami.Label { | ||
62 | anchors { | 64 | anchors { | ||
63 | top: parent.bottom; | 65 | top: parent.bottom; | ||
64 | topMargin: Settings.theme.adjustedPixel(16); | 66 | topMargin: Settings.theme.adjustedPixel(16); | ||
65 | horizontalCenter: parent.horizontalCenter; | 67 | horizontalCenter: parent.horizontalCenter; | ||
66 | } | 68 | } | ||
67 | visible: !controllerMIT.needAuthenticate; | 69 | visible: !controllerMIT.needAuthenticate; | ||
68 | font: Settings.theme.font("application"); | | |||
69 | width: parent.parent.width / 2; | 70 | width: parent.parent.width / 2; | ||
70 | height: font.pixelSize * 6; | 71 | height: font.pixelSize * 6; | ||
71 | horizontalAlignment: Text.AlignHCenter; | 72 | horizontalAlignment: Text.AlignHCenter; | ||
72 | verticalAlignment: Text.AlignTop; | 73 | verticalAlignment: Text.AlignTop; | ||
73 | wrapMode: Text.Wrap; | 74 | wrapMode: Text.Wrap; | ||
74 | text: "You are already signed into DropBox, and we only support one DropBox account. To sign in as another user, please click on the button above to sign out of your current account first."; | 75 | text: "You are already signed into DropBox, and we only support one DropBox account. To sign in as another user, please click on the button above to sign out of your current account first."; | ||
75 | } | 76 | } | ||
76 | } | 77 | } | ||
77 | } | 78 | } | ||
78 | Component { | 79 | Component { | ||
79 | id: loginPage; | 80 | id: loginPage; | ||
80 | LoginPage { } | 81 | LoginPage { } | ||
81 | } | 82 | } | ||
82 | Page { | 83 | Page { | ||
83 | id: signoutconfirmationDlg | 84 | id: signoutconfirmationDlg | ||
84 | //PageHeader { title: "Log Out" } | 85 | //PageHeader { title: "Log Out" } | ||
85 | Rectangle { | 86 | Rectangle { | ||
86 | anchors.fill: parent; | 87 | anchors.fill: parent; | ||
87 | anchors.margins: Settings.theme.adjustedPixel(16); | 88 | anchors.margins: Settings.theme.adjustedPixel(16); | ||
88 | radius: Settings.theme.adjustedPixel(8); | 89 | radius: Settings.theme.adjustedPixel(8); | ||
89 | color: "white"; | 90 | color: "white"; | ||
90 | Text { | 91 | Kirigami.Label { | ||
91 | anchors { | 92 | anchors { | ||
92 | bottom: signoutButtonsRow.top; | 93 | bottom: signoutButtonsRow.top; | ||
93 | left: parent.left; | 94 | left: parent.left; | ||
94 | right: parent.right; | 95 | right: parent.right; | ||
95 | margins: Constants.DefaultMargin; | 96 | margins: Constants.DefaultMargin; | ||
96 | } | 97 | } | ||
97 | color: "black" | | |||
98 | font: Settings.theme.font("application"); | | |||
99 | wrapMode: Text.Wrap | 98 | wrapMode: Text.Wrap | ||
100 | horizontalAlignment: Text.AlignHCenter | 99 | horizontalAlignment: Text.AlignHCenter | ||
101 | text: "Do you really want to log out of DropBox?" | 100 | text: "Do you really want to log out of DropBox?" | ||
102 | } | 101 | } | ||
103 | Row { | 102 | Row { | ||
104 | id: signoutButtonsRow; | 103 | id: signoutButtonsRow; | ||
105 | anchors.centerIn: parent; | 104 | anchors.centerIn: parent; | ||
106 | width: childrenRect.width; | 105 | width: childrenRect.width; | ||
107 | spacing: Settings.theme.adjustedPixel(8); | 106 | spacing: Settings.theme.adjustedPixel(8); | ||
108 | CohereButton { | 107 | QtControls.Button { | ||
109 | textColor: "#5b6573"; | | |||
110 | textSize: Settings.theme.adjustedPixel(18); | | |||
111 | color: "#D2D4D5"; | | |||
112 | text: "Yes" | 108 | text: "Yes" | ||
113 | onClicked: { | 109 | onClicked: { | ||
114 | controllerMIT.logout() | 110 | controllerMIT.logout() | ||
115 | pageStack.pop() | 111 | pageStack.pop() | ||
116 | } | 112 | } | ||
117 | } | 113 | } | ||
118 | CohereButton { | 114 | QtControls.Button { | ||
119 | textColor: "#5b6573"; | | |||
120 | textSize: Settings.theme.adjustedPixel(18); | | |||
121 | color: "#D2D4D5"; | | |||
122 | text: "No" | 115 | text: "No" | ||
123 | onClicked: { | 116 | onClicked: { | ||
124 | pageStack.pop() | 117 | pageStack.pop() | ||
125 | } | 118 | } | ||
126 | } | 119 | } | ||
127 | } | 120 | } | ||
128 | } | 121 | } | ||
129 | } | 122 | } | ||
Show All 10 Lines |