diff --git a/assets/core/account_circle-24px.svg b/assets/core/account_circle-24px.svg
new file mode 100644
index 00000000..013a30af
--- /dev/null
+++ b/assets/core/account_circle-24px.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/core/account_circle-24px_lines.svg b/assets/core/account_circle-24px_lines.svg
new file mode 100644
index 00000000..9fec981a
--- /dev/null
+++ b/assets/core/account_circle-24px_lines.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/core/account_circle-24px_lines_thin.svg b/assets/core/account_circle-24px_lines_thin.svg
new file mode 100644
index 00000000..7ded72ff
--- /dev/null
+++ b/assets/core/account_circle-24px_lines_thin.svg
@@ -0,0 +1,20 @@
+
+
+
diff --git a/assets/core/account_circle-24px_user.svg b/assets/core/account_circle-24px_user.svg
new file mode 100644
index 00000000..3eb8ffc7
--- /dev/null
+++ b/assets/core/account_circle-24px_user.svg
@@ -0,0 +1,23 @@
+
+
+
diff --git a/assets/core/add_circle-24px.svg b/assets/core/add_circle-24px.svg
new file mode 100644
index 00000000..e8e583ad
--- /dev/null
+++ b/assets/core/add_circle-24px.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/core/attach_file-24px.svg b/assets/core/attach_file-24px.svg
new file mode 100644
index 00000000..471fb991
--- /dev/null
+++ b/assets/core/attach_file-24px.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/core/block-24px.svg b/assets/core/block-24px.svg
new file mode 100644
index 00000000..8636ff6a
--- /dev/null
+++ b/assets/core/block-24px.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/core/check-24px.svg b/assets/core/check-24px.svg
new file mode 100644
index 00000000..c5c42b66
--- /dev/null
+++ b/assets/core/check-24px.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/core/chevron_left-24px.svg b/assets/core/chevron_left-24px.svg
new file mode 100644
index 00000000..6f78ae79
--- /dev/null
+++ b/assets/core/chevron_left-24px.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/core/clear-24px.svg b/assets/core/clear-24px.svg
new file mode 100644
index 00000000..08149461
--- /dev/null
+++ b/assets/core/clear-24px.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/core/delete-24px.svg b/assets/core/delete-24px.svg
new file mode 100644
index 00000000..8f6e9a27
--- /dev/null
+++ b/assets/core/delete-24px.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/core/done-24px.svg b/assets/core/done-24px.svg
new file mode 100644
index 00000000..2ee44187
--- /dev/null
+++ b/assets/core/done-24px.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/core/drag_indicator-24px.svg b/assets/core/drag_indicator-24px.svg
new file mode 100644
index 00000000..0559cf1d
--- /dev/null
+++ b/assets/core/drag_indicator-24px.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/core/edit-24px.svg b/assets/core/edit-24px.svg
new file mode 100644
index 00000000..1a7d71c7
--- /dev/null
+++ b/assets/core/edit-24px.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/core/favorite-24px.svg b/assets/core/favorite-24px.svg
new file mode 100644
index 00000000..1c334308
--- /dev/null
+++ b/assets/core/favorite-24px.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/core/info-24px.svg b/assets/core/info-24px.svg
new file mode 100644
index 00000000..eb2424b5
--- /dev/null
+++ b/assets/core/info-24px.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/core/lock-24px.svg b/assets/core/lock-24px.svg
new file mode 100644
index 00000000..472bd965
--- /dev/null
+++ b/assets/core/lock-24px.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/core/lock_open-24px.svg b/assets/core/lock_open-24px.svg
new file mode 100644
index 00000000..b26d7274
--- /dev/null
+++ b/assets/core/lock_open-24px.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/core/menu-24px.svg b/assets/core/menu-24px.svg
new file mode 100644
index 00000000..8525078d
--- /dev/null
+++ b/assets/core/menu-24px.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/core/mood-24px.svg b/assets/core/mood-24px.svg
new file mode 100644
index 00000000..655863fa
--- /dev/null
+++ b/assets/core/mood-24px.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/core/more_vert-24px.svg b/assets/core/more_vert-24px.svg
new file mode 100644
index 00000000..49c84995
--- /dev/null
+++ b/assets/core/more_vert-24px.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/core/search-24px.svg b/assets/core/search-24px.svg
new file mode 100644
index 00000000..45ea1457
--- /dev/null
+++ b/assets/core/search-24px.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/core/send-24px.svg b/assets/core/send-24px.svg
new file mode 100644
index 00000000..ba848bae
--- /dev/null
+++ b/assets/core/send-24px.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/core/signal_cellular_4_bar-24px.svg b/assets/core/signal_cellular_4_bar-24px.svg
new file mode 100644
index 00000000..7fa91cd3
--- /dev/null
+++ b/assets/core/signal_cellular_4_bar-24px.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/core/signal_cellular_connected_no_internet_4_bar-24px.svg b/assets/core/signal_cellular_connected_no_internet_4_bar-24px.svg
new file mode 100644
index 00000000..76788f92
--- /dev/null
+++ b/assets/core/signal_cellular_connected_no_internet_4_bar-24px.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/core/signal_cellular_off-24px.svg b/assets/core/signal_cellular_off-24px.svg
new file mode 100644
index 00000000..53a569e8
--- /dev/null
+++ b/assets/core/signal_cellular_off-24px.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/core/sync-24px.svg b/assets/core/sync-24px.svg
new file mode 100644
index 00000000..514301f8
--- /dev/null
+++ b/assets/core/sync-24px.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/core/sync_disabled-24px.svg b/assets/core/sync_disabled-24px.svg
new file mode 100644
index 00000000..36a97cbf
--- /dev/null
+++ b/assets/core/sync_disabled-24px.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/core/sync_problem-24px.svg b/assets/core/sync_problem-24px.svg
new file mode 100644
index 00000000..9eb870b0
--- /dev/null
+++ b/assets/core/sync_problem-24px.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/core/syncing-01.svg b/assets/core/syncing-01.svg
new file mode 100644
index 00000000..f9eb9791
--- /dev/null
+++ b/assets/core/syncing-01.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/core/syncing-02.svg b/assets/core/syncing-02.svg
new file mode 100644
index 00000000..4ae41d5c
--- /dev/null
+++ b/assets/core/syncing-02.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/core/syncing-03.svg b/assets/core/syncing-03.svg
new file mode 100644
index 00000000..d4313757
--- /dev/null
+++ b/assets/core/syncing-03.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/core/toggle_on-24px.svg b/assets/core/toggle_on-24px.svg
new file mode 100644
index 00000000..5da416c4
--- /dev/null
+++ b/assets/core/toggle_on-24px.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/cmd/qmlfmt/main.go b/cmd/qmlfmt/main.go
index 5dae4f82..ac109ad1 100644
--- a/cmd/qmlfmt/main.go
+++ b/cmd/qmlfmt/main.go
@@ -46,14 +46,16 @@ func processFile(filename string) {
indentCount := 0
inMultiLineComment := false
- for _, line := range lines {
+ for ln, line := range lines {
singleCommentPos := strings.Index(line, "//")
multiLineCommentStartPos := strings.Index(line, "/*")
multiLineCommentEndPos := strings.Index(line, "*/")
+ openPos := strings.Index(line, "{")
closePos := strings.Index(line, "}")
- if !inMultiLineComment && closePos > -1 && (singleCommentPos == -1 || closePos < singleCommentPos) &&
+
+ if !inMultiLineComment && closePos > -1 && (openPos == -1 || openPos > closePos) && (singleCommentPos == -1 || closePos < singleCommentPos) &&
(multiLineCommentStartPos == -1 || closePos < multiLineCommentStartPos) &&
(multiLineCommentEndPos == -1 || closePos > multiLineCommentEndPos) {
indentCount--
@@ -63,11 +65,14 @@ func processFile(filename string) {
if trimedLine == "" {
file.Write([]byte("\n"))
} else {
+ if indentCount < 0 {
+ log.Fatalf("indent Count negative in %v at line %v\n", filename, ln)
+ }
+
file.Write([]byte(strings.Repeat(indent, indentCount) + trimedLine + "\n"))
}
- openPos := strings.Index(line, "{")
- if !inMultiLineComment && openPos > -1 && (singleCommentPos == -1 || openPos < singleCommentPos) &&
+ if !inMultiLineComment && openPos > -1 && (closePos == -1 || openPos > closePos) && (singleCommentPos == -1 || openPos < singleCommentPos) &&
(multiLineCommentStartPos == -1 || openPos < multiLineCommentStartPos) &&
(multiLineCommentEndPos == -1 || openPos > multiLineCommentEndPos) {
indentCount++
diff --git a/go/ui/manager.go b/go/ui/manager.go
index 53f8f38e..c22d92ba 100644
--- a/go/ui/manager.go
+++ b/go/ui/manager.go
@@ -95,7 +95,6 @@ func profilePicRelativize(filename string) string {
// getProfilePic returns a string path to an image to display for hte given peer/group id
func getProfilePic(id string) string {
- log.Debugf("getProfilePic for %v\n", id)
if isGroup(id) {
if picVal, exists := the.Peer.GetGroupAttribute(id, attr.GetLocalScope(constants.Picture)); exists {
pic, err := StringToImage(picVal)
diff --git a/main.go b/main.go
index 2ce0f5aa..f11c373a 100644
--- a/main.go
+++ b/main.go
@@ -59,9 +59,13 @@ func main() {
if buildVer == "" {
log.SetLevel(log.LevelDebug)
}
- //log.ExcludeFromPattern("connection/connection")
+ log.ExcludeFromPattern("connection/connection")
//log.ExcludeFromPattern("outbound/3dhauthchannel")
//log.AddNothingExceptFilter("event/eventmanager")
+ log.ExcludeFromPattern("service.go")
+ log.ExcludeFromPattern("tor/BaseOnionService.go")
+ log.ExcludeFromPattern("applications/auth.go")
+ log.ExcludeFromPattern("connections/engine.go")
if os.Getenv("CWTCH_FOLDER") != "" {
the.CwtchDir = os.Getenv("CWTCH_FOLDER")
diff --git a/qml.qrc b/qml.qrc
index cfb4b0f6..b4983897 100644
--- a/qml.qrc
+++ b/qml.qrc
@@ -33,7 +33,6 @@
qml/widgets/ProfileList.qml
qml/widgets/RadioButton.qml
qml/widgets/Button.qml
- qml/widgets/StackToolbar.qml
qml/widgets/TextField.qml
qml/widgets/controls/Loader.qml
qml/widgets/controls/Variables.qml
diff --git a/qml/main.qml b/qml/main.qml
index b6302b91..d10d34cc 100644
--- a/qml/main.qml
+++ b/qml/main.qml
@@ -81,10 +81,28 @@ ApplicationWindow {
return px * 72 / (Screen.pixelDensity * 25.4)
}
+ Toolbar {
+ id: toolbar
+ onBack: { backFn() }
+
+ onRightMenu: {
+ if (gcd.selectedConversation.length == 32) {
+ theStack.pane = theStack.groupProfilePane
+ gcd.requestGroupSettings(gcd.selectedConversation)
+ } else {
+ theStack.pane = theStack.userProfilePane
+ gcd.requestPeerSettings()
+ }
+ }
+ }
+
StackLayout {
id: parentStack
currentIndex: 1
- anchors.fill: parent
+ anchors.right: parent.right
+ anchors.left: parent.left
+ anchors.bottom: parent.bottom
+ anchors.top: toolbar.bottom
readonly property int splashPane: 0
readonly property int managementPane: 1
@@ -168,23 +186,28 @@ ApplicationWindow {
readonly property int groupProfilePane: 4
readonly property int addGroupPane: 5
- property string title
-
-
- Item { anchors.fill: parent } // empty
+ Item { anchors.fill: parent } // empty
OverlayPane { // messagePane
- title: theStack.title
anchors.fill: parent
}
- SettingsPane{ anchors.fill: parent }
+ SettingsPane { anchors.fill: parent }
- PeerSettingsPane { anchors.fill: parent }
+ PeerSettingsPane { anchors.fill: parent }
- GroupSettingsPane{ anchors.fill: parent }
+ GroupSettingsPane{ anchors.fill: parent }
- AddGroupPane { anchors.fill: parent }
+ AddGroupPane { anchors.fill: parent }
+
+ onCurrentIndexChanged: {
+ if (currentIndex == emptyPane) {
+ toolbar.hideTitle()
+ toolbar.rightMenuVisible = false
+ }
+ }
+
+ onWidthChanged: {toolbar.titleWidth = width}
}
}
}
@@ -193,18 +216,61 @@ ApplicationWindow {
Keys.onPressed: {
if (event.key == Qt.Key_Back) {
event.accepted = true
- if (theStack.currentIndex == theStack.emptyPane) {
- androidCwtchActivity.rootHomeButtonHandle()
- } else if (theStack.currentIndex == theStack.userProfilePane || theStack.currentIndex == theStack.groupProfilePane) {
- theStack.currentIndex = theStack.messagePane
+ backFn()
+ }
+ }
+
+ onCurrentIndexChanged : updateToolbar()
+
+
+
+
+ function updateToolbar() {
+ toolbar.hideTitle()
+ toolbar.rightMenuVisible = false
+ if (currentIndex == splashPane) {
+ toolbar.visible = false
+ } else {
+ toolbar.visible = true
+ if (currentIndex == managementPane) {
+ toolbar.color = Theme.backgroundMainColor
+ toolbar.leftMenuVisible = true
+ toolbar.backVisible = false
} else {
- theStack.currentIndex = theStack.emptyPane
+ toolbar.leftMenuVisible = false
+ toolbar.backVisible = true
+
+ if (currentIndex == addEditProfilePane) {
+ toolbar.color = Theme.backgroundPaneColor
+ } else if (currentIndex == profilePane) {
+ toolbar.color = Theme.backgroundPaneColor
+ }
}
}
}
+
+ Component.onCompleted: updateToolbar()
+ }
+
+ function backFn() {
+ if (parentStack.currentIndex == parentStack.managementPane) {
+ androidCwtchActivity.rootHomeButtonHandle()
+ } else if (parentStack.currentIndex != parentStack.profilePane) {
+ parentStack.currentIndex = parentStack.managementPane
+ } else {
+ if (theStack.currentIndex == theStack.emptyPane) {
+ gcd.selectedProfile = "none"
+ gcd.reloadProfileList()
+ parentStack.pane = parentStack.managementPane
+ } else if (theStack.currentIndex == theStack.userProfilePane || theStack.currentIndex == theStack.groupProfilePane) {
+ theStack.currentIndex = theStack.messagePane
+ } else {
+ theStack.currentIndex = theStack.emptyPane
+ }
+ }
}
-PropertyAnimation { id: anmPopup; easing.type: Easing.InQuart; duration: 7000; target: popup; property: "opacity"; to: 0; }
+ PropertyAnimation { id: anmPopup; easing.type: Easing.InQuart; duration: 7000; target: popup; property: "opacity"; to: 0; }
Rectangle { // THE ERROR MESSAGE POPUP
id: popup
@@ -239,10 +305,6 @@ PropertyAnimation { id: anmPopup; easing.type: Easing.InQuart; duration: 7000; t
anmPopup.restart()
}
- onSetToolbarTitle: function(str) {
- theStack.title = str
- }
-
onLoaded: function() {
parentStack.pane = parentStack.managementPane
splashPane.running = false
diff --git a/qml/overlays/BulletinOverlay.qml b/qml/overlays/BulletinOverlay.qml
index fd8c4fdc..9e95d601 100644
--- a/qml/overlays/BulletinOverlay.qml
+++ b/qml/overlays/BulletinOverlay.qml
@@ -24,7 +24,7 @@ ColumnLayout {
placeholderText: "Search.."
- style: CwtchTextFieldStyle{}
+ style: CwtchTextFieldStyle{}
anchors.left: parent.left
anchors.right: parent.right
@@ -136,7 +136,7 @@ ColumnLayout {
RowLayout {
Button {
text: selected ? "-" : "+"
- style: CwtchExpandingButton{}
+ style: CwtchExpandingButton{}
}
Text {
id: texttitle
@@ -220,13 +220,13 @@ ColumnLayout {
//: title place holder text
placeholderText: qsTr("title-placeholder")
Layout.fillWidth: true
- style: CwtchTextFieldStyle{}
+ style: CwtchTextFieldStyle{}
}
TextArea {
id: newpostbody
Layout.fillWidth: true
- style: CwtchTextAreaStyle{}
+ style: CwtchTextAreaStyle{}
}
@@ -241,7 +241,7 @@ ColumnLayout {
onClicked: {
if (newposttitle.text != "" && newpostbody.text != "") {
- var msg = JSON.stringify({"o":2, "t":newposttitle.text, "b":newpostbody.text})
+ var msg = JSON.stringify({"o":2, "t":newposttitle.text, "b":newpostbody.text})
gcd.sendMessage(msg, nextMessageID++)
}
newposttitle.text = ""
diff --git a/qml/overlays/ChatOverlay.qml b/qml/overlays/ChatOverlay.qml
index a2efeaab..a5cdce3f 100644
--- a/qml/overlays/ChatOverlay.qml
+++ b/qml/overlays/ChatOverlay.qml
@@ -26,7 +26,7 @@ Item {
model: messagesModel
spacing: 6
clip: true
- ScrollBar.vertical: ScrollBar {}
+ ScrollBar.vertical: ScrollBar {}
maximumFlickVelocity: 1250
delegate: Widgets.Message {
@@ -57,7 +57,7 @@ Item {
try {
msg = JSON.parse(message)
} catch (e) {
- msg = {"o": 1, "d": "(legacy message type) " + message}
+ msg = {"o": 1, "d": "(legacy message type) " + message}
}
if (msg.o != 1) return
@@ -90,7 +90,7 @@ Item {
try {
msg = JSON.parse(message)
} catch (e) {
- msg = {"o": 1, "d": "(legacy message type) " + message}
+ msg = {"o": 1, "d": "(legacy message type) " + message}
}
if (msg.o != 1) return
@@ -176,7 +176,7 @@ Item {
maximumFlickVelocity: 300
- ScrollBar.vertical: ScrollBar{}
+ ScrollBar.vertical: ScrollBar{}
TextEdit {
id: txtMessage
@@ -289,7 +289,7 @@ Item {
var txt = txtHidden.text.trim()
if (txt.length > 0) {
var rawText = txtHidden.getText(0, txtHidden.text.length)
- var msg = JSON.stringify({"o":1, "d":rawText.replace(/\[\:newline\:\]/g,"\n")})
+ var msg = JSON.stringify({"o":1, "d":rawText.replace(/\[\:newline\:\]/g,"\n")})
gcd.sendMessage(msg, nextMessageID++)
}
}
diff --git a/qml/overlays/ListOverlay.qml b/qml/overlays/ListOverlay.qml
index 0072ccdc..8833229d 100644
--- a/qml/overlays/ListOverlay.qml
+++ b/qml/overlays/ListOverlay.qml
@@ -24,7 +24,7 @@ ColumnLayout {
placeholderText: "Search.."
- style: CwtchTextFieldStyle{}
+ style: CwtchTextFieldStyle{}
anchors.left: parent.left
anchors.right: parent.right
@@ -140,7 +140,7 @@ ColumnLayout {
CheckBox {
checked: complete
onClicked: {
- var msg = JSON.stringify({"o":4, "c":index})
+ var msg = JSON.stringify({"o":4, "c":index})
gcd.sendMessage(msg, btnSend.nextMessageID++)
}
}
@@ -201,7 +201,7 @@ ColumnLayout {
//: Todo... placeholder text
placeholderText: qsTr("todo-placeholder")
Layout.fillWidth: true
- style: CwtchTextFieldStyle{}
+ style: CwtchTextFieldStyle{}
}
Widgets.Button { // SEND MESSAGE BUTTON
@@ -215,7 +215,7 @@ ColumnLayout {
onClicked: {
if (newposttitle.text != "") {
- var msg = JSON.stringify({"o":4, "t":newposttitle.text})
+ var msg = JSON.stringify({"o":4, "t":newposttitle.text})
gcd.sendMessage(msg, nextMessageID++)
}
newposttitle.text = ""
diff --git a/qml/panes/AddGroupPane.qml b/qml/panes/AddGroupPane.qml
index a0afcfc7..26000e8b 100644
--- a/qml/panes/AddGroupPane.qml
+++ b/qml/panes/AddGroupPane.qml
@@ -13,19 +13,8 @@ ColumnLayout { // settingsPane
id: root
anchors.fill: parent
-
- Widgets.StackToolbar {
- id: stb
- text: qsTr("create-group-title")
- aux.visible: false
- membership.visible: false
- }
-
Flickable {
- anchors.top: stb.bottom
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.bottom: parent.bottom
+ anchors.fill: parent
boundsBehavior: Flickable.StopAtBounds
clip:true
contentWidth: tehcol.width
@@ -44,7 +33,7 @@ ColumnLayout { // settingsPane
TextField {
id: txtServer
- style: CwtchTextFieldStyle{ width: tehcol.width * 0.8 }
+ style: CwtchTextFieldStyle{ width: tehcol.width * 0.8 }
text: "2c3kmoobnyghj2zw6pwv7d57yzld753auo3ugauezzpvfak3ahc4bdyd"
}
@@ -55,7 +44,7 @@ ColumnLayout { // settingsPane
TextField {
id: txtGroupName
- style: CwtchTextFieldStyle{ width: tehcol.width * 0.8 }
+ style: CwtchTextFieldStyle{ width: tehcol.width * 0.8 }
//: default suggested group name
text: qsTr("default-group-name")
}
diff --git a/qml/panes/GroupSettingsPane.qml b/qml/panes/GroupSettingsPane.qml
index 8660bb79..d1a81b87 100644
--- a/qml/panes/GroupSettingsPane.qml
+++ b/qml/panes/GroupSettingsPane.qml
@@ -16,17 +16,8 @@ ColumnLayout { // groupSettingsPane
property string groupID
property variant addrbook
- Widgets.StackToolbar {
- id: toolbar
- aux.visible: false
- back.onClicked: theStack.pane = theStack.messagePane
- }
-
Flickable {
- anchors.top: toolbar.bottom
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.bottom: parent.bottom
+ anchors.fill: parent
boundsBehavior: Flickable.StopAtBounds
clip:true
contentWidth: tehcol.width
@@ -44,7 +35,7 @@ ColumnLayout { // groupSettingsPane
TextField {
id: txtServer
- style: CwtchTextFieldStyle{ width: tehcol.width * 0.8 }
+ style: CwtchTextFieldStyle{ width: tehcol.width * 0.8 }
readOnly: true
}
@@ -65,7 +56,7 @@ ColumnLayout { // groupSettingsPane
TextField {
id: txtInvitation
- style: CwtchTextFieldStyle{ width: tehcol.width * 0.8 }
+ style: CwtchTextFieldStyle{ width: tehcol.width * 0.8 }
readOnly: true
}
@@ -86,7 +77,7 @@ ColumnLayout { // groupSettingsPane
TextField {
id: txtGroupName
- style: CwtchTextFieldStyle{ width: tehcol.width * 0.8 }
+ style: CwtchTextFieldStyle{ width: tehcol.width * 0.8 }
}
Widgets.Button {
@@ -100,14 +91,14 @@ ColumnLayout { // groupSettingsPane
}
//: Invite someone to the group
- Widgets.ScalingLabel { text: qsTr("invite-to-group-label") }
+ Widgets.ScalingLabel { text: qsTr("invite-to-group-label") }
ComboBox {
id: cbInvite
//popup.font.pixelSize: 12
width: 200
//font.pixelSize: 20
- style: CwtchComboBoxStyle{}
+ style: CwtchComboBoxStyle{}
}
Widgets.Button {
@@ -136,11 +127,10 @@ ColumnLayout { // groupSettingsPane
onSupplyGroupSettings: function(gid, name, server, invite, accepted, addrbooknames, addrbookaddrs) {
gsp.groupID = gid
- toolbar.text = name
txtGroupName.text = name
txtServer.text = server
txtInvitation.text = invite
- cbInvite.model = addrbooknames.map(function(e){return Utils.htmlEscaped(e)})
+ cbInvite.model = addrbooknames.map(function(e){return Utils.htmlEscaped(e)})
addrbook = addrbookaddrs
}
}
diff --git a/qml/panes/OverlayPane.qml b/qml/panes/OverlayPane.qml
index d465eab1..123e64f2 100644
--- a/qml/panes/OverlayPane.qml
+++ b/qml/panes/OverlayPane.qml
@@ -9,32 +9,11 @@ import "../overlays"
ColumnLayout {
Layout.fillWidth: true
- property alias title: toolbar.text
id: overlay
property string name
property bool accepted
property bool inGroup
-
- Widgets.StackToolbar {
- id: toolbar
-
- membership.visible: gcd.selectedConversation.length == 32
-
- membership.onClicked: overlayStack.overlay = overlayStack.membershipOverlay
-
- aux.onClicked: {
- if (gcd.selectedConversation.length == 32) {
- theStack.pane = theStack.groupProfilePane
- gcd.requestGroupSettings(gcd.selectedConversation)
- } else {
- theStack.pane = theStack.userProfilePane
- gcd.requestPeerSettings()
- }
- }
- back.visible: true
- }
-
RowLayout {
visible:!overlay.accepted && (gcd.selectedConversation.length == 32)
diff --git a/qml/panes/PeerSettingsPane.qml b/qml/panes/PeerSettingsPane.qml
index 660ec9a7..db9d1724 100644
--- a/qml/panes/PeerSettingsPane.qml
+++ b/qml/panes/PeerSettingsPane.qml
@@ -16,20 +16,8 @@ Column { // peerSettingsPane
anchors.fill: parent
property bool blocked
-
- Widgets.StackToolbar {
- id: toolbar
- aux.visible: false
-
-
- back.onClicked: theStack.pane = theStack.messagePane
- }
-
Flickable {
- anchors.top: toolbar.bottom
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.bottom: parent.bottom
+ anchors.fill: parent
boundsBehavior: Flickable.StopAtBounds
clip:true
contentWidth: tehcol.width
@@ -67,7 +55,7 @@ Column { // peerSettingsPane
}
}
- Widgets.HLine{}
+ Widgets.HLine{}
GridLayout {
columns: 1
@@ -96,7 +84,7 @@ Column { // peerSettingsPane
}
- Widgets.HLine{}
+ Widgets.HLine{}
GridLayout {
@@ -127,7 +115,7 @@ Column { // peerSettingsPane
}
- Widgets.HLine{}
+ Widgets.HLine{}
Column {
width:parent.width * 0.95
anchors.horizontalCenter: parent.horizontalCenter
@@ -152,7 +140,6 @@ Column { // peerSettingsPane
target: gcd
onSupplyPeerSettings: function(onion, nick, blocked) {
- toolbar.text = nick
txtOnion.text = onion
txtDisplayName.text = nick
root.blocked = blocked
diff --git a/qml/panes/ProfileAddEditPane.qml b/qml/panes/ProfileAddEditPane.qml
index e80cb603..8cb3aff8 100644
--- a/qml/panes/ProfileAddEditPane.qml
+++ b/qml/panes/ProfileAddEditPane.qml
@@ -19,14 +19,6 @@ ColumnLayout { // Add Profile Pane
property bool deleting
property bool changingPassword
- Widgets.StackToolbar {
- id: stb
- text: mode == "add" ? qsTr("add-profile-title") : qsTr("edit-profile-title")
- aux.visible: false
- membership.visible: false
- stack: "management"
- }
-
function reset() {
mode = "add"
txtProfileName.text = qsTr("default-profile-name")
@@ -64,7 +56,7 @@ ColumnLayout { // Add Profile Pane
Flickable {
- anchors.top: stb.bottom
+ anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
diff --git a/qml/panes/ProfileManagerPane.qml b/qml/panes/ProfileManagerPane.qml
index 7369da45..c77e2533 100644
--- a/qml/panes/ProfileManagerPane.qml
+++ b/qml/panes/ProfileManagerPane.qml
@@ -30,7 +30,7 @@ ColumnLayout {
TextField {
id: txtPassword
anchors.horizontalCenter: parent.horizontalCenter
- style: CwtchTextFieldStyle{ width: thecol.width * 0.8 }
+ style: CwtchTextFieldStyle{ width: thecol.width * 0.8 }
echoMode: TextInput.Password
onAccepted: button.clicked()
}
diff --git a/qml/panes/SettingsPane.qml b/qml/panes/SettingsPane.qml
index 242a9767..c6ce40ef 100644
--- a/qml/panes/SettingsPane.qml
+++ b/qml/panes/SettingsPane.qml
@@ -14,20 +14,8 @@ ColumnLayout { // settingsPane
id: root
anchors.fill: parent
-
- StackToolbar {
- id: stb
- //: Cwtch Settings title
- text: qsTr("cwtch-settings-title")
- aux.visible: false
- membership.visible: false
- }
-
Flickable {
- anchors.top: stb.bottom
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.bottom: parent.bottom
+ anchors.fill: parent
boundsBehavior: Flickable.StopAtBounds
clip:true
contentWidth: tehcol.width
diff --git a/qml/panes/SplashPane.qml b/qml/panes/SplashPane.qml
index 2a8c146e..bd3f9a6e 100644
--- a/qml/panes/SplashPane.qml
+++ b/qml/panes/SplashPane.qml
@@ -29,7 +29,7 @@ Item {
indeterminate: true
style: ProgressBarStyle {
- progress: CwtchProgress { running: sp.running }
+ progress: CwtchProgress { running: sp.running }
}
}
diff --git a/qml/theme/CwtchDark.qml b/qml/theme/CwtchDark.qml
index af40ec62..7fb16037 100644
--- a/qml/theme/CwtchDark.qml
+++ b/qml/theme/CwtchDark.qml
@@ -31,7 +31,10 @@ ThemeType {
portraitContactBadgeTextColor: whitePurple
portraitProfileBadgeColor: mauvePurple
dropShadowColor: darkGrayPurple
+
toggleColor: darkGrayPurple
toggleOnColor: whitePurple
toggleOffColor: mauvePurple
+
+ toolbarIconColor: whitePurple
}
diff --git a/qml/theme/CwtchLight.qml b/qml/theme/CwtchLight.qml
index 31684afc..5cf71657 100644
--- a/qml/theme/CwtchLight.qml
+++ b/qml/theme/CwtchLight.qml
@@ -35,4 +35,6 @@ ThemeType {
toggleColor: whitePurple
toggleOnColor: hotPink
toggleOffColor: purple
+
+ toolbarIconColor: darkPurple
}
diff --git a/qml/theme/Theme.qml b/qml/theme/Theme.qml
index 8b760fbe..535a0dde 100644
--- a/qml/theme/Theme.qml
+++ b/qml/theme/Theme.qml
@@ -31,6 +31,8 @@ Item {
readonly property color toggleOffColor: theme.toggleOffColor
readonly property color toggleOnColor: theme.toggleOnColor
+ readonly property color toolbarIconColor: theme.toolbarIconColor
+
readonly property int headerSize: 50
readonly property int usernameSize: 30
readonly property int tabSize: 25
@@ -42,5 +44,6 @@ Item {
readonly property int sidePaneMinSize: 700
readonly property int doublePaneMinSize: 1000
-property ThemeType theme: CwtchLight { }
+ property ThemeType theme: CwtchLight { }
+
}
diff --git a/qml/theme/ThemeType.qml b/qml/theme/ThemeType.qml
index 6064cb10..efe4adaf 100644
--- a/qml/theme/ThemeType.qml
+++ b/qml/theme/ThemeType.qml
@@ -27,6 +27,7 @@ QtObject {
property color toggleOnColor: "black"
property color toggleOffColor: "black"
+ property color toolbarIconColor: "red"
// ... more to come
diff --git a/qml/widgets/Badge.qml b/qml/widgets/Badge.qml
index 46497329..6369eab3 100644
--- a/qml/widgets/Badge.qml
+++ b/qml/widgets/Badge.qml
@@ -12,7 +12,7 @@ Rectangle {
radius: width/2
anchors.right: parent.right
anchors.bottom: parent.bottom
- anchors.margins: parent.width * 0.15
+ anchors.margins: parent.width * 0.09
property alias content: container.children
Column {
diff --git a/qml/widgets/ButtonTextField.qml b/qml/widgets/ButtonTextField.qml
index 2f54650b..32cbb83e 100644
--- a/qml/widgets/ButtonTextField.qml
+++ b/qml/widgets/ButtonTextField.qml
@@ -34,7 +34,7 @@ TextField {
Widgets.Button {
icon: ""
text: button_text
- anchors { top: parent.top; right: parent.right }
+ anchors { top: parent.top; right: parent.right }
override_radius: 10
height: parent.height; width: parent.height * 4
diff --git a/qml/widgets/ContactRow.qml b/qml/widgets/ContactRow.qml
index 41408cfb..bed4b98e 100644
--- a/qml/widgets/ContactRow.qml
+++ b/qml/widgets/ContactRow.qml
@@ -44,7 +44,7 @@ PortraitRow {
indeterminate: true
style: ProgressBarStyle {
- progress: CwtchProgress { running: loadingProgress.running}
+ progress: CwtchProgress { running: loadingProgress.running}
}
}
@@ -59,9 +59,9 @@ PortraitRow {
}
}
-Component.onCompleted: { setColors(status) }
+ Component.onCompleted: { setColors(status) }
-onStatusChanged: { setColors(status) }
+ onStatusChanged: { setColors(status) }
function setColors(status) {
//-2:WtfCodeError,-1:Error,0:Disconnected,1:Connecting,2:Connected,3:Authenticated,4:Synced,5:Failed,6:Killed
diff --git a/qml/widgets/EllipsisLabel.qml b/qml/widgets/EllipsisLabel.qml
index b35b3ad4..a0d042c5 100644
--- a/qml/widgets/EllipsisLabel.qml
+++ b/qml/widgets/EllipsisLabel.qml
@@ -6,8 +6,10 @@ import CustomQmlTypes 1.0
import "../widgets" as Widgets
import "../theme"
+
+// Needs the parent to have an onWidthChanged that calls .textResize()
Item {
- //anchors.right: parent.right
+ anchors.right: parent.right
anchors.left: parent.left
property string text
@@ -17,6 +19,9 @@ Item {
property alias weight: label.font.weight
property alias strikeout: label.font.strikeout
property alias font: label.font
+ property int extraPadding: 0
+
+ property Item container: parent
height: textMetric.height
width: textMetric.width + 10
@@ -36,19 +41,16 @@ Item {
font: label.font
}
- /*onWidthChanged: {
- setTextResize()
- }*/
-
onTextChanged: {
- setTextResize()
+ textResize()
}
- function setTextResize() {
+ function textResize() {
textMetric.text = text
var i = 2
+ var containerWidth = container != null ? container.width : 50
// - 30 for padding
- while (textMetric.width > parent.width - (30 * gcd.themeScale) && parent.width > 50) {
+ while (textMetric.width > containerWidth - ((30 + extraPadding) * gcd.themeScale) && containerWidth > 50) {
textMetric.text = text.slice(0, text.length - (i * 3)) + "..."
i++
}
diff --git a/qml/widgets/EmojiDrawer.qml b/qml/widgets/EmojiDrawer.qml
index a1a2ccfd..7bb9bba1 100644
--- a/qml/widgets/EmojiDrawer.qml
+++ b/qml/widgets/EmojiDrawer.qml
@@ -170,17 +170,17 @@ Item {
source: cats[index].source
property int index: 0
property var cats: [
- {source: gcd.assetPath + "mutstd/smile.webp", model: folder_expressions},
- {source: gcd.assetPath + "mutstd/artist_r1.webp", model: folder_activities_clothing},
- {source: gcd.assetPath + "mutstd/red_apple.webp", model: folder_food_drink_herbs},
- {source: gcd.assetPath + "mutstd/pride_100.webp", model: folder_gsr},
- {source: gcd.assetPath + "mutstd/sun_behind_small_cloud.webp", model: folder_nature},
- {source: gcd.assetPath + "mutstd/crystal_ball.webp", model: folder_objects},
- {source: gcd.assetPath + "mutstd/crow.webp", model: folder_people},
- {source: gcd.assetPath + "mutstd/purple_heart.webp", model: folder_symbols},
- {source: gcd.assetPath + "mutstd/airplane.webp", model: folder_travel_places},
- {source: gcd.assetPath + "mutstd/hash_char.webp", model: folder_utils},
- {source: gcd.assetPath + "mutstd/undefined_character.webp", model: folder_other}
+ {source: gcd.assetPath + "mutstd/smile.webp", model: folder_expressions},
+ {source: gcd.assetPath + "mutstd/artist_r1.webp", model: folder_activities_clothing},
+ {source: gcd.assetPath + "mutstd/red_apple.webp", model: folder_food_drink_herbs},
+ {source: gcd.assetPath + "mutstd/pride_100.webp", model: folder_gsr},
+ {source: gcd.assetPath + "mutstd/sun_behind_small_cloud.webp", model: folder_nature},
+ {source: gcd.assetPath + "mutstd/crystal_ball.webp", model: folder_objects},
+ {source: gcd.assetPath + "mutstd/crow.webp", model: folder_people},
+ {source: gcd.assetPath + "mutstd/purple_heart.webp", model: folder_symbols},
+ {source: gcd.assetPath + "mutstd/airplane.webp", model: folder_travel_places},
+ {source: gcd.assetPath + "mutstd/hash_char.webp", model: folder_utils},
+ {source: gcd.assetPath + "mutstd/undefined_character.webp", model: folder_other}
]
height: root.size * (maCatRot.pressed ? 0.8 : 1.0)
width: root.size * (maCatRot.pressed ? 0.8 : 1.0)
@@ -283,7 +283,7 @@ Item {
cellWidth: root.size
cellHeight: root.size
clip: true
- ScrollBar.vertical: ScrollBar {}
+ ScrollBar.vertical: ScrollBar {}
maximumFlickVelocity: 1250
boundsBehavior: GridView.StopAtBounds
@@ -292,18 +292,18 @@ Item {
}
}
-ListModel { id: folder_activities_clothing }
-ListModel { id: folder_expressions }
-ListModel { id: folder_food_drink_herbs }
-ListModel { id: folder_gsr }
-ListModel { id: folder_nature }
-ListModel { id: folder_objects }
-ListModel { id: folder_people }
-ListModel { id: folder_symbols }
-ListModel { id: folder_travel_places }
-ListModel { id: folder_utils }
-ListModel { id: folder_other }
-ListModel { id: folder_search }
+ ListModel { id: folder_activities_clothing }
+ ListModel { id: folder_expressions }
+ ListModel { id: folder_food_drink_herbs }
+ ListModel { id: folder_gsr }
+ ListModel { id: folder_nature }
+ ListModel { id: folder_objects }
+ ListModel { id: folder_people }
+ ListModel { id: folder_symbols }
+ ListModel { id: folder_travel_places }
+ ListModel { id: folder_utils }
+ ListModel { id: folder_other }
+ ListModel { id: folder_search }
DelegateModel {
id: emojiModel
diff --git a/qml/widgets/Icon.qml b/qml/widgets/Icon.qml
new file mode 100644
index 00000000..471a3a46
--- /dev/null
+++ b/qml/widgets/Icon.qml
@@ -0,0 +1,63 @@
+import QtGraphicalEffects 1.0
+import QtQuick 2.7
+import QtQuick.Controls 2.4
+import QtQuick.Controls.Material 2.0
+import QtQuick.Layouts 1.3
+
+import "../fonts/Twemoji.js" as T
+import "." as Widgets
+import "../theme"
+
+Rectangle {
+ id: root
+
+ property color backgroundColor: parent.color
+ property color hilightBackgroundColor: backgroundColor
+
+ property bool isHover: false
+
+ color: isHover ? backgroundColor : hilightBackgroundColor
+
+ property alias iconColor: iconColorOverlay.color
+
+ property alias source: srcImg.source
+
+ signal clicked()
+
+ Image {
+ id: srcImg
+ anchors.fill: parent
+ antialiasing: true
+ smooth: true
+ visible: false
+ // Apparently qml can now only DOWN-SCALE/SHRINK the SVG, so with this hack it which won't cause blurriness/pixelation
+ sourceSize.width: root.width*2
+ sourceSize.height: root.height*2
+ }
+
+ ColorOverlay{
+ id: iconColorOverlay
+ anchors.fill: srcImg
+ source: srcImg
+
+ antialiasing: true
+ smooth: true
+ }
+
+ MouseArea { // Full row mouse area triggering onClick
+ id: ma
+ anchors.fill: parent
+ hoverEnabled: true
+
+ onClicked: { root.clicked() }
+
+ onEntered: {
+ isHover = true
+ }
+
+ onExited: {
+ isHover = false
+ }
+ }
+
+}
diff --git a/qml/widgets/MyProfile.qml b/qml/widgets/MyProfile.qml
index 364455e3..455ec66d 100644
--- a/qml/widgets/MyProfile.qml
+++ b/qml/widgets/MyProfile.qml
@@ -27,7 +27,7 @@ Item {
property real logscale: 4 * Math.log10(gcd.themeScale + 1)
-onDualPaneChanged: { realignProfile() }
+ onDualPaneChanged: { realignProfile() }
function realignProfile() {
if (dualPane) {
@@ -40,11 +40,14 @@ onDualPaneChanged: { realignProfile() }
portrait.anchors.left = profile.left
portrait.anchors.leftMargin = 25 * logscale
- nameRect.anchors.horizontalCenter = undefined
- nameRect.anchors.left = portrait.right
+ nameRow.anchors.right = undefined
+ nameRow.anchors.left = portrait.right
- nameRect.anchors.top = undefined
- nameRect.anchors.verticalCenter = portrait.verticalCenter
+ nameRow.anchors.top = undefined
+ nameRow.anchors.verticalCenter = portrait.verticalCenter
+
+ nameCenter.anchors.horizontalCenter = undefined
+ nameCenter.anchors.left = nameRow.left
} else {
profile.height = (150 * logscale)
@@ -55,18 +58,18 @@ onDualPaneChanged: { realignProfile() }
portrait.anchors.leftMargin = undefined
portrait.anchors.horizontalCenter = profile.horizontalCenter
- nameRect.anchors.left = undefined
- nameRect.anchors.horizontalCenter = profile.horizontalCenter
+ nameRow.anchors.left = profile.left
+ nameRow.anchors.right = profile.right
+
+ nameRow.anchors.verticalCenter = undefined
+ nameRow.anchors.top = portrait.bottom
+
+ nameCenter.anchors.left = undefined
+ nameCenter.anchors.horizontalCenter = nameRow.horizontalCenter
- nameRect.anchors.verticalCenter = undefined
- nameRect.anchors.top = portrait.bottom
}
}
-Component.onCompleted: { realignProfile() }
-
-
-
Rectangle {
anchors.left: parent.left
@@ -93,65 +96,55 @@ Component.onCompleted: { realignProfile() }
}
Rectangle {
- id: nameRect
-
+ id: nameRow
height: name.height
- width: name.width + addBtn.width
+ onWidthChanged: { name.textResize() }
- EllipsisLabel {
- id: name
+ Rectangle {
+ id: nameCenter
+ width: name.width + addBtn.width
- anchors.right: undefined
- anchors.left: undefined
+ EllipsisLabel {
+ id: name
- color: Theme.portraitOnlineTextColor
- pixelSize: Theme.usernameSize * gcd.themeScale
- weight: Font.Bold
- text: nick
- }
+ anchors.right: undefined
+ anchors.left: undefined
- Widgets.Button { // Add Button
- id: addBtn
+ color: Theme.portraitOnlineTextColor
+ pixelSize: Theme.usernameSize * gcd.themeScale
+ weight: Font.Bold
+ text: nick
+ extraPadding: addBtn.width + 30
+ container: nameRow
+ }
- anchors.left: name.right //name.left + name.textWidth
- anchors.top: name.top
+ Widgets.Button { // Add Button
+ id: addBtn
- icon: "solid/plus"
+ anchors.left: name.right
+ anchors.top: name.top
- height: name.height
- width: height
- radius: width * 0.3
- onClicked: {
+ icon: "solid/plus"
+ height: name.height
+ width: height
+ radius: width * 0.3
+ onClicked: {
+
+ }
}
}
}
}
- // TODO Remove for new global topbar
- Widgets.Button {// BACK BUTTON
- id: btnBack
- icon: "solid/arrow-circle-left"
- anchors.left: parent.left
- anchors.leftMargin: 2
- anchors.top: parent.top
- anchors.topMargin: 2
- onClicked: function() {
- gcd.selectedProfile = "none"
- gcd.reloadProfileList()
- parentStack.pane = parentStack.managementPane
- theStack.pane = theStack.emptyPane
- }
- }
-
TextField {
id: searchAddText
anchors.top: profile.bottom
anchors.horizontalCenter: parent.horizontalCenter
- style: CwtchTextFieldStyle{ }
+ style: CwtchTextFieldStyle{ }
width: parent.width - 30
//: ex: "... paste an address here to add a contact ..."
placeholderText: qsTr("paste-address-to-add-contact")
@@ -173,8 +166,11 @@ Component.onCompleted: { realignProfile() }
onion = _onion
image = _image
tag = _tag
+ //realignProfile()
}
+ onResetProfile: { realignProfile() }
+
/*onTorStatus: function(code, str) {
rectTorStatus.code = code
rectTorStatus.message = str
diff --git a/qml/widgets/PortraitRow.qml b/qml/widgets/PortraitRow.qml
index 2895a8ef..ba65e889 100644
--- a/qml/widgets/PortraitRow.qml
+++ b/qml/widgets/PortraitRow.qml
@@ -84,8 +84,8 @@ Item { // LOTS OF NESTING TO DEAL WITH QT WEIRDNESS, SORRY
}
onWidthChanged: {
- cn.setTextResize()
- onion.setTextResize()
+ cn.textResize()
+ onion.textResize()
}
}
@@ -102,7 +102,7 @@ Item { // LOTS OF NESTING TO DEAL WITH QT WEIRDNESS, SORRY
anchors.fill: parent
hoverEnabled: true
- onClicked: { crItem.clicked(crItem.handle) }
+ onClicked: { crItem.clicked(crItem.handle) }
onEntered: {
isHover = true
diff --git a/qml/widgets/ProfileList.qml b/qml/widgets/ProfileList.qml
index 5de3472d..028304fc 100644
--- a/qml/widgets/ProfileList.qml
+++ b/qml/widgets/ProfileList.qml
@@ -115,7 +115,7 @@ ColumnLayout {
width: height
}
badgeColor: Theme.portraitOnlineBorderColor
- onClicked: function(handle) { profileAddEditPane.reset(); parentStack.pane = parentStack.addEditProfilePane }
+ onClicked: function(handle) { profileAddEditPane.reset(); parentStack.pane = parentStack.addEditProfilePane }
}
}
}
diff --git a/qml/widgets/StackToolbar.qml b/qml/widgets/StackToolbar.qml
deleted file mode 100644
index ead7a3f2..00000000
--- a/qml/widgets/StackToolbar.qml
+++ /dev/null
@@ -1,70 +0,0 @@
-import QtGraphicalEffects 1.0
-import QtQuick 2.7
-import QtQuick.Controls 2.4
-import QtQuick.Controls.Material 2.0
-import QtQuick.Layouts 1.3
-
-import "../fonts/Twemoji.js" as T
-import "." as Widgets
-import "../fonts"
-
-Rectangle { // OVERHEAD BAR ON STACK PANE
- id: toolbar
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.top: parent.top
- height: 20 * gcd.themeScale + 4
- Layout.minimumHeight: height
- Layout.maximumHeight: height
- color: "#EDEDED"
-
- property alias text: lbl.text
- property alias aux: btnAux
- property alias back: btnBack
- property alias membership: btnMembership
- property string stack: "profile" // profile(theStack) or management(parentStack)
-
-
- Widgets.Button {// BACK BUTTON
- id: btnBack
- icon: "solid/arrow-circle-left"
- anchors.left: parent.left
- anchors.verticalCenter: parent.verticalCenter
- anchors.leftMargin: 6
- onClicked: {
- if (stack == "profile") {
- theStack.pane = theStack.emptyPane
- } else {
- parentStack.pane = parentStack.managementPane
- }
- }
- }
-
- ScalingLabel { // TEXT
- id: lbl
- text: "open privacy exec"
- font.family: Fonts.applicationFontRegular.name
- font.styleName: "ExtraBold"
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.verticalCenter: parent.verticalCenter
- }
-
- RowLayout {
-
- anchors.right: parent.right
- anchors.rightMargin: 6
- anchors.verticalCenter: parent.verticalCenter
-
- Widgets.Button { // Membership Button
- id: btnMembership
- icon: "solid/users"
- //: View Group Membership
- tooltip: qsTr("view-group-membership-tooltip")
- }
-
- Widgets.Button { // COG BUTTON
- id: btnAux
- icon: "solid/cog"
- }
- }
-}
diff --git a/qml/widgets/Toolbar.qml b/qml/widgets/Toolbar.qml
new file mode 100644
index 00000000..70d373d7
--- /dev/null
+++ b/qml/widgets/Toolbar.qml
@@ -0,0 +1,123 @@
+import QtGraphicalEffects 1.0
+import QtQuick 2.7
+import QtQuick.Controls 2.4
+import QtQuick.Controls.Material 2.0
+import QtQuick.Layouts 1.3
+
+import "../fonts/Twemoji.js" as T
+import "." as Widgets
+import "../theme"
+
+Rectangle { // Global Toolbar
+ id: toolbar
+
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.top: parent.top
+ height: 35 * gcd.themeScale
+
+
+ Layout.minimumHeight: height
+ Layout.maximumHeight: height
+ color: Theme.backgroundMainColor
+
+ property alias leftMenuVisible: btnLeftMenu.visible
+ property alias backVisible: btnLeftBack.visible
+ property alias rightMenuVisible: btnRightMenu.visible
+
+ property alias titleWidth: paneArea.width
+
+
+ signal leftMenu()
+ signal back()
+ signal rightMenu()
+
+ Icon {
+ id: btnLeftMenu
+ iconColor: Theme.toolbarIconColor
+ source: gcd.assetPath + "core/menu-24px.svg"
+
+
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.left: parent.left
+ width: 30
+ height: 30
+
+ onClicked: { leftMenu() }
+ }
+
+ Icon {
+ id: btnLeftBack
+ iconColor: Theme.toolbarIconColor
+ source: gcd.assetPath + "core/chevron_left-24px.svg"
+
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.left: parent.left
+ width: 30
+ height: 30
+
+ onClicked: { back() }
+ }
+
+
+
+ Rectangle {
+ id: paneArea
+ anchors.right: parent.right
+
+ EllipsisLabel {
+ id: paneTitle
+
+ visible: true
+ anchors.left: undefined
+ anchors.right: undefined
+ anchors.horizontalCenter: parent.horizontalCenter
+
+ color: Theme.mainTextColor
+ pixelSize: Theme.tabSize * gcd.themeScale
+ weight: Font.Bold
+ text: "global toolbar"
+
+ //extraPadding: btnRightMenu.width + 10
+
+ }
+
+ onWidthChanged: { paneTitle.textResize() }
+ }
+
+ Icon {
+ id: btnRightMenu
+ iconColor: Theme.toolbarIconColor
+ source: gcd.assetPath + "core/more_vert-24px.svg"
+
+ visible: false
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.right: parent.right
+ width: 30
+ height: 30
+
+ onClicked: { rightMenu() }
+ }
+
+ function setTitle(text, width) {
+ paneTitle.text = text
+ paneArea.width = width
+ paneTitle.textResize()
+ paneTitle.visible = true
+ }
+
+ function hideTitle() {
+ paneTitle.visible = false
+ }
+
+
+ Connections {
+ target: gcd
+
+ onSetToolbarTitle: function(handle) {
+ setTitle(handle, theStack.width)
+ btnRightMenu.visible = true
+ }
+ }
+
+}