Visual update and fixes

Fixes column view for toot privacy settings, changes in size of textfield, adds placeholder in toot textfield and content warning field. 
Colour adjustments, modified icon for emojis.
This commit is contained in:
molan-git 2020-01-24 22:00:04 +01:00 committed by GitHub
parent c81b747b6d
commit 9d8699318a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,7 +27,6 @@ Page {
'model' : suggestedModel, 'model' : suggestedModel,
'mode' : "append", 'mode' : "append",
'params' : [ {name: "q", data: suggestedUser} ], 'params' : [ {name: "q", data: suggestedUser} ],
'conf' : Logic.conf 'conf' : Logic.conf
}; };
worker.sendMessage(msg); worker.sendMessage(msg);
@ -146,8 +145,7 @@ Page {
Rectangle { Rectangle {
id: progressBar id: progressBar
width: toot.text.length ? panel.width*(toot.text.length/tootMaxChar) : 0; width: toot.text.length ? panel.width*(toot.text.length/tootMaxChar) : 0;
height: Theme.itemSizeSmall * 0.10
height: Theme.itemSizeSmall * 0.05
color: Theme.highlightBackgroundColor color: Theme.highlightBackgroundColor
opacity: 0.7 opacity: 0.7
anchors { anchors {
@ -168,10 +166,11 @@ Page {
} }
autoScrollEnabled: true autoScrollEnabled: true
labelVisible: false labelVisible: false
placeholderText: qsTr("Content warning!") placeholderText: qsTr("Write your warning here")
placeholderColor: palette.highlightColor
color: palette.highlightColor
horizontalAlignment: Text.AlignLeft horizontalAlignment: Text.AlignLeft
EnterKey.onClicked: { EnterKey.onClicked: {
//tweet()
} }
} }
TextInput { TextInput {
@ -183,7 +182,7 @@ Page {
id: toot id: toot
anchors { anchors {
top: warningContent.bottom top: warningContent.bottom
topMargin: Theme.paddingMedium topMargin: Theme.paddingMediummas
left: parent.left left: parent.left
right: parent.right right: parent.right
rightMargin: Theme.paddingMedium rightMargin: Theme.paddingMedium
@ -192,10 +191,10 @@ Page {
labelVisible: false labelVisible: false
//focus: true //focus: true
text: description !== "" && (description.charAt(0) == '@' || description.charAt(0) == '#') ? description+' ' : '' text: description !== "" && (description.charAt(0) == '@' || description.charAt(0) == '#') ? description+' ' : ''
height: implicitHeight height: 300
horizontalAlignment: Text.AlignLeft horizontalAlignment: Text.AlignLeft
placeholderText: "What's on your mind?"
EnterKey.onClicked: { EnterKey.onClicked: {
//tweet()
} }
onTextChanged: { onTextChanged: {
textOperations.text = toot.text textOperations.text = toot.text
@ -218,13 +217,12 @@ Page {
} }
anchors { anchors {
top: warningContent.bottom
bottom: bottom.top bottom: bottom.top
right: parent.right right: parent.right
rightMargin: Theme.paddingSmall rightMargin: Theme.paddingSmall
} }
icon.source: "image://theme/icon-s-edit?" + (pressed icon.source: "../../qml/images/emojiselect.svg"
? Theme.highlightColor
: (warningContent.visible ? Theme.secondaryHighlightColor : Theme.primaryColor))
onClicked: pageStack.push(firstWizardPage) onClicked: pageStack.push(firstWizardPage)
} }
SilicaGridView { SilicaGridView {
@ -304,27 +302,20 @@ Page {
} }
ImageUploader { ImageUploader {
id: imageUploader id: imageUploader
onProgressChanged: { onProgressChanged: {
console.log("progress "+progress) console.log("progress "+progress)
uploadProgress.width = parent.width*progress uploadProgress.width = parent.width*progress
} }
onSuccess: { onSuccess: {
uploadProgress.width =0 uploadProgress.width =0
console.log(replyData); console.log(replyData);
mediaModel.append(JSON.parse(replyData)) mediaModel.append(JSON.parse(replyData))
} }
onFailure: { onFailure: {
uploadProgress.width =0 uploadProgress.width =0
btnAddImage.enabled = true; btnAddImage.enabled = true;
console.log(status) console.log(status)
console.log(statusText) console.log(statusText)
} }
} }
@ -332,15 +323,17 @@ Page {
id: privacy id: privacy
anchors { anchors {
top: toot.bottom top: toot.bottom
topMargin: -Theme.paddingSmall*2 bottom: parent
//topMargin: -Theme.paddingSmall*2
left: btnAddImage.right left: btnAddImage.right
right: btnSend.left right: btnSend.left
} }
currentIndex: 0
menu: ContextMenu { menu: ContextMenu {
MenuItem { text: qsTr("public") } MenuItem { text: qsTr("Public") }
MenuItem { text: qsTr("unlisted") } MenuItem { text: qsTr("Unlisted") }
MenuItem { text: qsTr("followers only") } MenuItem { text: qsTr("Followers-only") }
MenuItem { text: qsTr("direct") } MenuItem { text: qsTr("Direct") }
} }
} }
IconButton { IconButton {
@ -438,7 +431,6 @@ Page {
id: emoticonsDialog id: emoticonsDialog
canAccept: false; //selector.currentIndex >= 0 canAccept: false; //selector.currentIndex >= 0
//acceptDestination: conversationPage //acceptDestination: conversationPage
onAcceptPendingChanged: { onAcceptPendingChanged: {
if (acceptPending) { if (acceptPending) {
// Tell the destination page what the selected category is // Tell the destination page what the selected category is
@ -515,7 +507,6 @@ Page {
ListElement { section: "smileys"; glyph: "🙎" } ListElement { section: "smileys"; glyph: "🙎" }
ListElement { section: "smileys"; glyph: "🙏" } ListElement { section: "smileys"; glyph: "🙏" }
ListElement { section: "Transport and map"; glyph: "🚀" } ListElement { section: "Transport and map"; glyph: "🚀" }
ListElement { section: "Transport and map"; glyph: "🚃" } ListElement { section: "Transport and map"; glyph: "🚃" }
ListElement { section: "Transport and map"; glyph: "🚀" } ListElement { section: "Transport and map"; glyph: "🚀" }
@ -562,10 +553,6 @@ Page {
ListElement { section: "Horoscope Signs"; glyph: "♒" } ListElement { section: "Horoscope Signs"; glyph: "♒" }
ListElement { section: "Horoscope Signs"; glyph: "♓" } ListElement { section: "Horoscope Signs"; glyph: "♓" }
} }
delegate: BackgroundItem { delegate: BackgroundItem {
width: gridView.cellWidth width: gridView.cellWidth