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.7
import QtQuick.Dialogs 1.2
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.12
import QtQml.Models 2.15
import "qrc:/js/service.js" as Service
import "qrc:/js/layout.js" as Layoutjs
import "qrc:/js/helper.js" as Helperjs
@ -40,53 +41,53 @@ import "qrc:/qml/configqml"
import "qrc:/qml/genericqml"
Page{
id:accountPage
width: root.width
height: root.height
property var users:[]
property var userdata: ({})
property string imagestoredir: ""
id:accountPage
width: root.width
height: root.height
property var users:[]
property var userdata: ({})
property string imagestoredir: ""
function setServericon(server){
try {Helperjs.friendicaWebRequest(server+"/api/statusnet/config",accountPage, function (obj){
function setServericon(server){
if ((server!=null) && (server!="")){
try {Helperjs.friendicaWebRequest(server+"/api/statusnet/config",accountPage, function (obj){
var serverdata = JSON.parse(obj);
servericon.visible=true;
servericon.source=serverdata.site.logo})} catch(e){print(e)}
servericon.source=serverdata.site.logo})
} catch(e){print(e)}
}
}
MButton{
id:userButton
text:qsTr("User")
font.pointSize: osSettings.bigFontSize
x: root.fontFactor*osSettings.bigFontSize
y: root.fontFactor*osSettings.bigFontSize
width: root.width/2 - 2*mm
height: 2*root.fontFactor*osSettings.bigFontSize
visible: users.length>0
onClicked:{
var useritems="";
for (var i=0;i<accountPage.users.length;i++){
useritems=useritems+"MenuItem{font.pointSize: osSettings.bigFontSize;width:accountPage.width*2/3; text:'"+accountPage.users[i].username+
"'; onTriggered: {Service.readConfig(db,function(obj){
userButton.text=obj.username;
servername.text=obj.server;
accountPage.setServericon(obj.server);
username.text= obj.username;
password.text=Qt.atob(obj.password);
imagestore.text=obj.imagestore;
imagestoredir=obj.imagestore;
if( obj.isActive==0){userButton.font.bold='true'} else {userButton.font.bold='false'}
},'username','"+ accountPage.users[i].username+"')}}"
}
var menuString="import QtQuick.Controls 2.12;import 'qrc:/js/service.js' as Service;"+
" Menu {width:8*root.fontFactor*osSettings.bigFontSize;"+useritems+"}";
var userlistObject=Qt.createQmlObject(menuString,accountPage,"usermenuOutput")
userlistObject.popup() }
MButton{
id:userButton
text:qsTr("User")
font.pointSize: osSettings.bigFontSize
x: root.fontFactor*osSettings.bigFontSize
y: root.fontFactor*osSettings.bigFontSize
width: root.width/2 - 2*mm
height: 2*root.fontFactor*osSettings.bigFontSize
visible: users.length>0
onClicked:{
var useritems="";
for (var i=0;i<accountPage.users.length;i++){
useritems=useritems+"MenuItem{font.pointSize: osSettings.bigFontSize;width:accountPage.width*2/3; text:'"+accountPage.users[i].username+
"'; onTriggered: {Service.readConfig(db,function(obj){
userButton.text=obj.username;
serverModel.insert(0,{text:obj.server})
accountPage.setServericon(obj.server);
username.text= obj.username;
password.text=Qt.atob(obj.password);
imagestore.text=obj.imagestore;
imagestoredir=obj.imagestore;
if( obj.isActive==0){userButton.font.bold='true'} else {userButton.font.bold='false'}
},'username','"+ accountPage.users[i].username+"')}}"
}
var menuString="import QtQuick.Controls 2.12;import 'qrc:/js/service.js' as Service;"+
" Menu {width:8*root.fontFactor*osSettings.bigFontSize;"+useritems+"}";
var userlistObject=Qt.createQmlObject(menuString,accountPage,"usermenuOutput")
userlistObject.popup() }
}
Image{
id:servericon
@ -115,18 +116,87 @@ Page{
onClicked:{Qt.openUrlExternally(Qt.resolvedUrl("https://dir.friendica.social/servers"))}
}
// ComboBox{
// id: servername
// x: 4*root.fontFactor*osSettings.bigFontSize
// y: 3.5*root.fontFactor*osSettings.bigFontSize
// width: root.width-5*root.fontFactor*osSettings.bigFontSize
// height: 2.5*root.fontFactor*osSettings.bigFontSize//5*mm;
// font.pointSize: osSettings.systemFontSize
// editable:true
// model: serverModel
// onAccepted: {
// let cleanText =currentText;if(currentText==""){cleanText=editText}
// if((cleanText).substring(0,8) !=="https://"){
// cleanText="https://"+cleanText
// }
// if (find(cleanText) === -1) {
// serverModel.append({text: cleanText})
// currentIndex = find(cleanText)
// displayText=cleanText
// }
// if (cleanText!=""){accountPage.setServericon(cleanText)}
// }
// onFocusChanged: {
// if(focus==false){
// onAccepted()
// }
// }
// }
TextField {
id: servername
x: 4*root.fontFactor*osSettings.bigFontSize; y: 4*root.fontFactor*osSettings.bigFontSize; width: root.width-18*mm; //height: 5*mm;
placeholderText: qsTr("Server")
x: 4*root.fontFactor*osSettings.bigFontSize
y: 3.5*root.fontFactor*osSettings.bigFontSize
width: root.width-5*root.fontFactor*osSettings.bigFontSize
height: 2.5*root.fontFactor*osSettings.bigFontSize//5*mm;
font.pointSize: osSettings.systemFontSize
onEditingFinished: {
if ((servername.text)==""){}
else if((servername.text).substring(0,7) !=="https://"){
servername.text= "https://"+text//(serverstring.text).substring(8)
}
accountPage.setServericon(servername.text)}
text:"https://"
onFocusChanged:{
if (focus){servermenu.open()}
else{
if((servername.text).substring(0,11) =="https://http"){
servername.text= (servername.text).substring(8)
}
if (servername.text!="https://"){
accountPage.setServericon(servername.text)}
}
}
}
Menu {
id:servermenu
width: 13*root.fontFactor*osSettings.bigFontSize
x: 4*root.fontFactor*osSettings.bigFontSize
y: 5*root.fontFactor*osSettings.bigFontSize
Instantiator{
model:serverModel
MenuItem{
text: modelData
onTriggered: {servername.text=modelData}
}
onObjectAdded: servermenu.insertItem(index,object)
onObjectRemoved: servermenu.removeItem(object)
}
}
ListModel{id:serverModel
ListElement{text:"https://asaps-sm.lafayettegroup.com"}
ListElement{text:"https://f.freinetz.ch"}
ListElement{text:"https://friendica.chilemasto.casa"}
ListElement{text:"https://friendica.utzer.de"}
ListElement{text:"https://friendica.vrije-mens.org"}
ListElement{text:"https://friendicarg.nsupdate.info.de"}
ListElement{text:"https://friends.nogafam.es"}
ListElement{text:"https://libranet.de"}
ListElement{text:"https://loma.ml"}
ListElement{text:"https://social.trom.tf"}
ListElement{text:"https://motley.club"}
ListElement{text:"https://nerdica.net"}
ListElement{text:"https://noovi.org"}
ListElement{text:"https://nsfw.wnymathguy.com"}
ListElement{text:"https://opensocial.at"}
ListElement{text:"https://social.isurf.ca"}
ListElement{text:"https://squeet.me"}
ListElement{text:"https://venera.social"}
}
TextField {
@ -155,7 +225,7 @@ Page{
inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhNoPredictiveText | Qt.ImhSensitiveData
}
Text {
Label {
id: imagedirlabel
visible: imagestore.text!=""
text: qsTr("Image dir.")
@ -210,8 +280,8 @@ Page{
text: qsTr("Confirm")
font.pointSize: osSettings.bigFontSize
onClicked:{
accountBusy.running=true;
var userconfig={server: servername.text, username: username.text, password:Qt.btoa(password.text), imagestore:imagestoredir, maxnews:"",interval: ""};
accountBusy.running=true;//servername.displayText
var userconfig={server: servername.displayText, username: username.text, password:Qt.btoa(password.text), imagestore:imagestoredir, maxnews:"",interval: ""};
var errormessage="";
if (servername.text==""){errormessage=qsTr("No server given! ")}
else if (username.text==""){errormessage+=qsTr("No nickname given! ")}
@ -274,23 +344,23 @@ Page{
onClicked:{
var userconfig={server: servername.text, username: username.text, password: Qt.btoa(password.text)};
Service.deleteConfig(db,userconfig,function(){
filesystem.Directory=imagestore.text+"contacts";
filesystem.rmDir();
filesystem.Directory=imagestore.text+"albums";
filesystem.rmDir();
servername.text="https://";
servericon.visible=false;
servericon.source="";
username.text="";
password.text="";
imagestore.text="";
filesystem.Directory=imagestore.text+"contacts";
filesystem.rmDir();
filesystem.Directory=imagestore.text+"albums";
filesystem.rmDir();
servername.text="https://";
servericon.visible=false;
servericon.source="";
username.text="";
password.text="";
imagestore.text="";
//maxNews.value=0;
//newsTypeField.text="Conversations";
//messageIntervalSlider.value=30;
userButton.text=qsTr("User");
Helperjs.readData(db,"config","",function(storedUsers){
storedUsers.sort(function(obj1, obj2) {
return obj1.isActive - obj2.isActive;
userButton.text=qsTr("User");
Helperjs.readData(db,"config","",function(storedUsers){
storedUsers.sort(function(obj1, obj2) {
return obj1.isActive - obj2.isActive;
})
accountPage.users=storedUsers;})
})
@ -339,6 +409,7 @@ Page{
Service.readConfig(db,function(obj){
userButton.text=obj.username;
servername.text=obj.server;
serverModel.insert(0,{text:obj.server})
accountPage.setServericon(obj.server);
username.text= obj.username;
password.text=Qt.atob(obj.password);

View file

@ -0,0 +1,220 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
// Copyright (C) 2020 Marco R. <thomasschmidt45@gmx.net>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// In addition, as a special exception, the copyright holders give
// permission to link the code of portions of this program with the
// OpenSSL library under certain conditions as described in each
// individual source file, and distribute linked combinations including
// the two.
//
// You must obey the GNU General Public License in all respects for all
// of the code used other than OpenSSL. If you modify file(s) with this
// exception, you may extend this exception to your version of the
// file(s), but you are not obligated to do so. If you do not wish to do
// so, delete this exception statement from your version. If you delete
// this exception statement from all source files in the program, then
// also delete it here.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
import QtQuick 2.11
import QtQuick.Dialogs 1.2
import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
import "qrc:/js/service.js" as Service
import "qrc:/qml/configqml"
import "qrc:/qml/genericqml"
Page{
//anchors.fill: parent
width:root.width
height:root.height
Label {
text: qsTr("News as")
font.pointSize:osSettings.systemFontSize
x: root.fontFactor*osSettings.bigFontSize; y: 2*root.fontFactor*osSettings.bigFontSize
}
Rectangle{
x: root.fontFactor*osSettings.bigFontSize; y: 4*root.fontFactor*osSettings.bigFontSize;
width: newsTypeField.contentWidth+2*mm; height: 2*root.fontFactor*osSettings.bigFontSize
color: Material.dialogColor//"#F3F3F3"
radius: 0.5*mm
Label{
id: newsTypeField
anchors.fill: parent
font.pointSize:osSettings.bigFontSize
text:qsTr("Conversations")
}
MouseArea{
anchors.fill:parent
onClicked:newstypemenu.popup()
}
}
Menu {
id:newstypemenu
width:12*root.fontFactor*osSettings.bigFontSize
MenuItem {
font.pointSize: osSettings.bigFontSize
text: qsTr("Timeline")
onTriggered: {newsTypeField.text=qsTr("Timeline");
Service.updateglobaloptions(root.db,"newsViewType","Timeline");}
}
MenuItem {
font.pointSize: osSettings.bigFontSize
text: qsTr("Conversations")
onTriggered: {newsTypeField.text=qsTr("Conversations");
Service.updateglobaloptions(root.db,"newsViewType","Conversations");}
}
}
Label {
text: qsTr("Max. News")
font.pointSize: osSettings.systemFontSize
x: root.fontFactor*osSettings.bigFontSize; y:8*root.fontFactor*osSettings.bigFontSize
}
Slider{ id: maxNews
x:6*root.fontFactor*osSettings.bigFontSize; y: 10*root.fontFactor*osSettings.bigFontSize;
width: root.width/2;height:2*root.fontFactor*osSettings.bigFontSize
from: 0;to:2000; stepSize: 100
value: root.globaloptions.hasOwnProperty("max_news")?root.globaloptions.max_news:1000
}
Rectangle{
color: Material.dialogColor
x: root.fontFactor*osSettings.bigFontSize; y: 10*root.fontFactor*osSettings.bigFontSize;
width: 4*root.fontFactor*osSettings.bigFontSize; height: 2*root.fontFactor*osSettings.bigFontSize;
radius: 0.5*mm
TextEdit{id:maxNewsText;
anchors.fill: parent
font.pointSize: osSettings.bigFontSize
verticalAlignment:TextEdit.AlignRight
color: Material.primaryTextColor
text:maxNews.value
selectByMouse: true
onTextChanged: {
Service.updateglobaloptions(root.db,"max_news",text);
}
}
}
CheckBox{
id: nsfwCheckbox
x: root.fontFactor*osSettings.bigFontSize
y: 14*root.fontFactor*osSettings.bigFontSize
font.pointSize: osSettings.bigFontSize
text: qsTr("Hide #nsfw?")
checked:(globaloptions["hide_nsfw"]==1)?true:false
onClicked: {
toggle();
if(nsfwCheckbox.checked==true){
Service.updateglobaloptions(root.db,"hide_nsfw",0);nsfwCheckbox.checked=false;
}
else{
Service.updateglobaloptions(root.db,"hide_nsfw",1);nsfwCheckbox.checked=true;
}
}
}
// CheckBox{
// id: darkmodeCheckbox
// tristate:true
// x: root.fontFactor*osSettings.bigFontSize
// y: 24*root.fontFactor*osSettings.bigFontSize
// font.pointSize: osSettings.bigFontSize
// text: qsTr("Dark Mode")
// checked:(globaloptions["view_darkmode"]==1)?true:false
// onClicked: {
// toggle();
// if(darkmodeCheckbox.checked==true){
// Service.updateglobaloptions(root.db,"view_darkmode",0);darkmodeCheckbox.checked=false;
// root.Material.theme=Material.Light
// }
// else{
// Service.updateglobaloptions(root.db,"view_darkmode",1);darkmodeCheckbox.checked=true;
// root.Material.theme=Material.Dark
// }
// }
// }
Column{
x: root.fontFactor*osSettings.bigFontSize
y: 18*root.fontFactor*osSettings.bigFontSize
Label{
text: qsTr("Dark Mode")
font.pointSize: osSettings.systemFontSize}
RadioButton{
text: qsTr("System")
checked: (globaloptions["view_darkmode"]==0 || globaloptions["view_darkmode"]==undefined)?true:false
font.pointSize: osSettings.bigFontSize
onClicked: {
if(checked==true){
Service.updateglobaloptions(root.db,"view_darkmode",0);
root.Material.theme=Material.System
}
}
}
RadioButton{
text: qsTr("Dark")
checked: (globaloptions["view_darkmode"]==1)?true:false
font.pointSize: osSettings.bigFontSize
onClicked: {
if(checked==true){
Service.updateglobaloptions(root.db,"view_darkmode",1);
root.Material.theme=Material.Dark
}
}
}
RadioButton{
text: qsTr("Light")
checked: (globaloptions["view_darkmode"]==2)?true:false
font.pointSize: osSettings.bigFontSize
onClicked: {
if(checked==true){
Service.updateglobaloptions(root.db,"view_darkmode",2);
root.Material.theme=Material.Light
}
}
}
}
MButton {
anchors.right: parent.right; //anchors.rightMargin: mm;
anchors.top: parent.top
anchors.topMargin: 2*root.fontFactor*osSettings.bigFontSize
width: 2*root.fontFactor*osSettings.bigFontSize;
text: "?"
font.pointSize: osSettings.bigFontSize
onClicked:{
rootstackView.push("qrc:/qml/configqml/InfoBox.qml");
}
}
// MButton{
// id:closeButton
// // height: 2*root.fontFactor*osSettings.bigFontSize
// width: 2*root.fontFactor*osSettings.bigFontSize;
// anchors.top: parent.top
// anchors.topMargin:root.fontFactor*osSettings.bigFontSize
// anchors.right: parent.right
// anchors.rightMargin: 1*mm
// text: "\uf057"
// font.pointSize: osSettings.bigFontSize
// onClicked:{rootstackView.pop()}
// }
}

View file

@ -31,8 +31,9 @@
import QtQuick 2.11
import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.11
import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
import "qrc:/js/service.js" as Service
import "qrc:/qml/configqml"
import "qrc:/qml/genericqml"
@ -42,122 +43,77 @@ Page{
width:root.width
height:root.height
Rectangle{
x: root.fontFactor*osSettings.bigFontSize; y:4*root.fontFactor*osSettings.bigFontSize;
width: parent.width - 6*root.fontFactor*osSettings.bigFontSize; height: 2*root.fontFactor*osSettings.bigFontSize
color:"#F3F3F3"
radius: 0.5*mm
Text{
anchors.fill: parent
font.pointSize: osSettings.bigFontSize
text:qsTr("Sync")
TabBar {
id: configbar
width: parent.width-3*root.fontFactor*osSettings.bigFontSize//osSettings.osType=="Android"?parent.width-3*root.fontFactor*osSettings.bigFontSize:parent.width
height: 2*root.fontFactor*osSettings.bigFontSize
x: osSettings.osType=="Android"?2*osSettings.bigFontSize:0
//visible: !wideScreen
position:TabBar.Header
currentIndex: 0
TabButton {
text: qsTr("Appearance")
font.pointSize: osSettings.systemFontSize
height: 2*root.fontFactor*osSettings.bigFontSize
width:6*root.fontFactor*osSettings.bigFontSize
}
MouseArea{
anchors.fill:parent
onClicked:rootstackView.push("qrc:qml/configqml/SyncConfig.qml");
TabButton {
text: qsTr("Sync")
font.pointSize: osSettings.systemFontSize
height: 2*root.fontFactor*osSettings.bigFontSize
width:10*root.fontFactor*osSettings.bigFontSize
}
TabButton {
text: qsTr("Start")
visible:osSettings.osType=="Linux"
font.pointSize: osSettings.systemFontSize
height: 2*root.fontFactor*osSettings.bigFontSize
width:10*root.fontFactor*osSettings.bigFontSize
}
}
Text {
text: qsTr("News as")
font.pointSize:osSettings.systemFontSize
x: root.fontFactor*osSettings.bigFontSize; y: 8*root.fontFactor*osSettings.bigFontSize
LeftDrawerLinux{
id:leftDrawer
visible: wideScreen&&rootstackView.depth<2
width: visible?osSettings.systemFontSize*15:0
height: root.height-bar.height
}
Rectangle{
x: root.fontFactor*osSettings.bigFontSize; y: 10*root.fontFactor*osSettings.bigFontSize;
width: newsTypeField.contentWidth+2*mm; height: 2*root.fontFactor*osSettings.bigFontSize
color:"#F3F3F3"
radius: 0.5*mm
Text{
id: newsTypeField
anchors.fill: parent
font.pointSize:osSettings.bigFontSize
text:qsTr("Conversations")
LeftDrawerAndroid{
id: leftDrawerAndroid
}
StackLayout{
id:configTabView
//anchors.fill: parent
width: wideScreen&&rootstackView.depth<2?parent.width-leftDrawer.width-mm:parent.width-mm//newstabitem.width/3*2:newstabitem.width
x: leftDrawer.width
y: configbar.height
height: parent.height-configbar.height-mm
currentIndex: configbar.currentIndex
// onCurrentIndexChanged:{
// if (currentIndex==1){
// contactsSignal("")
// }
// else if (currentIndex==2){
// contactsSignal("")
// }
// else if (currentIndex==3){groupsSignal(root.login.username)}
// }
Loader{
id: appearanceLoader
source:(configTabView.currentIndex==0)? "qrc:/qml/configqml/ConfigAppearancePage.qml":""
}
MouseArea{
anchors.fill:parent
onClicked:newstypemenu.popup()
Loader{
id: syncLoader
source:(configTabView.currentIndex==1)? "qrc:/qml/configqml/SyncConfig.qml":""
}
}
Menu {
id:newstypemenu
width:8*root.fontFactor*osSettings.bigFontSize
MenuItem {
font.pointSize: osSettings.bigFontSize
text: qsTr("Timeline")
onTriggered: {newsTypeField.text=qsTr("Timeline");
Service.updateglobaloptions(root.db,"newsViewType","Timeline");}
}
MenuItem {
font.pointSize: osSettings.bigFontSize
text: qsTr("Conversations")
onTriggered: {newsTypeField.text=qsTr("Conversations");
Service.updateglobaloptions(root.db,"newsViewType","Conversations");}
}
}
Text {
text: qsTr("Max. News")
font.pointSize: osSettings.systemFontSize
x: root.fontFactor*osSettings.bigFontSize; y:14*root.fontFactor*osSettings.bigFontSize
}
Slider{ id: maxNews
x:6*root.fontFactor*osSettings.bigFontSize; y: 16*root.fontFactor*osSettings.bigFontSize;
width: root.width/2;height:2*root.fontFactor*osSettings.bigFontSize
from: 0;to:2000; stepSize: 100
value: root.globaloptions.hasOwnProperty("max_news")?root.globaloptions.max_news:1000
}
Rectangle{
color: "#F3F3F3";
x: root.fontFactor*osSettings.bigFontSize; y: 16*root.fontFactor*osSettings.bigFontSize;
width: 4*root.fontFactor*osSettings.bigFontSize; height: 2*root.fontFactor*osSettings.bigFontSize;
radius: 0.5*mm
TextEdit{id:maxNewsText;
anchors.fill: parent
font.pointSize: osSettings.bigFontSize
verticalAlignment:TextEdit.AlignRight
text:maxNews.value
selectByMouse: true
onTextChanged: {
Service.updateglobaloptions(root.db,"max_news",text);
}
}
}
CheckBox{
id: nsfwCheckbox
x: root.fontFactor*osSettings.bigFontSize
y: 20*root.fontFactor*osSettings.bigFontSize
font.pointSize: osSettings.bigFontSize
text: qsTr("Hide #nsfw?")
checked:(globaloptions["hide_nsfw"]==1)?true:false
onClicked: {
toggle();
if(nsfwCheckbox.checked==true){
Service.updateglobaloptions(root.db,"hide_nsfw",0);nsfwCheckbox.checked=false;
}
else{
Service.updateglobaloptions(root.db,"hide_nsfw",1);nsfwCheckbox.checked=true;
}
}
}
MButton {
anchors.right: closeButton.left; anchors.rightMargin: mm;
anchors.top: parent.top
anchors.topMargin:root.fontFactor*osSettings.bigFontSize
width: 2*root.fontFactor*osSettings.bigFontSize;
text: "?"
font.pointSize: osSettings.bigFontSize
onClicked:{
rootstackView.push("qrc:/qml/configqml/InfoBox.qml");
Loader{
id: startLoader
source:(configTabView.currentIndex==2)? "qrc:/qml/configqml/ConfigStartPage.qml":""
}
}
MButton{
@ -165,7 +121,7 @@ Page{
// height: 2*root.fontFactor*osSettings.bigFontSize
width: 2*root.fontFactor*osSettings.bigFontSize;
anchors.top: parent.top
anchors.topMargin:root.fontFactor*osSettings.bigFontSize
anchors.topMargin:2*root.fontFactor*osSettings.bigFontSize
anchors.right: parent.right
anchors.rightMargin: 1*mm
text: "\uf057"

View file

@ -0,0 +1,82 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
// Copyright (C) 2020 Marco R. <thomasschmidt45@gmx.net>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// In addition, as a special exception, the copyright holders give
// permission to link the code of portions of this program with the
// OpenSSL library under certain conditions as described in each
// individual source file, and distribute linked combinations including
// the two.
//
// You must obey the GNU General Public License in all respects for all
// of the code used other than OpenSSL. If you modify file(s) with this
// exception, you may extend this exception to your version of the
// file(s), but you are not obligated to do so. If you do not wish to do
// so, delete this exception statement from your version. If you delete
// this exception statement from all source files in the program, then
// also delete it here.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
import QtQuick 2.11
import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
Page{
//anchors.fill: parent
width:root.width
height:root.height-6*root.fontFactor*osSettings.bigFontSize
CheckBox{
id: autostartCheckbox
x: mm
y: root.fontFactor*osSettings.bigFontSize
width: 10*root.fontFactor*osSettings.bigFontSize
checked:filesystem.isAutostart
//style: CheckBoxStyle {
text: qsTr("Autostart")
font.pointSize: osSettings.bigFontSize
onClicked: {
toggle();
if(autostartCheckbox.checked==true){
filesystem.setAutostart(false);
autostartCheckbox.checked=false;
}
else{
filesystem.setAutostart(true);
autostartCheckbox.checked=true;
}
}
}
// CheckBox{
// id: minimizeCheckbox
// x: mm
// y: 3*root.fontFactor*osSettings.bigFontSize
// width: 10*root.fontFactor*osSettings.bigFontSize
// enabled: autostartCheckbox.checked==true
// checked:(globaloptions["notify_"+adapter]==1)?true:false
// text: qsTr("Start Minimized")
// font.pointSize: osSettings.bigFontSize
// onClicked: {
// toggle();
// if(notifyCheckbox.checked==true){
// Service.updateglobaloptions(root.db,"notify_"+adapter,0);notifyCheckbox.checked=false;
// }
// else{
// Service.updateglobaloptions(root.db,"notify_"+adapter,1);notifyCheckbox.checked=true;
// }
// }
// }
}

View file

@ -31,6 +31,7 @@
import QtQuick 2.0
import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
import "qrc:/qml/genericqml"
Page{
@ -43,8 +44,9 @@ Page{
textFormat: Text.RichText
width: root.width-mm
font.pointSize: osSettings.systemFontSize
color:Material.primaryTextColor
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
text: "<b>Friendiqa v0.6.2 </b><br>Licensed under GPL 3 with the exception of OpenSSL <br> "+
text: "<b>Friendiqa v0.6.3 </b><br>Licensed under GPL 3 with the exception of OpenSSL <br> "+
"Website <a href='https://friendiqa.ma-nic.de'>https://friendiqa.ma-nic.de</a><br>"+
"Sourcecode: <a href='https://git.friendi.ca/LubuWest/Friendiqa'>https://git.friendi.ca/LubuWest/Friendiqa</a><br>"+
"Privacy Policy: <a href='https://git.friendi.ca/lubuwest/Friendiqa/src/branch/master/PrivacyPolicy.md'>http://git.friendi.ca/lubuwest/Friendiqa/src/branch/master/PrivacyPolicy.md</a><br>"+

View file

@ -32,11 +32,12 @@
import QtQuick 2.11
import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
import "qrc:/qml/configqml"
import "qrc:/js/service.js" as Service
Rectangle{
color: "#EEEEEE" //Material.Grey
color: Material.dialogColor
property string adapter: ""
width: parent.width
height: 4*root.fontFactor*osSettings.bigFontSize

View file

@ -31,17 +31,18 @@
import QtQuick 2.11
import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
import "qrc:/qml/configqml"
import "qrc:/qml/genericqml"
import "qrc:/js/service.js" as Service
Rectangle{
color:"white"
Page{
//color:"white"
width:root.width
height: root.height
//height:root.height
Text {
Label {
text: qsTr("Sync Interval (0=None)")
font.pointSize: osSettings.bigFontSize
//visible: false
@ -58,11 +59,14 @@ Rectangle{
Rectangle{
x: root.fontFactor*osSettings.bigFontSize; y:4*root.fontFactor*osSettings.bigFontSize;
width: 4*root.fontFactor*osSettings.bigFontSize; height: 2*root.fontFactor*osSettings.bigFontSize;
color: Material.dialogColor
radius: 0.5*mm
TextEdit{
id: messageIntervalField
anchors.fill: parent
font.pointSize: osSettings.bigFontSize
verticalAlignment:TextEdit.AlignRight
color: Material.primaryTextColor
text:messageIntervalSlider.value
focus: true
selectByMouse: true
@ -76,7 +80,7 @@ Rectangle{
}
}
}
Text{x: 6*root.fontFactor*osSettings.bigFontSize; y: 4*root.fontFactor*osSettings.bigFontSize;
Label{x: 6*root.fontFactor*osSettings.bigFontSize; y: 4*root.fontFactor*osSettings.bigFontSize;
width: 2*root.fontFactor*osSettings.bigFontSize; height: 1.5*root.fontFactor*osSettings.bigFontSize;
font.pointSize: osSettings.bigFontSize
text:qsTr("Min.")
@ -99,15 +103,15 @@ Rectangle{
}
}
MButton{
id:closeButton
anchors.top: parent.top
anchors.topMargin: osSettings.bigFontSize
anchors.right: parent.right
anchors.rightMargin: 1*mm
width: 2*root.fontFactor*osSettings.bigFontSize;
text: "\uf057"
font.pointSize: osSettings.bigFontSize
onClicked:{rootstackView.pop()}
}
// MButton{
// id:closeButton
// anchors.top: parent.top
// anchors.topMargin: osSettings.bigFontSize
// anchors.right: parent.right
// anchors.rightMargin: 1*mm
// width: 2*root.fontFactor*osSettings.bigFontSize;
// text: "\uf057"
// font.pointSize: osSettings.bigFontSize
// onClicked:{rootstackView.pop()}
// }
}