UI improvements

This commit is contained in:
molan-git 2020-07-06 10:28:42 +02:00
parent 95f065fd5b
commit bc8bcf39e5
21 changed files with 93 additions and 152 deletions

View file

@ -16,7 +16,7 @@ Page {
property string status_id: "" property string status_id: ""
property string status_url: "" property string status_url: ""
property string status_uri: "" property string status_uri: ""
property int tootMaxChar: 500; property int tootMaxChar: 500
property bool bot: false //otherwise ReferenceError ProfileHeader.qml property bool bot: false //otherwise ReferenceError ProfileHeader.qml
property bool followed_by: false //otherwise ReferenceError ProfileHeader.qml property bool followed_by: false //otherwise ReferenceError ProfileHeader.qml
property bool locked: false //otherwise ReferenceError ProfileHeader.qml property bool locked: false //otherwise ReferenceError ProfileHeader.qml
@ -60,6 +60,7 @@ Page {
SilicaListView { SilicaListView {
id: myList id: myList
header: PageHeader { header: PageHeader {
title: headerTitle // pageTitle pushed from MainPage.qml or VisualContainer.qml title: headerTitle // pageTitle pushed from MainPage.qml or VisualContainer.qml
} }

View file

@ -85,7 +85,7 @@ Page {
height: parent.itemHeight height: parent.itemHeight
onSearchChanged: { onSearchChanged: {
console.log(search) console.log(search)
loader.sourceComponent = loading //loader.sourceComponent = loading
if (search.charAt(0) === "@") { if (search.charAt(0) === "@") {
loader.sourceComponent = userListComponent loader.sourceComponent = userListComponent
} else if (search.charAt(0) === "#") { } else if (search.charAt(0) === "#") {
@ -119,14 +119,14 @@ Page {
} }
} }
Component { // Component {
id: loading // id: loading
BusyIndicator { // BusyIndicator {
size: BusyIndicatorSize.Large // size: BusyIndicatorSize.Large
anchors.centerIn: parent // anchors.centerIn: parent
running: true // running: true
} // }
} // }
Component { Component {
id: tagListComponent id: tagListComponent

View file

@ -41,22 +41,16 @@ SilicaListView {
description: myList.description description: myList.description
} }
BusyIndicator { BusyLabel {
size: BusyIndicatorSize.Large id: loadStatusList
running: myList.model.count === 0 && !viewPlaceHolder.visible running: model.count === 0
anchors.centerIn: parent anchors {
horizontalCenter: parent.horizontalCenter
verticalCenter: parent.verticalCenter
} }
ViewPlaceholder {
id: viewPlaceHolder
enabled: model.count === 0
text: qsTr("Loading")
hintText: qsTr("please wait...")
anchors.centerIn: parent
} }
PullDownMenu { PullDownMenu {
MenuItem { MenuItem {
text: qsTr("Settings") text: qsTr("Settings")
visible: !profilePage visible: !profilePage
@ -124,10 +118,13 @@ SilicaListView {
} }
BusyIndicator { BusyIndicator {
running: loadStarted
visible: loadStatusList.running ? false : true
size: BusyIndicatorSize.Small size: BusyIndicatorSize.Small
running: loadStarted; anchors {
anchors.verticalCenter: parent.verticalCenter verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter horizontalCenter: parent.horizontalCenter
}
} }
} }
@ -171,10 +168,10 @@ SilicaListView {
function loadData(mode) { function loadData(mode) {
var p = [] var p = []
if (params.length) if (params.length) {
for(var i = 0; i<params.length; i++) for(var i = 0; i<params.length; i++)
p.push(params[i]) p.push(params[i])
}
if (mode === "append" && model.count) { if (mode === "append" && model.count) {
p.push({name: 'max_id', data: model.get(model.count-1).id}) p.push({name: 'max_id', data: model.get(model.count-1).id})
} }

View file

@ -16,10 +16,10 @@ Item {
Rectangle { Rectangle {
id: bgImage id: bgImage
opacity: 0.2 opacity: 0.7
gradient: Gradient { gradient: Gradient {
GradientStop { position: 0.0; color: Theme.highlightBackgroundColor } GradientStop { position: 0.0; color: Theme.highlightDimmerColor }
GradientStop { position: 1.0; color: Theme.highlightBackgroundColor } GradientStop { position: 2.0; color: Theme.highlightBackgroundColor }
} }
anchors.fill: parent anchors.fill: parent
@ -27,6 +27,7 @@ Item {
asynchronous: true asynchronous: true
fillMode: Image.PreserveAspectCrop fillMode: Image.PreserveAspectCrop
source: bg source: bg
opacity: 0.6
anchors.fill: parent anchors.fill: parent
} }
} }

View file

@ -16,12 +16,12 @@ FullscreenContentPage {
IconButton { IconButton {
icon.source: "image://theme/icon-m-dismiss" icon.source: "image://theme/icon-m-dismiss"
onClicked: pageStack.pop()
anchors { anchors {
top: profileImage.top top: profileImage.top
topMargin: Theme.horizontalPageMargin topMargin: Theme.horizontalPageMargin
right: parent.right right: parent.right
rightMargin: Theme.horizontalPageMargin rightMargin: Theme.horizontalPageMargin
} }
onClicked: pageStack.pop()
} }
} }

View file

@ -18,7 +18,7 @@ BackgroundItem {
id: bgDirect id: bgDirect
x: 0 x: 0
y: 0 y: 0
visible: status_visibility === "direct" visible: model.status_visibility === "direct"
width: parent.width width: parent.width
height: parent.height height: parent.height
opacity: 0.3 opacity: 0.3
@ -188,7 +188,7 @@ BackgroundItem {
left: miniHeader.left left: miniHeader.left
leftMargin: Theme.paddingMedium leftMargin: Theme.paddingMedium
right: miniHeader.right right: miniHeader.right
rightMargin: Theme.horizontalPageMargin rightMargin: Theme.horizontalPageMargin + Theme.paddingLarge
top: miniHeader.bottom top: miniHeader.bottom
topMargin: Theme.paddingSmall topMargin: Theme.paddingSmall
bottomMargin: Theme.paddingLarge bottomMargin: Theme.paddingLarge
@ -255,16 +255,14 @@ BackgroundItem {
// Displays media in Toots // Displays media in Toots
MediaBlock { MediaBlock {
id: media id: media
visible: if (myList.type === "notifications" && ( type === "favourite" || type === "reblog" )) { visible: (myList.type === "notifications" && ( type === "favourite" || type === "reblog" )) ? false : true
false
} else true
model: typeof attachments !== "undefined" ? attachments : Qt.createQmlObject('import QtQuick 2.0; ListModel { }', Qt.application, 'InternalQmlObject') model: typeof attachments !== "undefined" ? attachments : Qt.createQmlObject('import QtQuick 2.0; ListModel { }', Qt.application, 'InternalQmlObject')
height: Theme.iconSizeExtraLarge * 2 height: Theme.iconSizeExtraLarge * 2
anchors { anchors {
left: lblContent.left left: lblContent.left
leftMargin: isPortrait ? 0 : Theme.itemSizeSmall leftMargin: isPortrait ? 0 : Theme.itemSizeSmall
right: lblContent.right right: lblContent.right
rightMargin: isPortrait ? 0 : Theme.itemSizeLarge * 1.4 rightMargin: isPortrait ? 0 : Theme.itemSizeLarge * 1.2
top: lblContent.bottom top: lblContent.bottom
topMargin: Theme.paddingMedium topMargin: Theme.paddingMedium
bottomMargin: Theme.paddingLarge bottomMargin: Theme.paddingLarge
@ -278,7 +276,7 @@ BackgroundItem {
MenuItem { MenuItem {
id: mnuBoost id: mnuBoost
visible: model.type !== "follow" visible: model.type !== "follow"
enabled: status_visibility !== "direct" enabled: model.status_visibility !== "direct"
text: typeof model.status_reblogged !== "undefined" && model.status_reblogged ? qsTr("Unboost") : qsTr("Boost") text: typeof model.status_reblogged !== "undefined" && model.status_reblogged ? qsTr("Unboost") : qsTr("Boost")
onClicked: { onClicked: {
var status = typeof model.status_reblogged !== "undefined" && model.status_reblogged var status = typeof model.status_reblogged !== "undefined" && model.status_reblogged

View file

@ -174,14 +174,6 @@
<source>Settings</source> <source>Settings</source>
<translation>Einstellungen</translation> <translation>Einstellungen</translation>
</message> </message>
<message>
<source>Loading</source>
<translation>Wird geladen</translation>
</message>
<message>
<source>please wait...</source>
<translation>bitte warten...</translation>
</message>
<message> <message>
<source>New Toot</source> <source>New Toot</source>
<translation>Neuer Toot</translation> <translation>Neuer Toot</translation>
@ -194,6 +186,10 @@
<source>Open in Browser</source> <source>Open in Browser</source>
<translation>Im Browser öffnen</translation> <translation>Im Browser öffnen</translation>
</message> </message>
<message>
<source>Loading...</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>ProfileHeader</name> <name>ProfileHeader</name>

View file

@ -174,14 +174,6 @@
<source>Settings</source> <source>Settings</source>
<translation>Ρυθμίσεις</translation> <translation>Ρυθμίσεις</translation>
</message> </message>
<message>
<source>Loading</source>
<translation>Φόρτωση</translation>
</message>
<message>
<source>please wait...</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>New Toot</source> <source>New Toot</source>
<translation>Νέος</translation> <translation>Νέος</translation>
@ -194,6 +186,10 @@
<source>Open in Browser</source> <source>Open in Browser</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Loading...</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>ProfileHeader</name> <name>ProfileHeader</name>

View file

@ -174,14 +174,6 @@
<source>Settings</source> <source>Settings</source>
<translation>Ajustes</translation> <translation>Ajustes</translation>
</message> </message>
<message>
<source>Loading</source>
<translation>Cargando</translation>
</message>
<message>
<source>please wait...</source>
<translation>por favor, espera...</translation>
</message>
<message> <message>
<source>New Toot</source> <source>New Toot</source>
<translation>Nuevo toot</translation> <translation>Nuevo toot</translation>
@ -194,6 +186,10 @@
<source>Open in Browser</source> <source>Open in Browser</source>
<translation type="unfinished">Abrir en el navegador</translation> <translation type="unfinished">Abrir en el navegador</translation>
</message> </message>
<message>
<source>Loading...</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>ProfileHeader</name> <name>ProfileHeader</name>

View file

@ -174,14 +174,6 @@
<source>Settings</source> <source>Settings</source>
<translation>Paramètres</translation> <translation>Paramètres</translation>
</message> </message>
<message>
<source>Loading</source>
<translation>Chargement</translation>
</message>
<message>
<source>please wait...</source>
<translation>patientez...</translation>
</message>
<message> <message>
<source>New Toot</source> <source>New Toot</source>
<translation>Nouveau pouet</translation> <translation>Nouveau pouet</translation>
@ -194,6 +186,10 @@
<source>Open in Browser</source> <source>Open in Browser</source>
<translation>Ouvrir dans le navigateur</translation> <translation>Ouvrir dans le navigateur</translation>
</message> </message>
<message>
<source>Loading...</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>ProfileHeader</name> <name>ProfileHeader</name>

View file

@ -174,14 +174,6 @@
<source>Settings</source> <source>Settings</source>
<translation>Impostazioni</translation> <translation>Impostazioni</translation>
</message> </message>
<message>
<source>Loading</source>
<translation>Caricamento</translation>
</message>
<message>
<source>please wait...</source>
<translation>Attendere un momento...</translation>
</message>
<message> <message>
<source>New Toot</source> <source>New Toot</source>
<translation>Nuovo Toot</translation> <translation>Nuovo Toot</translation>
@ -194,6 +186,10 @@
<source>Open in Browser</source> <source>Open in Browser</source>
<translation>Aprire nel browser</translation> <translation>Aprire nel browser</translation>
</message> </message>
<message>
<source>Loading...</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>ProfileHeader</name> <name>ProfileHeader</name>

View file

@ -174,14 +174,6 @@
<source>Settings</source> <source>Settings</source>
<translation>Instellingen</translation> <translation>Instellingen</translation>
</message> </message>
<message>
<source>Loading</source>
<translation>Laden</translation>
</message>
<message>
<source>please wait...</source>
<translation>even geduld</translation>
</message>
<message> <message>
<source>New Toot</source> <source>New Toot</source>
<translation>Nieuwe Toot</translation> <translation>Nieuwe Toot</translation>
@ -194,6 +186,10 @@
<source>Open in Browser</source> <source>Open in Browser</source>
<translation type="unfinished">Open een Browser</translation> <translation type="unfinished">Open een Browser</translation>
</message> </message>
<message>
<source>Loading...</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>ProfileHeader</name> <name>ProfileHeader</name>

View file

@ -174,14 +174,6 @@
<source>Settings</source> <source>Settings</source>
<translation>Instellingen</translation> <translation>Instellingen</translation>
</message> </message>
<message>
<source>Loading</source>
<translation>Laden</translation>
</message>
<message>
<source>please wait...</source>
<translation>efkens geduld</translation>
</message>
<message> <message>
<source>New Toot</source> <source>New Toot</source>
<translation>Nieuwen toot</translation> <translation>Nieuwen toot</translation>
@ -194,6 +186,10 @@
<source>Open in Browser</source> <source>Open in Browser</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Loading...</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>ProfileHeader</name> <name>ProfileHeader</name>

View file

@ -174,14 +174,6 @@
<source>Settings</source> <source>Settings</source>
<translation>Parmètres</translation> <translation>Parmètres</translation>
</message> </message>
<message>
<source>Loading</source>
<translation>Cargament</translation>
</message>
<message>
<source>please wait...</source>
<translation>esperatz....</translation>
</message>
<message> <message>
<source>New Toot</source> <source>New Toot</source>
<translation>Nòu Tut</translation> <translation>Nòu Tut</translation>
@ -194,6 +186,10 @@
<source>Open in Browser</source> <source>Open in Browser</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Loading...</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>ProfileHeader</name> <name>ProfileHeader</name>

View file

@ -174,14 +174,6 @@
<source>Settings</source> <source>Settings</source>
<translation>Ustawienia</translation> <translation>Ustawienia</translation>
</message> </message>
<message>
<source>Loading</source>
<translation>Ładowanie</translation>
</message>
<message>
<source>please wait...</source>
<translation>proszę czekać</translation>
</message>
<message> <message>
<source>New Toot</source> <source>New Toot</source>
<translation>Nowy wpis</translation> <translation>Nowy wpis</translation>
@ -194,6 +186,10 @@
<source>Open in Browser</source> <source>Open in Browser</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Loading...</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>ProfileHeader</name> <name>ProfileHeader</name>

View file

@ -174,14 +174,6 @@
<source>Settings</source> <source>Settings</source>
<translation>Настройки</translation> <translation>Настройки</translation>
</message> </message>
<message>
<source>Loading</source>
<translation>Загрузка</translation>
</message>
<message>
<source>please wait...</source>
<translation>Пожалуйста, подождите...</translation>
</message>
<message> <message>
<source>New Toot</source> <source>New Toot</source>
<translation>Новый</translation> <translation>Новый</translation>
@ -194,6 +186,10 @@
<source>Open in Browser</source> <source>Open in Browser</source>
<translation type="unfinished">Открыть в браузере</translation> <translation type="unfinished">Открыть в браузере</translation>
</message> </message>
<message>
<source>Loading...</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>ProfileHeader</name> <name>ProfileHeader</name>

View file

@ -174,14 +174,6 @@
<source>Settings</source> <source>Settings</source>
<translation>Подешавања</translation> <translation>Подешавања</translation>
</message> </message>
<message>
<source>Loading</source>
<translation>Učitavanje</translation>
</message>
<message>
<source>please wait...</source>
<translation>молимо вас, сачекајте...</translation>
</message>
<message> <message>
<source>New Toot</source> <source>New Toot</source>
<translation>Novi toot</translation> <translation>Novi toot</translation>
@ -194,6 +186,10 @@
<source>Open in Browser</source> <source>Open in Browser</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Loading...</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>ProfileHeader</name> <name>ProfileHeader</name>

View file

@ -174,14 +174,6 @@
<source>Settings</source> <source>Settings</source>
<translation>Inställningar</translation> <translation>Inställningar</translation>
</message> </message>
<message>
<source>Loading</source>
<translation>Laddar</translation>
</message>
<message>
<source>please wait...</source>
<translation>Vänligen vänta...</translation>
</message>
<message> <message>
<source>New Toot</source> <source>New Toot</source>
<translation>Ny toot</translation> <translation>Ny toot</translation>
@ -194,6 +186,10 @@
<source>Open in Browser</source> <source>Open in Browser</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Loading...</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>ProfileHeader</name> <name>ProfileHeader</name>

View file

@ -174,14 +174,6 @@
<source>Settings</source> <source>Settings</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<source>Loading</source>
<translation></translation>
</message>
<message>
<source>please wait...</source>
<translation>......</translation>
</message>
<message> <message>
<source>New Toot</source> <source>New Toot</source>
<translation></translation> <translation></translation>
@ -194,6 +186,10 @@
<source>Open in Browser</source> <source>Open in Browser</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Loading...</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>ProfileHeader</name> <name>ProfileHeader</name>

View file

@ -174,14 +174,6 @@
<source>Settings</source> <source>Settings</source>
<translation>Settings</translation> <translation>Settings</translation>
</message> </message>
<message>
<source>Loading</source>
<translation></translation>
</message>
<message>
<source>please wait...</source>
<translation></translation>
</message>
<message> <message>
<source>New Toot</source> <source>New Toot</source>
<translation>New Toot</translation> <translation>New Toot</translation>
@ -194,6 +186,10 @@
<source>Open in Browser</source> <source>Open in Browser</source>
<translation type="unfinished">Open in Browser</translation> <translation type="unfinished">Open in Browser</translation>
</message> </message>
<message>
<source>Loading...</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>ProfileHeader</name> <name>ProfileHeader</name>