ui-improvements-fixes
Fixes new UI elements New responsive UI items
This commit is contained in:
parent
16e211ddb9
commit
eac5aac326
5 changed files with 40 additions and 37 deletions
|
@ -7,6 +7,7 @@ import "./components/"
|
||||||
|
|
||||||
Page {
|
Page {
|
||||||
id: conversationPage
|
id: conversationPage
|
||||||
|
|
||||||
property string headerTitle: ""
|
property string headerTitle: ""
|
||||||
property string type
|
property string type
|
||||||
property alias title: header.title
|
property alias title: header.title
|
||||||
|
@ -18,6 +19,7 @@ Page {
|
||||||
property string toot_url: ""
|
property string toot_url: ""
|
||||||
property int tootMaxChar: 500;
|
property int tootMaxChar: 500;
|
||||||
property ListModel mdl
|
property ListModel mdl
|
||||||
|
|
||||||
allowedOrientations: Orientation.All
|
allowedOrientations: Orientation.All
|
||||||
onSuggestedUserChanged: {
|
onSuggestedUserChanged: {
|
||||||
console.log(suggestedUser)
|
console.log(suggestedUser)
|
||||||
|
@ -101,7 +103,7 @@ Page {
|
||||||
visible: type === "reply" && toot_url !== ""
|
visible: type === "reply" && toot_url !== ""
|
||||||
MenuItem {
|
MenuItem {
|
||||||
text: qsTr("Copy Link to Clipboard")
|
text: qsTr("Copy Link to Clipboard")
|
||||||
onClicked: Clipboard.text = toot_url;
|
onClicked: Clipboard.text = toot_url
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -109,16 +111,21 @@ Page {
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: predictionList
|
id: predictionList
|
||||||
visible: false
|
visible: false
|
||||||
anchors.bottom: panel.top
|
color: Theme.highlightDimmerColor
|
||||||
anchors.left: parent.left
|
height: parent.height - panel.height - (Theme.paddingLarge * 4.5)
|
||||||
anchors.right: panel.right
|
anchors {
|
||||||
anchors.top: parent.top
|
left: panel.left
|
||||||
height: implicitHeight
|
right: panel.right
|
||||||
color: Theme.highlightDimmerColor
|
bottom: if (panel.open == true) {
|
||||||
|
panel.top
|
||||||
|
} else {
|
||||||
|
hiddenPanel.top
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SilicaListView {
|
SilicaListView {
|
||||||
rotation: 180
|
rotation: 180
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
model: suggestedModel
|
model: suggestedModel
|
||||||
clip: true
|
clip: true
|
||||||
quickScroll: false
|
quickScroll: false
|
||||||
|
|
|
@ -175,7 +175,7 @@ Page {
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: txtContainer
|
id: txtContainer
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: Math.min(txtNote.height, parent.height*0.488)
|
height: Math.min(txtNote.height, parent.height*0.5)
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
visible: {
|
visible: {
|
||||||
if ((note.text === "") || (note.text === "<p></p>") ) {
|
if ((note.text === "") || (note.text === "<p></p>") ) {
|
||||||
|
@ -185,9 +185,13 @@ Page {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SilicaListView {
|
SilicaFlickable {
|
||||||
id: txtFlickable
|
id: txtFlickable
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
contentWidth: parent.width
|
||||||
|
contentHeight: txtNote.height
|
||||||
|
anchors.topMargin: Theme.paddingMedium
|
||||||
|
anchors.bottomMargin: Theme.paddingMedium
|
||||||
clip: true
|
clip: true
|
||||||
quickScroll: false
|
quickScroll: false
|
||||||
VerticalScrollDecorator {}
|
VerticalScrollDecorator {}
|
||||||
|
@ -229,6 +233,7 @@ Page {
|
||||||
id: statsRow
|
id: statsRow
|
||||||
spacing: Theme.paddingLarge
|
spacing: Theme.paddingLarge
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
anchors.topMargin: Theme.paddingMedium
|
||||||
anchors.leftMargin: Theme.paddingLarge
|
anchors.leftMargin: Theme.paddingLarge
|
||||||
anchors.rightMargin: Theme.paddingLarge
|
anchors.rightMargin: Theme.paddingLarge
|
||||||
|
|
||||||
|
|
|
@ -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"}
|
SectionHeader { text: "Account"}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
@ -82,6 +71,7 @@ Page {
|
||||||
Button {
|
Button {
|
||||||
id: btnRemoveAccount
|
id: btnRemoveAccount
|
||||||
text: Logic.conf['login'] ? qsTr("Remove Account") : qsTr("Add Account")
|
text: Logic.conf['login'] ? qsTr("Remove Account") : qsTr("Add Account")
|
||||||
|
width: Theme.buttonWidthMedium
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
onClicked: {
|
onClicked: {
|
||||||
remorsePopup.execute(btnRemoveAccount.text, function() {
|
remorsePopup.execute(btnRemoveAccount.text, function() {
|
||||||
|
|
|
@ -114,6 +114,16 @@ FullscreenContentPage {
|
||||||
bottomMargin: Theme.horizontalPageMargin
|
bottomMargin: Theme.horizontalPageMargin
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
onClicked: function() {
|
||||||
|
if (video.playbackState === MediaPlayer.PlayingState)
|
||||||
|
video.pause()
|
||||||
|
else
|
||||||
|
video.play()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
visible: videoError.text != ""
|
visible: videoError.text != ""
|
||||||
anchors.left: parent.left
|
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 {
|
Flickable {
|
||||||
id: imageFlickable
|
id: imageFlickable
|
||||||
visible: false
|
visible: false
|
||||||
contentWidth: imageContainer.width; contentHeight: imageContainer.height
|
contentWidth: imageContainer.width
|
||||||
|
contentHeight: imageContainer.height
|
||||||
clip: true
|
clip: true
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onHeightChanged: if (imagePreview.status === Image.Ready) {
|
onHeightChanged: if (imagePreview.status === Image.Ready) {
|
||||||
|
@ -178,8 +180,8 @@ FullscreenContentPage {
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
cache: true
|
cache: true
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
sourceSize.width: mediaPage.width
|
sourceSize.width: mediaPage.width
|
||||||
smooth: false
|
smooth: true
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
onStatusChanged: {
|
onStatusChanged: {
|
||||||
if (status == Image.Ready) {
|
if (status == Image.Ready) {
|
||||||
|
@ -197,7 +199,6 @@ FullscreenContentPage {
|
||||||
var yoff = (imageFlickable.height / 2 + imageFlickable.contentY) * scale / prevScale;
|
var yoff = (imageFlickable.height / 2 + imageFlickable.contentY) * scale / prevScale;
|
||||||
imageFlickable.contentY = yoff - imageFlickable.height / 2
|
imageFlickable.contentY = yoff - imageFlickable.height / 2
|
||||||
}
|
}
|
||||||
prevScale = scale
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
|
|
|
@ -153,7 +153,7 @@ BackgroundItem {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
text: content.replace(new RegExp("<a ", 'g'), '<a style="text-decoration: none; color:'+(pressed ? Theme.secondaryColor : Theme.highlightColor)+'" ')
|
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
|
wrapMode: Text.Wrap
|
||||||
textFormat: Text.RichText
|
textFormat: Text.RichText
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.fontSizeSmall
|
||||||
|
@ -201,7 +201,7 @@ BackgroundItem {
|
||||||
bottomMargin: Theme.paddingLarge
|
bottomMargin: Theme.paddingLarge
|
||||||
}
|
}
|
||||||
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: 100
|
height: Theme.iconSizeExtraLarge * 2
|
||||||
}
|
}
|
||||||
|
|
||||||
ContextMenu {
|
ContextMenu {
|
||||||
|
|
Loading…
Reference in a new issue