|
1 | 1 | import QtQuick 2.9 |
2 | 2 | import QtQuick.Layouts 1.3 |
3 | 3 | import QtQuick.Controls 2.2 |
4 | | -import QtQuick.Controls.Material 2.2 |
5 | | - |
| 4 | +import "../../../Settings" |
6 | 5 | import "../../../common" |
| 6 | +import "../../../GameScreens" |
7 | 7 |
|
8 | | -Flickable { |
9 | | - id: flickable |
10 | | - contentHeight: root.implicitHeight |
11 | | - // StackView manages this, so please no anchors here |
12 | | - // anchors.fill: parent |
| 8 | +ScreenPage{ |
| 9 | + id:root |
13 | 10 | property string name: "Home" |
14 | | - |
| 11 | + contentHeight: mainLayout.implicitHeight |
15 | 12 | Pane { |
16 | | - id: root |
17 | 13 | anchors.fill: parent |
18 | | - ColumnLayout { |
19 | | - anchors.right: parent.right |
| 14 | + clip: true |
| 15 | + background: Rectangle{ |
| 16 | + anchors.fill: parent |
| 17 | + color: "transparent" |
| 18 | + } |
| 19 | + |
| 20 | + ColumnLayout{ |
| 21 | + id: mainLayout |
20 | 22 | anchors.left: parent.left |
21 | | - LabelHeadline { |
22 | | - leftPadding: 10 |
23 | | - bottomPadding: 16 |
24 | | - text: qsTr("The Home Page") |
| 23 | + anchors.right: parent.right |
| 24 | + spacing: 20 |
| 25 | + |
| 26 | + PrefsCheckboxLable{ |
| 27 | + title: qsTr("Keep 1Password in the notification area") |
| 28 | + description: qsTr("1Password will be available in the notification area even when the main window in closed.").arg("<a href='https://www.example.com'>Click me!</a>") |
| 29 | + } |
| 30 | + LablePrefsComboBox{ |
| 31 | + label:qsTr("Click the icon to") |
| 32 | + model: SideListModel{} |
| 33 | + } |
| 34 | + PrefsCheckboxLable{ |
| 35 | + title: qsTr("Format secure notes using Markdown") |
| 36 | + description: qsTr("%1").arg("<a href='https://www.example.com'>Learn more about using Markdown.</a>") |
| 37 | + } |
| 38 | + Label { |
| 39 | + opacity: 0.87 |
| 40 | + font.pointSize: 14 |
| 41 | + text:qsTr("Default Vault") |
| 42 | + font.weight: Font.Medium |
| 43 | + font.bold: true |
| 44 | + Layout.alignment: Qt.AlignLeft |
| 45 | + color: "black" |
| 46 | + elide: Text.ElideRight |
| 47 | + Layout.leftMargin: 10 |
25 | 48 | } |
26 | | - RowLayout { |
27 | 49 |
|
28 | | - LabelSubheading { |
29 | | - leftPadding: 10 |
30 | | - rightPadding: 10 |
31 | | - wrapMode: Text.WordWrap |
32 | | - text: qsTr("This Page is on a StackView - want to push another Page on top ?\nTap on the 'Qt' Logo") } |
| 50 | + LablePrefsComboBox{ |
| 51 | + label:qsTr("Save new item in :") |
| 52 | + model: SideListModel{} |
33 | 53 | } |
34 | 54 |
|
35 | | - HorizontalDivider {} |
36 | | - RowLayout { |
37 | | - LabelSubheading { |
38 | | - topPadding: 6 |
39 | | - leftPadding: 10 |
40 | | - rightPadding: 10 |
41 | | - wrapMode: Text.WordWrap |
42 | | - text: qsTr("Example APP demonstrating Qt Quick Controls 2\n\n") |
| 55 | + Label { |
| 56 | + Layout.fillWidth: true |
| 57 | + opacity: 0.87 |
| 58 | + font.pointSize: 10 |
| 59 | + wrapMode: Text.WrapAtWordBoundaryOrAnywhere |
| 60 | + text:qsTr("Set a default location for saving new items on this device , or let 1password make a suggestion.") |
| 61 | + font.weight: Font.Medium |
| 62 | + Layout.alignment: Qt.AlignLeft |
| 63 | + color: "black" |
| 64 | + elide: Text.ElideRight |
| 65 | + Layout.leftMargin: 10 |
| 66 | + } |
| 67 | + Label { |
| 68 | + opacity: 0.87 |
| 69 | + font.pointSize: 14 |
| 70 | + text:qsTr("Keyboard Shortcuts") |
| 71 | + font.weight: Font.Medium |
| 72 | + font.bold: true |
| 73 | + Layout.alignment: Qt.AlignLeft |
| 74 | + color: "black" |
| 75 | + elide: Text.ElideRight |
| 76 | + Layout.leftMargin: 10 |
| 77 | + } |
| 78 | + |
| 79 | + RowLayout{ |
| 80 | + Layout.fillWidth: true |
| 81 | + Label { |
| 82 | + Layout.fillWidth: true |
| 83 | + opacity: 0.87 |
| 84 | + font.pointSize: 12 |
| 85 | + text:qsTr("Show 1Password :") |
| 86 | + font.weight: Font.Medium |
| 87 | + Layout.alignment: Qt.AlignLeft |
| 88 | + color: "black" |
| 89 | + elide: Text.ElideRight |
| 90 | + Layout.leftMargin: 10 |
| 91 | + } |
| 92 | + PrefsTextField{ |
| 93 | + Layout.alignment: Qt.AlignRight |
| 94 | + Layout.rightMargin: 10 |
| 95 | + placeholderText:qsTr("Enter shortcut") |
43 | 96 | } |
44 | 97 | } |
45 | | - RowLayout { |
46 | | - LabelSubheading { |
47 | | - topPadding: 6 |
48 | | - leftPadding: 10 |
49 | | - rightPadding: 10 |
50 | | - wrapMode: Text.WordWrap |
51 | | - text: qsTr("Home Page is a StackView.\nNavigation Drawer can be opened swiping from left or tapping on Menu Button.\nHome Page is marked as Favority, so you can also navigate from Bottom (in Portrait Mode)\n") |
| 98 | + RowLayout{ |
| 99 | + Layout.fillWidth: true |
| 100 | + Label { |
| 101 | + Layout.fillWidth: true |
| 102 | + opacity: 0.87 |
| 103 | + font.pointSize: 12 |
| 104 | + text:qsTr("Show Quick Access :") |
| 105 | + font.weight: Font.Medium |
| 106 | + Layout.alignment: Qt.AlignLeft |
| 107 | + color: "black" |
| 108 | + elide: Text.ElideRight |
| 109 | + Layout.leftMargin: 10 |
| 110 | + } |
| 111 | + PrefsTextField{ |
| 112 | + Layout.alignment: Qt.AlignRight |
| 113 | + Layout.rightMargin: 10 |
| 114 | + placeholderText:qsTr("Enter shortcut") |
52 | 115 | } |
53 | 116 | } |
54 | | - RowLayout { |
55 | | - LabelBodySecondary { |
56 | | - topPadding: 6 |
57 | | - leftPadding: 10 |
58 | | - rightPadding: 10 |
59 | | - wrapMode: Text.WordWrap |
60 | | - text: qsTr("Activation Policy: ") |
| 117 | + RowLayout{ |
| 118 | + Layout.fillWidth: true |
| 119 | + Label { |
| 120 | + Layout.fillWidth: true |
| 121 | + opacity: 0.87 |
| 122 | + font.pointSize: 12 |
| 123 | + text:qsTr("Lock 1Password :") |
| 124 | + font.weight: Font.Medium |
| 125 | + Layout.alignment: Qt.AlignLeft |
| 126 | + color: "black" |
| 127 | + elide: Text.ElideRight |
| 128 | + Layout.leftMargin: 10 |
61 | 129 | } |
62 | | - LabelBody { |
63 | | - topPadding: 6 |
64 | | - leftPadding: 10 |
65 | | - rightPadding: 10 |
66 | | - wrapMode: Text.WordWrap |
67 | | - text: qsTr("IMMEDIATELY") |
| 130 | + PrefsTextField{ |
| 131 | + Layout.alignment: Qt.AlignRight |
| 132 | + Layout.rightMargin: 10 |
| 133 | + placeholderText:qsTr("Enter shortcut") |
68 | 134 | } |
69 | 135 | } |
70 | | - HorizontalDivider {} |
71 | | - |
72 | | - RowLayout { |
73 | | - ButtonFlat { |
74 | | - text: qsTr("Modal Popup Test") |
75 | | - |
76 | | - onClicked: { |
77 | | - } |
| 136 | + RowLayout{ |
| 137 | + Layout.fillWidth: true |
| 138 | + Label { |
| 139 | + Layout.fillWidth: true |
| 140 | + opacity: 0.87 |
| 141 | + font.pointSize: 12 |
| 142 | + text:qsTr("AutoFill :") |
| 143 | + font.weight: Font.Medium |
| 144 | + Layout.alignment: Qt.AlignLeft |
| 145 | + color: "black" |
| 146 | + elide: Text.ElideRight |
| 147 | + Layout.leftMargin: 10 |
| 148 | + } |
| 149 | + PrefsTextField{ |
| 150 | + Layout.alignment: Qt.AlignRight |
| 151 | + Layout.rightMargin: 10 |
| 152 | + placeholderText:qsTr("Enter shortcut") |
78 | 153 | } |
79 | 154 | } |
80 | 155 |
|
81 | 156 | HorizontalDivider {} |
82 | | - } // col layout |
83 | | - } // root |
84 | | - ScrollIndicator.vertical: ScrollIndicator { } |
85 | | - |
86 | 157 |
|
87 | | - |
88 | | - // emitting a Signal could be another option |
| 158 | + } |
| 159 | + } |
89 | 160 | Component.onDestruction: { |
90 | 161 | cleanup() |
91 | 162 | } |
92 | 163 |
|
93 | | - // called immediately after Loader.loaded |
94 | 164 | function init() { |
95 | 165 | console.log(qsTr("Init done from Home Page")) |
96 | 166 | } |
97 | | - // called from Component.destruction |
98 | 167 | function cleanup() { |
99 | 168 | console.log(qsTr("Cleanup done from Home Page")) |
100 | 169 | } |
101 | | -} // flickable |
| 170 | +} |
0 commit comments