v0.6.3 Dark Mode

This commit is contained in:
LubuWest 2021-10-28 21:56:00 +02:00
commit 66e5c33b00
56 changed files with 1869 additions and 1283 deletions

View file

@ -32,6 +32,7 @@
import QtQuick 2.0
import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
import "qrc:/js/helper.js" as Helperjs
import "qrc:/js/news.js" as Newsjs
import "qrc:/js/service.js" as Service
@ -140,9 +141,9 @@ Page {
Component { id: contactHeader
Rectangle{
border.color: "#EEEEEE"
border.color: Material.backgroundDimColor//"#EEEEEE"
border.width: 1
color:"white"
color: Material.backgroundColor//"white"
width:contactView.width
height: contactView.width<35*root.fontFactor*osSettings.systemFontSize?(profileImage.height+namelabel.height+detailtext.height+7*mm):Math.max(profileImage.height,(buttonflow.height+namelabel.height+detailtext.height))+7*mm
//height: wrapper.height
@ -170,7 +171,7 @@ Page {
y: mm
spacing:4
BlueButton{
MButton{
id:photobutton
height: 6*mm
width: 8*mm
@ -187,7 +188,7 @@ Page {
}
}
BlueButton{
MButton{
id:dmbutton
height: 6*mm
width: 8*mm
@ -200,7 +201,7 @@ Page {
}
}
BlueButton{
MButton{
id:eventbutton
visible:(contact.network=="dfrn")
height: 6*mm
@ -214,7 +215,7 @@ Page {
rootstackView.pop()
}
}
BlueButton{
MButton{
id:approvebutton
visible:(contact.hasOwnProperty("acct"))
height: 6*mm
@ -229,7 +230,7 @@ Page {
rootstackView.pop()
}
}
BlueButton{
MButton{
id:rejectbutton
visible:(contact.hasOwnProperty("acct"))
height: 6*mm
@ -243,7 +244,7 @@ Page {
rootstackView.pop()
}
}
BlueButton{
MButton{
id:ignorebutton
visible:(contact.hasOwnProperty("acct"))
height: 6*mm
@ -257,7 +258,7 @@ Page {
rootstackView.pop()
}
}
BlueButton{
MButton{
id:followbutton
visible:(contact.isFriend==0)
height: 6*mm
@ -276,7 +277,7 @@ Page {
}
}
BlueButton{
MButton{
id:unfollowbutton
visible:(contact.isFriend==1)
height: 6*mm
@ -301,7 +302,7 @@ Page {
height: implicitHeight
text:contact.name+" (@"+contact.screen_name+")"
wrapMode: Text.Wrap//elide:Text.ElideRight
color: "#303030"
color: Material.primaryTextColor//"#303030"
font.pointSize: 1.2*osSettings.bigFontSize
font.family: "Noto Sans"
anchors.top: contactView.width<35*root.fontFactor*osSettings.systemFontSize?profileImage.bottom:buttonflow.bottom
@ -320,6 +321,7 @@ Page {
font.family: "Noto Sans"
textFormat:Text.RichText
wrapMode: Text.Wrap
color: Material.primaryTextColor
text:"<b>"+qsTr("Description")+": </b> "+(Qt.atob(contact.description)!=""?contact.description:"")+"<br> <b>"+qsTr("Location")+":</b> "+contact.location+"<br> <b>"+qsTr("Posts")+":</b> "+contact.statuses_count+
"<br> <b>"+qsTr("URL")+":</b> <a href='"+ contact.url+"'>"+contact.url+"</a><br>"+
connectUrl+ "<b>"+qsTr("Created at")+":</b> "+createdAtDate.toLocaleString(Qt.locale())
@ -341,7 +343,7 @@ Page {
}
function onSuccess(data,api){
Service.processNews(api,data)
replySignal("")
//replySignal("")
}
}
@ -350,9 +352,8 @@ Page {
function onContactpostsChanged(){
if (root.contactposts.length>0&&root.contactposts[0]!=null){profileimagesource=root.contactposts[0].friendica_author.profile_image_url_large}
contactBusy.running=false;
contactModel.clear();
var currentTime= new Date();
var msg = {'currentTime': currentTime, 'model': contactModel,'news':root.contactposts, 'options':globaloptions};
var msg = {'currentTime': currentTime, 'model': contactModel,'news':root.contactposts, 'options':globaloptions, 'method':'contact'};
contactWorker.sendMessage(msg)
}
}

View file

@ -31,14 +31,15 @@
// List of people from Friendica Activities
import QtQuick 2.0
import QtQuick.Controls.Material 2.12
import "qrc:/js/helper.js" as Helperjs
import "qrc:/qml/genericqml"
Rectangle {
id:activitiesRectangle
property var activitymembers
color: "white"
border.color: "light grey"
color: Material.dialogColor
border.color: Material.frameColor
radius:0.5*mm
width:root.width/2
height:Math.min(root.height/2,(10*mm+6*activitymembers.length*mm))
@ -53,50 +54,54 @@ Rectangle {
spacing: 0
model: activitiesModel
delegate: activitiesContact
}
}
ListModel{id: activitiesModel}
ListModel{id: activitiesModel}
Component { id:activitiesContact
Rectangle{
border.color: "#EEEEEE"
border.width: 1
radius:0.5*mm
width:parent.width
height:6*mm
Image {
id: contactImage
x:1
y:1
width: 5*mm
height:5*mm
source:(contact.profile_image!="")? "file://"+contact.profile_image : contact.profile_image_url
onStatusChanged: if (contactImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"}
}
Text{
font.pointSize: osSettings.bigFontSize
anchors.left: contactImage.right
anchors.margins: 1*mm
text:contact.name
}
Component {
id:activitiesContact
Rectangle{
border.color: Material.frameColor
color: Material.backgroundColor
border.width: 1
radius:0.5*mm
width:parent.width
height:6*mm
Image {
id: contactImage
x:1
y:1
width: 5*mm
height:5*mm
source:(contact.profile_image!="")? "file://"+contact.profile_image : contact.profile_image_url
onStatusChanged: if (contactImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"}
}
Text{
color: Material.primaryTextColor
font.pointSize: osSettings.bigFontSize
anchors.left: contactImage.right
anchors.margins: 1*mm
text:contact.name
}
MouseArea{
anchors.fill: parent
onClicked:{showContact(contact)}
}
}}
}
}
MButton {
id: closeButton
anchors.top: parent.top
anchors.topMargin: 1*mm
anchors.right: parent.right
anchors.rightMargin: 1*mm
color:"white"
text: "\uf057"// qsTr("Close")
onClicked: {
activitiesRectangle.destroy()
}
id: closeButton
anchors.top: parent.top
anchors.topMargin: 1*mm
anchors.right: parent.right
anchors.rightMargin: 1*mm
//color:"white"
text: "\uf057"
onClicked: {
activitiesRectangle.destroy()
}
}
Component.onCompleted: {

View file

@ -30,17 +30,19 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
import QtQuick 2.0
import QtQuick.Controls.Material 2.12
Rectangle {
id:hasgtagRectangle
color: "light grey"
id:hashtagRectangle
color:Material.dialogColor
property alias text: hashtagText.text
radius:0.3*mm
width:hashtagText.contentWidth+mm
height:2.5* mm
height:root.fontFactor*osSettings.bigFontSize
Text{
id:hashtagText
font.pixelSize: 1.5*mm
font.pointSize: osSettings.systemFontSize
color: Material.secondaryTextColor
anchors.centerIn: parent
anchors.margins: 0.5*mm
}

View file

@ -33,6 +33,7 @@
// message with buttons
import QtQuick 2.4
import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
//import QtQuick.Dialogs 1.2
import "qrc:/js/helper.js" as Helperjs
import "qrc:/js/smiley.js" as Smileyjs
@ -41,7 +42,7 @@ import "qrc:/qml/genericqml"
Rectangle{
color:"#EEEEEE"
color:Material.dialogColor//"#EEEEEE"
width:parent.width
height: conversation || (newsSwipeview.stacktype!="Notifications")?messageColumn.height+mm:0
id:messageSend
@ -221,7 +222,7 @@ Rectangle{
}
Rectangle{
color: "white"
color: Material.backgroundColor//"white"
radius: 0.5*mm
x:mm
width: parent.width-2*mm
@ -242,6 +243,8 @@ Rectangle{
onLinkActivated:{Qt.openUrlExternally(link)}
onActiveFocusChanged:{//print(placeholder)
if (activeFocus==true){
print("contenty "+messageSend.ListView.view.contentY)
if (messageSend.ListView.view.contentY==null){messageSend.parent.ListView.view.y=0}else{messageSend.ListView.view.contentY=messageSend.ListView.view.contentY+8*mm};
if (conversation==true){
if(parentId==""){setParent(conversationModel.get(0).newsitemobject);}
messageSend.state="conversation";

View file

@ -30,11 +30,12 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
import QtQuick 2.0
import QtQuick.Controls.Material 2.12
Rectangle{
id: moreComments
width: parent.width
height: 5*mm
color:"white"
color:Material.background//"white"
property int comments:0
// border.color:"grey"
// border.width:1

View file

@ -54,6 +54,8 @@ AnimatedImage {id:gif;
}
MouseArea {anchors.fill:parent;
onClicked:{
rootstackView.push("qrc:/qml/newsqml/NewsPhotolist.qml",{"photolistarray": model.newsitemobject.imageAttachmentList})}
rootstackView.push("qrc:/qml/newsqml/NewsPhotolist.qml",{"photolistarray": model.newsitemobject.imageAttachmentList})
roottoolbar.visible=false
}
}
}

View file

@ -30,8 +30,9 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
import QtQuick 2.9
import QtQuick 2.15
import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
import "qrc:/qml/genericqml"
Page{
@ -64,8 +65,12 @@ Page{
anchors.topMargin: 1*mm
anchors.right: parent.right
anchors.rightMargin: 1*mm
color: Material.dialogColor
text: "\uf057"
onClicked: {if (rootstackView.depth>1){ rootstackView.pop()}
onClicked: {
if (rootstackView.depth>1){
roottoolbar.visible=true;
rootstackView.pop()}
}
}
Component {
@ -85,16 +90,17 @@ Page{
running: realImage.status==Image.Loading
anchors.centerIn: parent
}
PinchArea {
id:imagePinch
pinch.target: realImage
anchors.fill: realImage
pinch.minimumScale: 0.1
pinch.maximumScale: 10
enabled: true
}
}
// PinchArea {
// id:imagePinch
// pinch.target: realImage
// anchors.fill: realImage
// pinch.minimumScale: 0.1
// pinch.maximumScale: 10
// enabled: false
// }
}
@ -131,4 +137,5 @@ Page{
})
}
}
//onDestroyed: root.roottoolbar.visible=true
}

View file

@ -31,6 +31,7 @@
import QtQuick 2.11
import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
import "qrc:/js/news.js" as Newsjs
import "qrc:/js/helper.js" as Helperjs
import "qrc:/js/service.js" as Service
@ -40,6 +41,7 @@ Rectangle{
//anchors.fill: parent
width: parent.width
height: parent.height
color: Material.backgroundColor
property string updateMethodNews: "refresh"
property var allchats: ({})
property int lastnewsid:0
@ -101,9 +103,9 @@ Rectangle{
newsView.anchors.topMargin=7*mm;
newstab.newstabstatus="Search";
newsBusy.running=false;
var leftoffset=osSettings.osType=="Android"?3*osSettings.bigFontSize:0
var leftoffset=(osSettings.osType=="Android")?2*root.fontFactor*osSettings.bigFontSize:0
var component = Qt.createComponent("qrc:/qml/genericqml/Search.qml");
var searchItem = component.createObject(newsStack,{y:mm,x:leftoffset,width:root.width-leftoffset,height: 5*mm});
var searchItem = component.createObject(newsStack,{y:mm,x:leftoffset,width:root.width-(leftoffset+mm),height: 1.5*root.fontFactor*osSettings.systemFontSize});
break;
case "refresh":
if (newstab.newstabstatus=="Timeline" || newstabstatus=="Timeline"){
@ -173,8 +175,9 @@ Rectangle{
function getOldNews(){
var currentTime= new Date();
var oldnewsitemobject=newsModel.get(newsModel.count-1).newsitemobject;
try{ if(oldnewsitemobject.hasOwnProperty("lastcomment")){
try{var oldnewsitemobject=newsModel.get(newsModel.count-1).newsitemobject;
if(oldnewsitemobject.hasOwnProperty("lastcomment")){
var lastnews_id=oldnewsitemobject.lastcomment.created_at;
}else{
var lastnews_id=oldnewsitemobject.created_at;
@ -257,10 +260,12 @@ Rectangle{
Component { id:footerComponent
Rectangle{
border.color: "#EEEEEE"
color: Material.dialogColor
border.width: 1
width:newsView.width
height:6*mm
Text{
color: Material.primaryTextColor
font.pointSize: osSettings.systemFontSize
anchors.centerIn: parent
text:qsTr("More")

View file

@ -32,7 +32,7 @@
import QtMultimedia 5.8
import QtQuick 2.9
import QtQuick.Controls 2.12
import "qrc:/qml/genericqml"
Page{
id:newsvideofullscreen
@ -61,12 +61,12 @@ Page{
autoLoad: true
autoPlay: true
audioRole: MediaPlayer.VideoRole
MouseArea {
anchors.fill:parent;
onClicked:{
rootstackView.pop()
}
}
// MouseArea {
// anchors.fill:parent;
// onClicked:{
// rootstackView.pop()
// }
// }
}
ProgressBar{
@ -96,6 +96,20 @@ Page{
visible:video.playbackState!=MediaPlayer.StoppedState
value: video.bufferProgress
}
MButton {
id: closeButton
z:2
anchors.top: parent.top
anchors.topMargin: 1*mm
anchors.right: parent.right
anchors.rightMargin: 1*mm
text: "\uf057"
onClicked: {if (rootstackView.depth>1){ rootstackView.pop()}
}
}
// Slider{ id: videoSlider
// width: parent.width
// height: 3*mm

View file

@ -31,6 +31,7 @@
import QtQuick 2.0
import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
import "qrc:/js/news.js" as Newsjs
import "qrc:/js/helper.js" as Helperjs
import "qrc:/qml/genericqml"
@ -63,12 +64,14 @@ Item {
showConversation(index,newsitemobject)
}
Rectangle{width:newsitem.width; height: 1; anchors.bottom: newsitem.bottom; color:"light grey"}
Rectangle{width:newsitem.width; height: 1; anchors.bottom: newsitem.bottom;
color: Material.backgroundDimColor//"light grey"
}
Rectangle{
width:newsitem.width
height:newsitem.height-1
color: "white"
color: Material.background//"white"
Column {
id:toprow //newscolumn
@ -112,20 +115,20 @@ Item {
Label {
id:messageTypeLabel
color: "grey"
color: Material.secondaryTextColor//"grey"
text: if (newsitemobject.messagetype==1){ qsTr("Direct Message")} else if(newsitemobject.messagetype==2) {" Notification"} else {qsTr("Source: ")+newsitemobject.source}
font.pointSize: 0.6*osSettings.systemFontSize
}
Label {
id:createdAtLabel
color: "grey"
color: Material.secondaryTextColor//"grey"
font.pointSize: 0.6*osSettings.systemFontSize
horizontalAlignment: Label.AlignRight
text: " \u00B7 "+getDateDiffString(newsitemobject.dateDiff) + " " +qsTr("ago")
}
Label {
id:replytoLabel
color: "grey"
color: Material.secondaryTextColor//"grey"
font.pointSize: 0.6*osSettings.systemFontSize
font.family: "Noto Sans"
horizontalAlignment: Label.AlignRight
@ -138,10 +141,11 @@ Item {
MouseArea{id: itemBody
width: toprow.width-2
height: itemMessage.height
onPressAndHold: {pushConversation()}
//onPressAndHold: {pushConversation()}
onClicked: {pushConversation()}
Text {
color: "#404040"
linkColor: "light green"
color: Material.primaryTextColor//"#404040"
linkColor: Material.accentColor//"light green"
id: itemMessage
textFormat: Text.RichText
font.family: "Noto Sans"
@ -194,9 +198,9 @@ Item {
anchors.bottom: toprow.bottom//itemMessage.bottom
visible: toprow.implicitHeight>3/4*root.height || newsitemobject.nsfw//messageColumn.implicitHeight>3/4*root.height || newsitemobject.nsfw//itemMessage.implicitHeight>3/4*root.height
text:"\uf078"
fontColor:"grey"
fontColor: Material.secondaryTextColor//"grey"
border.color: "transparent"
color:"white"
color: Material.backgroundColor//"white"
// gradient: Gradient {
// GradientStop { position: 0.0; color: "transparent" }
// GradientStop { position: 0.5; color: "white" }
@ -220,7 +224,7 @@ Item {
width:parent.width
spacing:mm
Label{color: "grey"
Label{color: Material.secondaryTextColor//"grey"
height:3.5*mm
font.pointSize: 0.75*osSettings.systemFontSize
text: friendica_activities_view.likeText
@ -229,7 +233,7 @@ Item {
onClicked: { showActivityContacts(newsitemobject.friendica_activities.like)}
}
}
Label{color: "grey"
Label{color: Material.secondaryTextColor//"grey"
height:3.5*mm
font.pointSize: 0.75*osSettings.systemFontSize
text: friendica_activities_view.dislikeText
@ -238,7 +242,7 @@ Item {
onClicked: { showActivityContacts(newsitemobject.friendica_activities.dislike)}
}
}
Label{color: "grey"
Label{color: Material.secondaryTextColor//"grey"
height:3.5*mm
font.pointSize: 0.75*osSettings.systemFontSize
text: friendica_activities_view.attendyesText
@ -246,7 +250,7 @@ Item {
anchors.fill: parent
onClicked: { showActivityContacts(newsitemobject.friendica_activities.attendyes)}
}}
Label{color: "grey"
Label{color: Material.secondaryTextColor//"grey"
height:3.5*mm
font.pointSize: 0.75*osSettings.systemFontSize
text: friendica_activities_view.attendnoText
@ -255,7 +259,7 @@ Item {
onClicked: { showActivityContacts(newsitemobject.friendica_activities.attendno)}
}
}
Label{color: "grey"
Label{color: Material.secondaryTextColor//"grey"
height:3.5*mm
font.pointSize: 0.75*osSettings.systemFontSize
text: friendica_activities_view.attendmaybeText
@ -266,7 +270,7 @@ Item {
}
Label{
id:attendLabel
color: "grey"
color: Material.secondaryTextColor//"grey"
height:3.5*mm
font.pointSize: 0.75*osSettings.systemFontSize
horizontalAlignment: Label.AlignRight
@ -287,11 +291,12 @@ Item {
indicator: Rectangle{
implicitWidth: newsitem.width/5 //10*mm
implicitHeight:root.fontFactor*osSettings.bigFontSize
color:"transparent"
Text{
anchors.centerIn: parent
font.pointSize: osSettings.systemFontSize
font.family:fontAwesome.name
color:likeCheckbox.checked?"black": "grey"
color:likeCheckbox.checked?Material.primaryTextColor: Material.secondaryTextColor
text:likeCheckbox.checked?"\uf118"+"!":"\uf118"
}
}
@ -314,11 +319,12 @@ Item {
indicator: Rectangle{
implicitWidth: newsitem.width/5 //10*mm
implicitHeight:root.fontFactor*osSettings.bigFontSize
color:"transparent"
Text{
anchors.centerIn: parent
font.pointSize: osSettings.systemFontSize
font.family:fontAwesome.name
color:dislikeCheckbox.checked?"black": "grey"
color:dislikeCheckbox.checked?Material.primaryTextColor: Material.secondaryTextColor
text: dislikeCheckbox.checked?"\uf119"+"!":"\uf119"
}
}
@ -341,11 +347,12 @@ Item {
indicator:Rectangle{
implicitWidth: newsitem.width/5 //10*mm
implicitHeight:root.fontFactor*osSettings.bigFontSize
color:"transparent"
Text{
anchors.centerIn: parent
font.pointSize: osSettings.systemFontSize
font.family:fontAwesome.name
color: favoritedCheckbox.checked?"black":"grey"
color: favoritedCheckbox.checked?Material.primaryTextColor: Material.secondaryTextColor
text:"\uf005"
}
}
@ -364,7 +371,7 @@ Item {
color:"transparent"
Text{
id:newsmenusymbol
color: "grey"
color: Material.secondaryTextColor//"grey"
anchors.centerIn: parent
font.pointSize: osSettings.systemFontSize
font.family:fontAwesome.name
@ -378,10 +385,11 @@ Item {
Menu {
id:newsmenu
width: 18*osSettings.FontSize
width: 10*root.fontFactor*osSettings.systemFontSize
delegate: MenuItem{
contentItem: Text{
font.pointSize: osSettings.systemFontSize
color: Material.secondaryTextColor
text: parent.text
}
}
@ -392,8 +400,15 @@ Item {
if (newsitemobject.messagetype==1){ directmessage=1}
var replycomp=Qt.createComponent("qrc:/qml/newsqml/MessageSend.qml");
var conversation;
if (newsitem.ListView.view.viewtype=="conversation"){conversation=true}
else{conversation=false};
if (newsitem.ListView.view==null){conversation=true}
else if (newsitem.ListView.view.viewtype=="conversation"){
conversation=true
newsitem.ListView.view.currentIndex=itemindex
}
else{
conversation=false;
newsitem.ListView.view.currentIndex=itemindex
};
var reply=replycomp.createObject(friendicaActivities,{parentId:newsitemobject.id,reply_to_user:newsitemobject.user.screen_name, state:"reply",conversation:conversation,textfocus:true})
}
}
@ -420,10 +435,11 @@ Item {
Menu{
title: qsTr("Attending")
width: 10*osSettings.systemFontSize
width: 10*root.fontFactor*osSettings.systemFontSize
delegate: MenuItem{
contentItem: Text{
font.pointSize: osSettings.systemFontSize
color: Material.secondaryTextColor
text: parent.text
}
}

View file

@ -32,6 +32,7 @@
import QtQuick 2.11
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.11
import QtQuick.Controls.Material 2.12
import "qrc:/js/smiley.js" as Smileyjs
import "qrc:/js/helper.js" as Helperjs
import "qrc:/qml/genericqml"
@ -41,6 +42,7 @@ Rectangle{
x: mm
width: messageColumn.width-5*mm
height:root.height/2
color: Material.backgroundColor
MButton{
id:closeButton
@ -87,6 +89,7 @@ Rectangle{
height: smileyDialog.height-4*root.fontFactor*osSettings.bigFontSize
Rectangle{
id: htmlGridTab
color: Material.backgroundColor
GridView {
id:htmlView
anchors.fill: parent
@ -109,6 +112,7 @@ Rectangle{
Rectangle{
id: coreGridTab
color: Material.backgroundColor
GridView {
id: coreSmileyView
anchors.fill: parent
@ -133,6 +137,7 @@ Rectangle{
Rectangle{
id: addonGridTab
color: Material.backgroundColor
GridView {
id: addonView
anchors.fill: parent
@ -156,6 +161,7 @@ Rectangle{
Rectangle{
id: adultGridTab
color: Material.backgroundColor
GridView {
id: adultView
anchors.fill: parent
@ -197,7 +203,7 @@ Rectangle{
Component{
id:htmlItem
Text{id:smileText
Label{id:smileText
width:4.5*mm
height: 4.5*mm
textFormat:Text.RichText