ui-improvements-fixes

Fixes new UI elements
New responsive UI items
This commit is contained in:
molan-git 2020-06-03 11:52:07 +02:00
parent 16e211ddb9
commit eac5aac326
5 changed files with 40 additions and 37 deletions

View file

@ -7,6 +7,7 @@ import "./components/"
Page {
id: conversationPage
property string headerTitle: ""
property string type
property alias title: header.title
@ -18,6 +19,7 @@ Page {
property string toot_url: ""
property int tootMaxChar: 500;
property ListModel mdl
allowedOrientations: Orientation.All
onSuggestedUserChanged: {
console.log(suggestedUser)
@ -101,7 +103,7 @@ Page {
visible: type === "reply" && toot_url !== ""
MenuItem {
text: qsTr("Copy Link to Clipboard")
onClicked: Clipboard.text = toot_url;
onClicked: Clipboard.text = toot_url
}
}
}
@ -109,12 +111,17 @@ Page {
Rectangle {
id: predictionList
visible: false
anchors.bottom: panel.top
anchors.left: parent.left
anchors.right: panel.right
anchors.top: parent.top
height: implicitHeight
color: Theme.highlightDimmerColor
height: parent.height - panel.height - (Theme.paddingLarge * 4.5)
anchors {
left: panel.left
right: panel.right
bottom: if (panel.open == true) {
panel.top
} else {
hiddenPanel.top
}
}
SilicaListView {
rotation: 180

View file

@ -175,7 +175,7 @@ Page {
Rectangle {
id: txtContainer
width: parent.width
height: Math.min(txtNote.height, parent.height*0.488)
height: Math.min(txtNote.height, parent.height*0.5)
color: "transparent"
visible: {
if ((note.text === "") || (note.text === "<p></p>") ) {
@ -185,9 +185,13 @@ Page {
}
}
SilicaListView {
SilicaFlickable {
id: txtFlickable
anchors.fill: parent
contentWidth: parent.width
contentHeight: txtNote.height
anchors.topMargin: Theme.paddingMedium
anchors.bottomMargin: Theme.paddingMedium
clip: true
quickScroll: false
VerticalScrollDecorator {}
@ -229,6 +233,7 @@ Page {
id: statsRow
spacing: Theme.paddingLarge
anchors.horizontalCenter: parent.horizontalCenter
anchors.topMargin: Theme.paddingMedium
anchors.leftMargin: Theme.paddingLarge
anchors.rightMargin: Theme.paddingLarge

View file

@ -38,17 +38,6 @@ Page {
}
}
IconTextSwitch {
text: qsTr("Use smaller Font Size in Toots")
description: qsTr("Enable this option if you prefer to use a smaller font size in displayed Toots")
icon.source: "image://theme/icon-m-font-size"
enabled: false
//checked: typeof Logic.conf['loadImages'] !== "undefined" && Logic.conf['loadImages']
//onClicked: {
// Logic.conf['loadImages'] = checked
//}
}
SectionHeader { text: "Account"}
Item {
@ -82,6 +71,7 @@ Page {
Button {
id: btnRemoveAccount
text: Logic.conf['login'] ? qsTr("Remove Account") : qsTr("Add Account")
width: Theme.buttonWidthMedium
anchors.horizontalCenter: parent.horizontalCenter
onClicked: {
remorsePopup.execute(btnRemoveAccount.text, function() {

View file

@ -114,6 +114,16 @@ FullscreenContentPage {
bottomMargin: Theme.horizontalPageMargin
}
MouseArea {
anchors.fill: parent
onClicked: function() {
if (video.playbackState === MediaPlayer.PlayingState)
video.pause()
else
video.play()
}
}
Rectangle {
visible: videoError.text != ""
anchors.left: parent.left
@ -136,15 +146,6 @@ FullscreenContentPage {
}
}
MouseArea {
anchors.fill: parent
onClicked: function() {
if (video.playbackState === MediaPlayer.PlayingState)
video.pause()
else
video.play()
}
}
}
}
}
@ -152,7 +153,8 @@ FullscreenContentPage {
Flickable {
id: imageFlickable
visible: false
contentWidth: imageContainer.width; contentHeight: imageContainer.height
contentWidth: imageContainer.width
contentHeight: imageContainer.height
clip: true
anchors.fill: parent
onHeightChanged: if (imagePreview.status === Image.Ready) {
@ -179,7 +181,7 @@ FullscreenContentPage {
cache: true
asynchronous: true
sourceSize.width: mediaPage.width
smooth: false
smooth: true
anchors.centerIn: parent
onStatusChanged: {
if (status == Image.Ready) {
@ -197,7 +199,6 @@ FullscreenContentPage {
var yoff = (imageFlickable.height / 2 + imageFlickable.contentY) * scale / prevScale;
imageFlickable.contentY = yoff - imageFlickable.height / 2
}
prevScale = scale
}
NumberAnimation {

View file

@ -153,7 +153,7 @@ BackgroundItem {
}
}
text: content.replace(new RegExp("<a ", 'g'), '<a style="text-decoration: none; color:'+(pressed ? Theme.secondaryColor : Theme.highlightColor)+'" ')
linkColor : Theme.highlightColor
linkColor: Theme.highlightColor
wrapMode: Text.Wrap
textFormat: Text.RichText
font.pixelSize: Theme.fontSizeSmall
@ -201,7 +201,7 @@ BackgroundItem {
bottomMargin: Theme.paddingLarge
}
model: typeof attachments !== "undefined" ? attachments : Qt.createQmlObject('import QtQuick 2.0; ListModel { }', Qt.application, 'InternalQmlObject');
height: 100
height: Theme.iconSizeExtraLarge * 2
}
ContextMenu {