|
1 | 1 | import QtQuick 2.15 |
2 | 2 | import QtQuick.Controls 2.5 |
3 | 3 | import QtQuick.Layouts 1.3 |
| 4 | +import QtGraphicalEffects 1.15 |
| 5 | + |
4 | 6 |
|
5 | 7 | import "../GameScreens" |
6 | 8 | import "../" |
| 9 | +import "../common" |
7 | 10 | import AppStyle 1.0 |
8 | 11 | import FontStyle 1.0 |
9 | 12 |
|
10 | | -ScreenPage { |
| 13 | +Page{ |
11 | 14 | id:root |
12 | | - contentHeight: mainLayout.implicitHeight |
13 | | - property bool isBold: false |
14 | | - Page { |
15 | | - anchors.fill: parent |
| 15 | + padding: 0 |
| 16 | + clip: true |
| 17 | + header: RoundedRectangle { |
16 | 18 | clip: true |
17 | | - background: Rectangle{ |
18 | | - anchors.fill: parent |
| 19 | + anchors.left: parent.left |
| 20 | + anchors.right: parent.right |
| 21 | + width: parent.width; height: 80 |
| 22 | + color: AppStyle.transparent//"#e17055" |
| 23 | + radius: 8 |
| 24 | + radiusCorners: Qt.AlignLeft | Qt.AlignRight | Qt.AlignTop |
| 25 | + Rectangle{ |
| 26 | + visible: bodyPage.flicking || bodyPage.position > 0 |
| 27 | + color: Qt.darker("grey",1.09) |
| 28 | + height: 1.5 |
| 29 | + anchors.leftMargin: 1 |
| 30 | + anchors.rightMargin: 1 |
| 31 | + anchors.left: parent.left |
| 32 | + anchors.right: parent.right |
| 33 | + anchors.bottom: parent.bottom |
| 34 | + } |
| 35 | + PrefsButton { |
| 36 | + width: 32 |
| 37 | + height: 32 |
| 38 | + buttonText: "⮜"; |
| 39 | + innerText.color: state === 'Hovering' ? "white" : AppStyle.textColor |
19 | 40 | color: AppStyle.transparent |
| 41 | + hoverColor: AppStyle.applicationColorLighter |
| 42 | + pressColor: AppStyle.applicationColorLighter |
| 43 | + borderColor: AppStyle.transparent |
| 44 | + fontSize: 24 |
| 45 | + borderWidth: 1 |
| 46 | + borderRadius: 6 |
| 47 | + |
| 48 | + anchors{ |
| 49 | + left: parent.left |
| 50 | + leftMargin: 15 |
| 51 | + verticalCenter: parent.verticalCenter |
| 52 | + } |
| 53 | + |
| 54 | + onClicked: { |
| 55 | + close() |
| 56 | + } |
20 | 57 | } |
21 | | - header: Rectangle{ |
22 | 58 |
|
| 59 | + PrefsTextField{ |
| 60 | + backwidth: parent.width * 0.8 |
| 61 | + horizontalAlignment:Text.AlignLeft |
| 62 | + anchors{ |
| 63 | + verticalCenter: parent.verticalCenter |
| 64 | + horizontalCenter: parent.horizontalCenter |
| 65 | + leftMargin: 10 |
| 66 | + rightMargin: 10 |
| 67 | + } |
| 68 | + |
| 69 | + placeholderText:qsTr("What would you like to add 1Password ?") |
23 | 70 | } |
24 | 71 |
|
25 | | - ColumnLayout{ |
26 | | - id: mainLayout |
27 | | - anchors.left: parent.left |
28 | | - anchors.right: parent.right |
29 | | - spacing: 20 |
| 72 | + PrefsButton { |
| 73 | + width: 32 |
| 74 | + height: 32 |
| 75 | + buttonText: "🗙"; |
| 76 | + innerText.color: state === 'Hovering' ? "white" : AppStyle.textColor |
| 77 | + color: AppStyle.transparent |
| 78 | + hoverColor: AppStyle.applicationColorLighter |
| 79 | + pressColor: AppStyle.applicationColorLighter |
| 80 | + borderColor: AppStyle.transparent |
| 81 | + fontSize: 24 |
| 82 | + borderWidth: 1 |
| 83 | + borderRadius: 6 |
| 84 | + anchors{ |
| 85 | + right: parent.right |
| 86 | + rightMargin: 15 |
| 87 | + verticalCenter: parent.verticalCenter |
| 88 | + } |
| 89 | + onClicked: { |
| 90 | + close() |
| 91 | + } |
| 92 | + } |
| 93 | + } |
| 94 | + |
| 95 | + background: Rectangle{ |
| 96 | + anchors.fill: parent |
| 97 | + color: AppStyle.transparent |
| 98 | + radius: 8 |
| 99 | + } |
| 100 | + |
| 101 | + contentData:ScreenPage { |
| 102 | + id:bodyPage |
| 103 | + anchors.fill: parent |
| 104 | + anchors.margins: 10 |
| 105 | + contentHeight: mainLayout.implicitHeight |
| 106 | + property bool isBold: false |
| 107 | + clip: true |
| 108 | + Page { |
| 109 | + anchors.fill: parent |
| 110 | + clip: true |
| 111 | + background:root.background |
| 112 | + ColumnLayout{ |
| 113 | + id: mainLayout |
| 114 | + anchors.left: parent.left |
| 115 | + anchors.right: parent.right |
| 116 | + spacing: 10 |
| 117 | + |
| 118 | + ListView{ |
| 119 | + id:listItemView |
| 120 | + width: parent.width |
| 121 | + clip: true |
| 122 | + Layout.fillWidth: true |
| 123 | + implicitHeight: 200 |
| 124 | + anchors.margins: 10 |
| 125 | + focus: true |
| 126 | + spacing: 20 |
| 127 | + orientation: ListView.Horizontal |
| 128 | + highlightFollowsCurrentItem :true |
| 129 | + onCurrentIndexChanged: { |
| 130 | + //root.switchPage(currentIndex) |
| 131 | + } |
| 132 | + |
| 133 | + highlight: Rectangle { |
| 134 | + width: parent.height * 0.7 |
| 135 | + height: parent.height * 0.7 |
| 136 | + Layout.alignment: Qt.AlignVCenter |
| 137 | + Layout.leftMargin: 10 |
| 138 | + radius: 8 |
| 139 | + color: AppStyle.transparent |
| 140 | + focus: true |
| 141 | + } |
| 142 | + |
| 143 | + model: CategoriesListModel{} |
| 144 | + delegate: PrefsCategoriesDelegate{ |
| 145 | + width: 180 |
| 146 | + height: 180 |
| 147 | + iconRectIcon: iconName |
| 148 | + iconRectColor: iconColor |
| 149 | + onClicked:{ |
| 150 | + ListView.view.currentIndex = index |
| 151 | + //root.switchPage(index) |
| 152 | + } |
| 153 | + } |
| 154 | + } |
| 155 | + |
| 156 | + RowLayout{ |
| 157 | + Layout.fillWidth: true |
| 158 | + Layout.alignment: Qt.AlignHCenter |
| 159 | + spacing: 30 |
| 160 | + PrefsItemDelegate{ |
| 161 | + Layout.preferredWidth: root.width * 0.42 |
| 162 | + name: "Login" |
| 163 | + } |
| 164 | + |
| 165 | + PrefsItemDelegate{ |
| 166 | + Layout.preferredWidth: root.width * 0.42 |
| 167 | + name: "Secure Notes" |
| 168 | + } |
| 169 | + } |
| 170 | + RowLayout{ |
| 171 | + Layout.fillWidth: true |
| 172 | + Layout.alignment: Qt.AlignHCenter |
| 173 | + spacing: 30 |
| 174 | + PrefsItemDelegate{ |
| 175 | + Layout.preferredWidth: root.width * 0.42 |
| 176 | + name: "Login" |
| 177 | + } |
| 178 | + |
| 179 | + PrefsItemDelegate{ |
| 180 | + Layout.preferredWidth: root.width * 0.42 |
| 181 | + name: "Secure Notes" |
| 182 | + } |
| 183 | + } |
| 184 | + RowLayout{ |
| 185 | + Layout.fillWidth: true |
| 186 | + Layout.alignment: Qt.AlignHCenter |
| 187 | + spacing: 30 |
| 188 | + PrefsItemDelegate{ |
| 189 | + Layout.preferredWidth: root.width * 0.42 |
| 190 | + name: "Login" |
| 191 | + } |
| 192 | + |
| 193 | + PrefsItemDelegate{ |
| 194 | + Layout.preferredWidth: root.width * 0.42 |
| 195 | + name: "Secure Notes" |
| 196 | + } |
| 197 | + } |
| 198 | + RowLayout{ |
| 199 | + Layout.fillWidth: true |
| 200 | + Layout.alignment: Qt.AlignHCenter |
| 201 | + spacing: 30 |
| 202 | + PrefsItemDelegate{ |
| 203 | + Layout.preferredWidth: root.width * 0.42 |
| 204 | + name: "Login" |
| 205 | + } |
| 206 | + |
| 207 | + PrefsItemDelegate{ |
| 208 | + Layout.preferredWidth: root.width * 0.42 |
| 209 | + name: "Secure Notes" |
| 210 | + } |
| 211 | + } |
| 212 | + RowLayout{ |
| 213 | + Layout.fillWidth: true |
| 214 | + Layout.alignment: Qt.AlignHCenter |
| 215 | + spacing: 30 |
| 216 | + PrefsItemDelegate{ |
| 217 | + Layout.preferredWidth: root.width * 0.42 |
| 218 | + name: "Login" |
| 219 | + } |
| 220 | + |
| 221 | + PrefsItemDelegate{ |
| 222 | + Layout.preferredWidth: root.width * 0.42 |
| 223 | + name: "Secure Notes" |
| 224 | + } |
| 225 | + } |
| 226 | + RowLayout{ |
| 227 | + Layout.fillWidth: true |
| 228 | + Layout.alignment: Qt.AlignHCenter |
| 229 | + spacing: 30 |
| 230 | + PrefsItemDelegate{ |
| 231 | + Layout.preferredWidth: root.width * 0.42 |
| 232 | + name: "Login" |
| 233 | + } |
| 234 | + |
| 235 | + PrefsItemDelegate{ |
| 236 | + Layout.preferredWidth: root.width * 0.42 |
| 237 | + name: "Secure Notes" |
| 238 | + } |
| 239 | + } |
| 240 | + RowLayout{ |
| 241 | + Layout.fillWidth: true |
| 242 | + Layout.alignment: Qt.AlignHCenter |
| 243 | + spacing: 30 |
| 244 | + PrefsItemDelegate{ |
| 245 | + Layout.preferredWidth: root.width * 0.42 |
| 246 | + name: "Login" |
| 247 | + } |
| 248 | + |
| 249 | + PrefsItemDelegate{ |
| 250 | + Layout.preferredWidth: root.width * 0.42 |
| 251 | + name: "Secure Notes" |
| 252 | + } |
| 253 | + } |
| 254 | + RowLayout{ |
| 255 | + Layout.fillWidth: true |
| 256 | + Layout.alignment: Qt.AlignHCenter |
| 257 | + spacing: 30 |
| 258 | + PrefsItemDelegate{ |
| 259 | + Layout.preferredWidth: root.width * 0.42 |
| 260 | + name: "Login" |
| 261 | + } |
| 262 | + |
| 263 | + PrefsItemDelegate{ |
| 264 | + Layout.preferredWidth: root.width * 0.42 |
| 265 | + name: "Secure Notes" |
| 266 | + } |
| 267 | + } |
| 268 | + RowLayout{ |
| 269 | + Layout.fillWidth: true |
| 270 | + Layout.alignment: Qt.AlignHCenter |
| 271 | + spacing: 30 |
| 272 | + PrefsItemDelegate{ |
| 273 | + Layout.preferredWidth: root.width * 0.42 |
| 274 | + name: "Login" |
| 275 | + } |
| 276 | + |
| 277 | + PrefsItemDelegate{ |
| 278 | + Layout.preferredWidth: root.width * 0.42 |
| 279 | + name: "Secure Notes" |
| 280 | + } |
| 281 | + } |
| 282 | + RowLayout{ |
| 283 | + Layout.fillWidth: true |
| 284 | + Layout.alignment: Qt.AlignHCenter |
| 285 | + spacing: 30 |
| 286 | + PrefsItemDelegate{ |
| 287 | + Layout.preferredWidth: root.width * 0.42 |
| 288 | + name: "Login" |
| 289 | + } |
| 290 | + |
| 291 | + PrefsItemDelegate{ |
| 292 | + Layout.preferredWidth: root.width * 0.42 |
| 293 | + name: "Secure Notes" |
| 294 | + } |
| 295 | + } |
| 296 | + RowLayout{ |
| 297 | + Layout.fillWidth: true |
| 298 | + Layout.alignment: Qt.AlignHCenter |
| 299 | + spacing: 30 |
| 300 | + PrefsItemDelegate{ |
| 301 | + Layout.preferredWidth: root.width * 0.42 |
| 302 | + name: "Login" |
| 303 | + } |
| 304 | + |
| 305 | + PrefsItemDelegate{ |
| 306 | + Layout.preferredWidth: root.width * 0.42 |
| 307 | + name: "Secure Notes" |
| 308 | + } |
| 309 | + } |
| 310 | + |
| 311 | + |
| 312 | + } |
30 | 313 | } |
31 | 314 | } |
32 | 315 | } |
0 commit comments