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

@ -33,6 +33,7 @@ import QtQuick 2.5
import QtQuick.LocalStorage 2.0
import QtQuick.Window 2.0
import QtQuick.Controls 2.4
import QtQuick.Controls.Material 2.12
import QtQuick.Layouts 1.11
import "qrc:/js/news.js" as Newsjs
import "qrc:/js/service.js" as Service
@ -70,6 +71,8 @@ ApplicationWindow{
//property string contactLoadType: ""
property bool imagePicking: false
Material.theme: Material.System
function onLoginChanged(login){
if(login==""){rootstackView.push("qrc:/qml/configqml/AccountPage.qml")}
else{//rootstackView.push(rootstack)
@ -138,13 +141,13 @@ ApplicationWindow{
onClosing: {
if (rootstack.currentIndex==0){
newstab.active=true;
if (newstab.newstabstatus!=globaloptions.newsViewType){
if ((newstab.newstabstatus!="") && (newstab.newstabstatus!=globaloptions.newsViewType)&&(globaloptions.newsViewType!=null)){
newstab.newstabstatus=globaloptions.newsViewType;
if(globaloptions.newsViewType=="Timeline"){Newsjs.newsfromdb(db,login.username,0,function(dbnews){
newsSignal(dbnews)
})}
else{
Newsjs.chatsfromdb(db,login.username,function(dbnews){
Newsjs.chatsfromdb(db,login.username,0,function(dbnews){
newsSignal(dbnews)
})}
close.accepted=false;
@ -154,8 +157,9 @@ ApplicationWindow{
newstab.conversation=[];
close.accepted=false
}
else if (root.depth>1){
root.pop();
else if (rootstackView.depth>1){
rootstackView.pop();
roottoolbar.visible=true;
close.accepted=false
}
else{
@ -168,17 +172,17 @@ ApplicationWindow{
close.accepted=true
}
}
else if (rootstack.currentIndex==2){fotoSignal(login.username,"backButton");print("close rootstack currentindex==2");close.accepted=false}
else {rootstack.currentIndex=0;close.accepted=false}
else if (rootstack.currentIndex==2){fotoSignal(login.username,"backButton");bar.currentIndex=0;close.accepted=false}
else {rootstack.currentIndex=0;bar.currentIndex=0;close.accepted=false}
}
footer:ToolBar{
footer:ToolBar{id:roottoolbar
background: Rectangle{
anchors.fill: parent
color: "#EEEEEE"//"#F8F8F8"
color: Material.backgroundDimColor//"#EEEEEE"//"#F8F8F8"
}
TabBar {
@ -190,7 +194,7 @@ ApplicationWindow{
font.pointSize: osSettings.bigFontSize
background:Rectangle{
anchors.fill: parent
color: "#EEEEEE"
color: Material.backgroundDimColor
}
}
TabButton {
@ -198,7 +202,7 @@ ApplicationWindow{
font.pointSize: osSettings.bigFontSize
background:Rectangle{
anchors.fill: parent
color: "#EEEEEE"
color: Material.backgroundDimColor
}
}
TabButton {
@ -206,7 +210,7 @@ ApplicationWindow{
font.pointSize: osSettings.bigFontSize
background:Rectangle{
anchors.fill: parent
color: "#EEEEEE"
color: Material.backgroundDimColor
}
}
TabButton {
@ -214,7 +218,7 @@ ApplicationWindow{
font.pointSize: osSettings.bigFontSize
background:Rectangle{
anchors.fill: parent
color: "#EEEEEE"
color: Material.backgroundDimColor
}
}
}
@ -267,6 +271,9 @@ ApplicationWindow{
Component.onCompleted: {
onLoginChanged(login);
globaloptions=Service.readGO(db);
if(globaloptions.view_darkmode==1){Material.theme=Material.Dark}
else if (globaloptions.view_darkmode==2){Material.theme=Material.Light}
else {Material.theme=Material.System}
//forceActiveFocus();
if(osSettings.osType=="Android"){
var component = Qt.createComponent("qrc:/qml/genericqml/IntentReceiver.qml");