Skip to content

Commit eebddd1

Browse files
authored
Merge pull request #8 from cppqtdev/development
Right Side Drawer Implemented
2 parents d410711 + 194065e commit eebddd1

22 files changed

+582
-299
lines changed

AddItemScreen/AddItemDialog.qml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import QtQuick 2.15
2+
import QtQuick.Controls 2.15
3+
import QtQuick.Layouts 1.3
4+
import "../GameScreens"
5+
ApplicationWindow {
6+
id:root
7+
visible: true
8+
width: 850
9+
height: 650
10+
minimumWidth: 850
11+
maximumWidth: 850
12+
minimumHeight: 650
13+
maximumHeight: 650
14+
title: "Settings"
15+
color: "lightgrey"
16+
flags: Qt.Window
17+
}

ScreensComponents/RightSideDrawer/DrawerFavoritesNavigationBar.qml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
// ekke (Ekkehard Gentz) @ekkescorner
21
import QtQuick 2.9
32
import QtQuick.Layouts 1.3
43
import QtQuick.Controls 2.2
5-
import QtQuick.Controls.Material 2.2
64

75
Pane {
86
id: myBar
97
property bool favMenuBugfix: false
10-
Material.elevation: 8
11-
z: 1
128
property real activeOpacity: iconFolder == "black" ? 0.87 : 1.0
139
property real inactiveOpacity: iconFolder == "black" ? 0.26 : 0.56
1410
leftPadding: 0
@@ -26,8 +22,9 @@ Pane {
2622
model: favoritesModel
2723
DrawerFavoritesNavigationButton {
2824
id: myButton
25+
Layout.fillWidth: true
2926
height: parent.height
3027
}
31-
} // repeater
32-
} // RowLayout
33-
} // bottomNavigationBar
28+
}
29+
}
30+
}

ScreensComponents/RightSideDrawer/navigation/HomeNavigation.qml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ import "../pages"
88
StackView {
99
id: navPane
1010
property string name: "HomeNavPane"
11-
1211
initialItem: HomePage{}
13-
1412
Loader {
1513
id: qtPageLoader
1614
active: true
Lines changed: 135 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,170 @@
11
import QtQuick 2.9
22
import QtQuick.Layouts 1.3
33
import QtQuick.Controls 2.2
4-
import QtQuick.Controls.Material 2.2
5-
4+
import "../../../Settings"
65
import "../../../common"
6+
import "../../../GameScreens"
77

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
1310
property string name: "Home"
14-
11+
contentHeight: mainLayout.implicitHeight
1512
Pane {
16-
id: root
1713
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
2022
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
2548
}
26-
RowLayout {
2749

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{}
3353
}
3454

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")
4396
}
4497
}
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")
52115
}
53116
}
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
61129
}
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")
68134
}
69135
}
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")
78153
}
79154
}
80155

81156
HorizontalDivider {}
82-
} // col layout
83-
} // root
84-
ScrollIndicator.vertical: ScrollIndicator { }
85-
86157

87-
88-
// emitting a Signal could be another option
158+
}
159+
}
89160
Component.onDestruction: {
90161
cleanup()
91162
}
92163

93-
// called immediately after Loader.loaded
94164
function init() {
95165
console.log(qsTr("Init done from Home Page"))
96166
}
97-
// called from Component.destruction
98167
function cleanup() {
99168
console.log(qsTr("Cleanup done from Home Page"))
100169
}
101-
} // flickable
170+
}

0 commit comments

Comments
 (0)