Theming fixes, icon fixes, .pro fixes, configqml simplification

This commit is contained in:
MorsMortium 2024-03-31 07:53:04 +02:00
parent 3c1c97d489
commit bd5971cf8e
49 changed files with 626 additions and 1073 deletions

View file

@ -22,11 +22,11 @@
<file>qml/photoqml/PhotogroupComponent.qml</file> <file>qml/photoqml/PhotogroupComponent.qml</file>
<file>qml/photoqml/PhotoTab.qml</file> <file>qml/photoqml/PhotoTab.qml</file>
<file>qml/photoqml/ImageUploadDialog.qml</file> <file>qml/photoqml/ImageUploadDialog.qml</file>
<file>qml/genericqml/CloseButton.qml</file>
<file>qml/genericqml/ImagePicker.qml</file> <file>qml/genericqml/ImagePicker.qml</file>
<file>qml/genericqml/ImagePickerLinux.qml</file> <file>qml/genericqml/ImagePickerLinux.qml</file>
<file>qml/genericqml/Search.qml</file> <file>qml/genericqml/Search.qml</file>
<file>qml/genericqml/IntentReceiver.qml</file> <file>qml/genericqml/IntentReceiver.qml</file>
<file>qml/genericqml/MButton.qml</file>
<file>qml/genericqml/LinuxSync.qml</file> <file>qml/genericqml/LinuxSync.qml</file>
<file>qml/genericqml/BlueButton.qml</file> <file>qml/genericqml/BlueButton.qml</file>
<file>qml/genericqml/ContactComponent.qml</file> <file>qml/genericqml/ContactComponent.qml</file>

View file

@ -13,7 +13,7 @@
TEMPLATE = app TEMPLATE = app
TARGET = friendiqa TARGET = friendiqa
CONFIG += release CONFIG += release
QT += qml quick gui widgets sql webview dbus webengine QT += qml quick gui widgets sql webview dbus webengine networkauth quickcontrols2
SOURCES += common/friendiqa.cpp \ SOURCES += common/friendiqa.cpp \
common/uploadableimage.cpp \ common/uploadableimage.cpp \

View file

@ -30,7 +30,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
import QtQuick 2.11 import QtQuick 2.11
//import QtQuick.Controls 2.4 import QtQuick.Controls 2.4
Item { Item {
id: calendarDay id: calendarDay
@ -46,7 +46,7 @@ Item {
anchors.fill:parent anchors.fill:parent
radius: 0.5*mm radius: 0.5*mm
} }
Text { Label {
id:daytext id:daytext
anchors.right: parent.right anchors.right: parent.right
anchors.margins: 0.5*mm anchors.margins: 0.5*mm

View file

@ -101,10 +101,12 @@ Rectangle {
BlueButton{ BlueButton{
z:2 z:2
visible: !wideScreen visible: !wideScreen
fontColor: "grey"
border.color: "transparent" border.color: "transparent"
text: "\uf0c9" Label {
font.pointSize: osSettings.bigFontSize text: "\uf0c9"
anchors.centerIn: parent
font.family: fontAwesome.name
}
onClicked:{ onClicked:{
leftDrawerAndroid.visible?leftDrawerAndroid.close():leftDrawerAndroid.open()} leftDrawerAndroid.visible?leftDrawerAndroid.close():leftDrawerAndroid.open()}
} }
@ -121,14 +123,17 @@ Rectangle {
id: leftDrawerAndroid id: leftDrawerAndroid
} }
MButton{ Button{
id: updateEvents id: updateEvents
anchors.top: parent.top anchors.top: parent.top
anchors.topMargin: 0.5*mm anchors.topMargin: 0.5*mm
anchors.right:calendartabstatusButton.left anchors.right:calendartabstatusButton.left
anchors.rightMargin:mm anchors.rightMargin:mm
//width: 2*root.fontFactor*osSettings.bigFontSize; Label {
text:"\uf021" text: "\uf021"
anchors.centerIn: parent
font.family: fontAwesome.name
}
onClicked: { onClicked: {
calBusy.running=true; calBusy.running=true;
updatenews.setDatabase(); updatenews.setDatabase();
@ -162,7 +167,7 @@ Rectangle {
onRejected: {close()} onRejected: {close()}
} }
MButton{ Button{
id: createNewEvent id: createNewEvent
anchors.top: parent.top anchors.top: parent.top
anchors.topMargin: 0.5*mm anchors.topMargin: 0.5*mm
@ -188,7 +193,7 @@ Rectangle {
} }
} }
MButton{ Button{
id: calendartabstatusButton id: calendartabstatusButton
anchors.top: parent.top anchors.top: parent.top
anchors.topMargin: 0.5*mm anchors.topMargin: 0.5*mm
@ -230,20 +235,18 @@ Rectangle {
Item{ Item{
width:Math.min(23*root.fontFactor*osSettings.bigFontSize,calendarView.width) width:Math.min(23*root.fontFactor*osSettings.bigFontSize,calendarView.width)
height: parent.height height: parent.height
Text{ Label{
font.bold: true font.bold: true
//Layout.fillWidth: true //Layout.fillWidth: true
width: parent.width-root.fontFactor*osSettings.bigFontSize width: parent.width-root.fontFactor*osSettings.bigFontSize
horizontalAlignment:Text.AlignHCenter horizontalAlignment:Text.AlignHCenter
color: osSettings.primaryTextColor
text: model.year text: model.year
font.pointSize: osSettings.systemFontSize font.pointSize: osSettings.systemFontSize
} }
Text{y:1.5*root.fontFactor*osSettings.bigFontSize Label{y:1.5*root.fontFactor*osSettings.bigFontSize
width: parent.width-osSettings.bigFontSize width: parent.width-osSettings.bigFontSize
text: Qt.locale().standaloneMonthName(model.month) text: Qt.locale().standaloneMonthName(model.month)
//Layout.fillWidth: true //Layout.fillWidth: true
color: osSettings.primaryTextColor
horizontalAlignment:Text.AlignHCenter horizontalAlignment:Text.AlignHCenter
font.pointSize: osSettings.systemFontSize font.pointSize: osSettings.systemFontSize
} }

View file

@ -56,7 +56,7 @@ Flickable{
width: root.width width: root.width
height: textColumn.height + 6*root.fontFactor*osSettings.bigFontSize height: textColumn.height + 6*root.fontFactor*osSettings.bigFontSize
color: osSettings.backgroundColor color: osSettings.backgroundColor
MButton{ Button{
id:closeButton id:closeButton
anchors.top: parent.top anchors.top: parent.top
anchors.topMargin: 1*mm anchors.topMargin: 1*mm
@ -72,8 +72,6 @@ Flickable{
width: 3*root.fontFactor*osSettings.bigFontSize width: 3*root.fontFactor*osSettings.bigFontSize
height: root.fontFactor*osSettings.bigFontSize height: root.fontFactor*osSettings.bigFontSize
font.pointSize: osSettings.systemFontSize font.pointSize: osSettings.systemFontSize
//verticalAlignment: TextInput.AlignBottom
color: osSettings.primaryTextColor
text:qsTr("Start") text:qsTr("Start")
} }
@ -93,7 +91,7 @@ Flickable{
font.bold: true font.bold: true
} }
MButton { Button {
id: textStartDateDropdown id: textStartDateDropdown
x: 9.5*root.fontFactor*osSettings.bigFontSize x: 9.5*root.fontFactor*osSettings.bigFontSize
y: root.fontFactor*osSettings.bigFontSize y: root.fontFactor*osSettings.bigFontSize
@ -120,7 +118,7 @@ Flickable{
font.bold: true font.bold: true
} }
MButton { Button {
id: textStartTimeDropdown id: textStartTimeDropdown
x: 16.5*root.fontFactor*osSettings.bigFontSize x: 16.5*root.fontFactor*osSettings.bigFontSize
y: root.fontFactor*osSettings.bigFontSize y: root.fontFactor*osSettings.bigFontSize
@ -138,7 +136,6 @@ Flickable{
width: 3*root.fontFactor*osSettings.bigFontSize width: 3*root.fontFactor*osSettings.bigFontSize
height: root.fontFactor*osSettings.bigFontSize height: root.fontFactor*osSettings.bigFontSize
font.pointSize: osSettings.systemFontSize font.pointSize: osSettings.systemFontSize
color: osSettings.primaryTextColor
text:qsTr("End") text:qsTr("End")
} }
TextField { TextField {
@ -155,7 +152,7 @@ Flickable{
font.bold: true font.bold: true
} }
MButton { Button {
id: textEndDateDropdown id: textEndDateDropdown
x: 9.5*root.fontFactor*osSettings.bigFontSize x: 9.5*root.fontFactor*osSettings.bigFontSize
y: 3*root.fontFactor*osSettings.bigFontSize y: 3*root.fontFactor*osSettings.bigFontSize
@ -183,7 +180,7 @@ Flickable{
font.bold: true font.bold: true
} }
MButton { Button {
id: textEndTimeDropdown id: textEndTimeDropdown
x: 16.5*root.fontFactor*osSettings.bigFontSize x: 16.5*root.fontFactor*osSettings.bigFontSize
y: 3*root.fontFactor*osSettings.bigFontSize y: 3*root.fontFactor*osSettings.bigFontSize
@ -238,7 +235,7 @@ Flickable{
delegate: tumblerDelegateComponent delegate: tumblerDelegateComponent
} }
} }
MButton { Button {
id: timeInputfinished id: timeInputfinished
width: 2*root.fontFactor*osSettings.bigFontSize width: 2*root.fontFactor*osSettings.bigFontSize
height: 2*root.fontFactor*osSettings.bigFontSize height: 2*root.fontFactor*osSettings.bigFontSize
@ -336,7 +333,7 @@ Flickable{
running: false running: false
} }
MButton{ Button{
id:createEventButton id:createEventButton
text: qsTr("Create event") text: qsTr("Create event")
onClicked:{ onClicked:{
@ -390,7 +387,6 @@ Flickable{
Label { Label {
text: formatText(Tumbler.tumbler.count, modelData) text: formatText(Tumbler.tumbler.count, modelData)
opacity: 1.0 - Math.abs(Tumbler.displacement) / (Tumbler.tumbler.visibleItemCount / 2) opacity: 1.0 - Math.abs(Tumbler.displacement) / (Tumbler.tumbler.visibleItemCount / 2)
color: osSettings.primaryTextColor
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
font.pointSize: osSettings.systemFontSize font.pointSize: osSettings.systemFontSize

View file

@ -43,18 +43,22 @@ Rectangle{
property int dayint: 0 property int dayint: 0
property var events:[] property var events:[]
MButton{ Button{
id:closeButton id:closeButton
anchors.top: parent.top anchors.top: parent.top
anchors.topMargin: 1*mm anchors.topMargin: 1*mm
anchors.right: parent.right anchors.right: parent.right
anchors.rightMargin: 1*mm anchors.rightMargin: 1*mm
width: 2*root.fontFactor*osSettings.bigFontSize; width: height
text: "\uf057" Label {
text: "\uf057"
anchors.centerIn: parent
font.family: fontAwesome.name
}
onClicked:{rootstackView.pop()} onClicked:{rootstackView.pop()}
} }
MButton{ Button{
id: createNewEvent id: createNewEvent
anchors.top: parent.top anchors.top: parent.top
anchors.topMargin: 1*mm anchors.topMargin: 1*mm

View file

@ -55,25 +55,23 @@ Rectangle{
height: 7*mm height: 7*mm
onStatusChanged: if (profileImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"} onStatusChanged: if (profileImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"}
} }
Text { Label {
id:eventNameText id:eventNameText
x: 8*mm x: 8*mm
width:parent.width-8*mm width:parent.width-8*mm
height:contentHeight height:contentHeight
color: osSettings.primaryTextColor
textFormat: Text.RichText textFormat: Text.RichText
font.pointSize: osSettings.systemFontSize font.pointSize: osSettings.systemFontSize
text: new Date(event.start).toLocaleString(Qt.locale(),Locale.NarrowFormat)+ " - " +((event.end>0)&&(event.end!=null)?new Date(event.end).toLocaleString(Qt.locale(),Locale.NarrowFormat):"\u221E")+":<br>"+(status=="large"?"<b>"+event.title+"</b>":event.title) text: new Date(event.start).toLocaleString(Qt.locale(),Locale.NarrowFormat)+ " - " +((event.end>0)&&(event.end!=null)?new Date(event.end).toLocaleString(Qt.locale(),Locale.NarrowFormat):"\u221E")+":<br>"+(status=="large"?"<b>"+event.title+"</b>":event.title)
wrapMode:Text.Wrap wrapMode:Text.Wrap
} }
Text { Label {
id:eventDetailsText id:eventDetailsText
x:8*mm x:8*mm
z:4 z:4
width: parent.width-8*mm width: parent.width-8*mm
height: contentHeight height: contentHeight
color: osSettings.primaryTextColor
textFormat: Text.RichText textFormat: Text.RichText
text: status!="large"?"":Qt.atob(event.desc) + (event.location==""?"":"<br><br>"+qsTr("Location")+": "+event.location) text: status!="large"?"":Qt.atob(event.desc) + (event.location==""?"":"<br><br>"+qsTr("Location")+": "+event.location)
anchors.top: eventNameText.bottom anchors.top: eventNameText.bottom
@ -84,7 +82,7 @@ Rectangle{
MouseArea{ MouseArea{
anchors.fill: parent anchors.fill: parent
MButton{ Button{
id: deleteEvent id: deleteEvent
anchors.top: parent.top anchors.top: parent.top
anchors.topMargin: 0.5*mm anchors.topMargin: 0.5*mm

View file

@ -34,9 +34,8 @@ import QtQuick.Controls 2.15
Dialog { Dialog {
id: rulesDialog id: rulesDialog
height: parent.height/2 height: root.height - 2 * mm
width: parent.width width: root.width - 2 * mm
anchors.centerIn: parent
title: qsTr("Accept instance rules") title: qsTr("Accept instance rules")
property string rules: "" property string rules: ""
standardButtons: Dialog.Yes | Dialog.No standardButtons: Dialog.Yes | Dialog.No
@ -46,23 +45,18 @@ Dialog {
ruleButton.visible=false; ruleButton.visible=false;
confirmationOAuth.visible=true confirmationOAuth.visible=true
} }
onRejected: {close()} onRejected: {
close()
}
ScrollView{ ScrollView{
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
width: root.width-2*root.fontFactor*osSettings.bigFontSize anchors.fill: parent
height:parent.height
clip:true clip:true
Text { Label {
x:1; y:1 width: root.width - 4*root.fontFactor*osSettings.bigFontSize
width: root.width-4*root.fontFactor*osSettings.bigFontSize wrapMode: TextEdit.Wrap
wrapMode: TextEdit.Wrap textFormat: Text.PlainText
color: osSettings.primaryTextColor text: rules
linkColor: osSettings.secondaryTextColor }
textFormat: Text.PlainText }
font.family: "Noto Sans"
font.pointSize: osSettings.systemFontSize
text: rules
}
}
} }

View file

@ -42,116 +42,66 @@ import "qrc:/qml/genericqml"
Page{ Page{
id:accountPage id:accountPage
width: root.width anchors.fill: parent
height: root.height anchors.margins: mm
property var users:[] property var users:[]
property var userdata: ({}) property var userdata: ({})
property string imagestoredir: "" property string imagestoredir: ""
property var appdata: ({}) property var appdata: ({})
function setServericon(server){
if ((server!=null) && (server!="")){
xhr.setUrl(server);
xhr.setApi("/api/statusnet/config");
xhr.clearParams();
xhr.get();
}
}
function verify(userconfig){
Helperjs.friendicaRequest(userconfig,"/api/v1/accounts/verify_credentials",root,function(obj){
accountBusy.running=false;
try{var credentials=JSON.parse(obj);
if (credentials.hasOwnProperty('error')){print("error "+credentials.error);
Helperjs.showMessage(qsTr("Error"),qsTr("Wrong password or 2FA enabled!"),root)
}
else{
if (users.length==0){Service.setDefaultOptions(db);}
if (userconfig.hasOwnProperty("APIVersion")){userconfig.password=""}
if (imagestoredir==""){
imagestoredir=filesystem.homePath+"/"+credentials.username+"/";
userconfig.imagestore=imagestoredir
}
if(userconfig.imagestore == filesystem.homePath+"/"+credentials.username+"/")
{filesystem.makePath(filesystem.homePath+"/"+credentials.username);}
filesystem.Directory=imagestoredir;
filesystem.makeDir("contacts");
filesystem.makeDir("albums");
userconfig.accountId=credentials.id;
userconfig.username=credentials.username;
Service.storeConfig(db,userconfig);
Service.readConfig(db,function(userconfig){
Helperjs.readData(db,"config","",function(storedUsers){
storedUsers.sort(function(obj1, obj2) {
return obj1.isActive - obj2.isActive;
});
accountPage.users=storedUsers});
//reset values
login=userconfig;
news=[];
contactlist=[];
rootstack.currentIndex=0;
newstypeSignal("refresh");
},"isActive",0);
Helperjs.showMessage(qsTr("Success"),qsTr("Name")+": "+credentials.display_name+"\nScreen Name: "+credentials.username,root)
rootstackView.pop()
}
}catch(e){Helperjs.showMessage(qsTr("Error"),qsTr("Wrong password or 2FA enabled!"+e),root)};
})
}
BusyIndicator{ BusyIndicator{
id: accountBusy id: accountBusy
anchors.centerIn: parent anchors.centerIn: parent
width: 5*root.fontFactor*osSettings.bigFontSize
height: 5*root.fontFactor*osSettings.bigFontSize
running: false running: false
} }
ColumnLayout{ ColumnLayout{
x: root.fontFactor*osSettings.bigFontSize width: parent.width
width: root.width - 2*mm
y: root.fontFactor*osSettings.bigFontSize
spacing: root.fontFactor*osSettings.bigFontSize
Row{ Row{
spacing:0.5*mm Button{
height: userButton.height
width: parent.width
MButton{
id:userButton id:userButton
text:qsTr("User") text:qsTr("User")
font.pointSize: osSettings.bigFontSize
visible: users.length>0 visible: users.length>0
onClicked:{ onClicked:{
var useritems=""; var users=[];
for (var i=0;i<accountPage.users.length;i++){ 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+ users.push(accountPage.users[i].username);
"'; onTriggered: {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);
imagestore.text=obj.imagestore;
imagestoredir=obj.imagestore;
if( obj.isActive==0){userButton.font.bold='true'} else {userButton.font.bold='false'}
if(obj.password!=''){accountPage.state='password'}
else if (obj.token!=''){accountPage.state='oauth'}
},'username','"+ accountPage.users[i].username+"')}}"
} }
var menuString="import QtQuick.Controls 2.15;import 'qrc:/js/service.js' as Service;"+ userMenuRepeater.model = users;
" Menu {width:8*root.fontFactor*osSettings.bigFontSize;"+useritems+"}"; userMenu.popup()
var userlistObject=Qt.createQmlObject(menuString,accountPage,"usermenuOutput") }
userlistObject.popup() }
} }
MButton { Menu {
id:userMenu
Repeater {
id: userMenuRepeater
MenuItem{
required property string modelData
text:modelData
onTriggered: {
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);
imagestore.text=obj.imagestore;
imagestoredir=obj.imagestore;
userButton.font.bold=obj.isActive==0?'true':'false';
if(obj.password!=''){accountPage.state='password';}
else if (obj.token!=''){accountPage.state='oauth';}
},'username',text);
}
}
}
}
Button {
visible: users.length>0 visible: users.length>0
width: height
text: "-" text: "-"
font.pointSize: osSettings.bigFontSize
onClicked:{ onClicked:{
var userconfig={server: servername.text, username: username.text, password: Qt.btoa(password.text)}; var userconfig={server: servername.text, username: username.text, password: Qt.btoa(password.text)};
@ -188,10 +138,10 @@ Page{
}) })
}} }}
MButton { Button {
visible: users.length>0 visible: users.length>0
width: height
text: "+" text: "+"
font.pointSize: osSettings.bigFontSize
onClicked:{ onClicked:{
servername.text="https://" servername.text="https://"
servericon.visible=false; servericon.visible=false;
@ -204,110 +154,89 @@ Page{
} }
} }
MButton { Button {
text: "?" Label {
font.pointSize: osSettings.bigFontSize anchors.centerIn: parent
onClicked:{ font.family: fontAwesome.name
rootstackView.push("qrc:/qml/configqml/InfoBox.qml"); text: "\uf150"
} }
}
MButton {
text: "\uf150"
font.family: fontAwesome.name
font.pointSize: osSettings.bigFontSize
Menu { Menu {
id:authMethodMenu id:authMethodMenu
width: 10*root.fontFactor*osSettings.systemFontSize
MenuItem { MenuItem {
text: qsTr("OAuth") text: qsTr("OAuth")
font.pointSize: osSettings.systemFontSize
font.bold:accountPage.state=="oauth" font.bold:accountPage.state=="oauth"
onTriggered: {accountPage.state="oauth"} onTriggered: {accountPage.state="oauth"}
} }
MenuItem { MenuItem {
text: qsTr("Password") text: qsTr("Password")
font.pointSize: osSettings.systemFontSize
font.bold:accountPage.state=="password" font.bold:accountPage.state=="password"
onTriggered: {accountPage.state="password"} onTriggered: {accountPage.state="password"}
} }
} }
onClicked: {authMethodMenu.popup()} onClicked: {authMethodMenu.popup()}
} }
MButton{
Button {
text: "?"
width: height
onClicked:{
rootstackView.push("qrc:/qml/configqml/InfoBox.qml");
}
}
Button{
id:closeButton id:closeButton
visible: users.length>0 visible: users.length>0
text: "\uf057"
font.pointSize: osSettings.bigFontSize Label {
onClicked:{rootstackView.pop()} anchors.centerIn: parent
font.family: fontAwesome.name
text: "\uf057"
}
onClicked:{
rootstackView.pop()
}
} }
} }
Row{ RowLayout{
spacing:0.5*mm
height: 3*root.fontFactor*osSettings.bigFontSize
width: parent.width width: parent.width
Image{ Image{
id:servericon id:servericon
width:2.5*root.fontFactor*osSettings.bigFontSize; height: 2.5*root.fontFactor*osSettings.bigFontSize width:2.5*root.fontFactor*osSettings.bigFontSize
height: width
visible: false visible: false
source:"" source:""
property var serverconfig:({}) property var serverconfig:({})
MouseArea{ MouseArea{
anchors.fill:parent anchors.fill:parent
onClicked:{ onClicked:{
let serverConfigString="import QtQuick 2.0; import QtQuick.Dialogs 6.3; MessageDialog{ visible: true; title:'Server';buttons: MessageDialog.Ok;text: 'Name: "+ serverDialog.open()
}
}
MessageDialog {
id: serverDialog
title: qsTr("Server")
buttons: MessageDialog.Ok
text: "Name: "+
servericon.serverconfig.site.name+"\nLanguage: "+servericon.serverconfig.site.language+ servericon.serverconfig.site.name+"\nLanguage: "+servericon.serverconfig.site.language+
"\nEmail: "+servericon.serverconfig.site.email+"\nTimezone: "+servericon.serverconfig.site.timezone+"\nClosed: "+servericon.serverconfig.site.closed+ "\nEmail: "+servericon.serverconfig.site.email+"\nTimezone: "+servericon.serverconfig.site.timezone+"\nClosed: "+servericon.serverconfig.site.closed+
"\nText limit: "+servericon.serverconfig.site.textlimit+"\nShort Url length: "+servericon.serverconfig.site.shorturllength+ "\nText limit: "+servericon.serverconfig.site.textlimit+"\nShort Url length: "+servericon.serverconfig.site.shorturllength+
"\nFriendica version: "+servericon.serverconfig.site.friendica.FRIENDICA_VERSION+ "\nFriendica version: "+servericon.serverconfig.site.friendica.FRIENDICA_VERSION+
"\nDB Update version: "+servericon.serverconfig.site.friendica.DB_UPDATE_VERSION+"'}"; "\nDB Update version: "+servericon.serverconfig.site.friendica.DB_UPDATE_VERSION
var serverconfigObject=Qt.createQmlObject(serverConfigString,accountPage,"serverconfigOutput");
}
} }
} }
FontLoader{id: fontAwesome; source: "qrc:/images/fontawesome-webfont.ttf"} Button{
MButton{
id:serverSearchButton id:serverSearchButton
width: 3*root.fontFactor*osSettings.bigFontSize; height: 2.5*root.fontFactor*osSettings.bigFontSize
//text:"\uf002"
icon.name: "search" icon.name: "search"
font.pointSize: osSettings.bigFontSize visible: !servericon.visible
visible: servericon.visible?false:true
onClicked:{Qt.openUrlExternally(Qt.resolvedUrl("https://dir.friendica.social/servers"))} 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 { TextField {
id: servername id: servername
width: root.width-5*root.fontFactor*osSettings.bigFontSize Layout.fillWidth: true
height: 2.5*root.fontFactor*osSettings.bigFontSize
font.pointSize: osSettings.systemFontSize
text:"https://" text:"https://"
onFocusChanged:{ onFocusChanged:{
if (focus){servermenu.open()} if (focus){servermenu.open()}
@ -322,7 +251,6 @@ Page{
} }
Menu { Menu {
id:servermenu id:servermenu
width: 13*root.fontFactor*osSettings.bigFontSize
Instantiator{ Instantiator{
model:serverModel model:serverModel
MenuItem{ MenuItem{
@ -356,13 +284,11 @@ Page{
ListElement{text:"https://venera.social"} ListElement{text:"https://venera.social"}
} }
} }
MButton { Button {
id: ruleButton id: ruleButton
width: parent.width Layout.fillWidth: true
visible: (osSettings.osType=="Android") && (userButton.text== qsTr("User")) visible: (osSettings.osType=="Android") && (userButton.text== qsTr("User"))
height: 2*root.fontFactor*osSettings.bigFontSize;
text: qsTr("Instance rules") text: qsTr("Instance rules")
font.pointSize: osSettings.bigFontSize
onClicked:{ onClicked:{
xhr.setUrl(servername.text); xhr.setUrl(servername.text);
xhr.setApi("/api/v1/instance/rules"); xhr.setApi("/api/v1/instance/rules");
@ -373,10 +299,7 @@ Page{
TextField { TextField {
id: username id: username
width: root.width-5*root.fontFactor*osSettings.bigFontSize Layout.fillWidth: true
height: 2.5*root.fontFactor*osSettings.bigFontSize;
Layout.leftMargin: 3*root.fontFactor*osSettings.bigFontSize;
font.pointSize: osSettings.systemFontSize
visible: (osSettings.osType=="Android")?(text!= ""):true visible: (osSettings.osType=="Android")?(text!= ""):true
placeholderText: qsTr("Nickname") placeholderText: qsTr("Nickname")
selectByMouse: true selectByMouse: true
@ -390,9 +313,7 @@ Page{
TextField { TextField {
id: password id: password
width: root.width-9*mm; height: 2.5*root.fontFactor*osSettings.bigFontSize; Layout.fillWidth: true
Layout.leftMargin: 3*root.fontFactor*osSettings.bigFontSize;
font.pointSize: osSettings.systemFontSize
visible: (osSettings.osType=="Android")?(userButton.text!= qsTr("User")):true visible: (osSettings.osType=="Android")?(userButton.text!= qsTr("User")):true
selectByMouse: true selectByMouse: true
echoMode: TextInput.Password echoMode: TextInput.Password
@ -400,33 +321,25 @@ Page{
inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhNoPredictiveText | Qt.ImhSensitiveData inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhNoPredictiveText | Qt.ImhSensitiveData
} }
Row{ RowLayout{
spacing:0.5*mm
height: 3*root.fontFactor*osSettings.bigFontSize
width: parent.width
Label { Label {
id: imagedirlabel id: imagedirlabel
visible: imagestore.text!="" visible: imagestore.text!=""
text: qsTr("Image dir.") text: qsTr("Image dir.")
font.pointSize: osSettings.systemFontSize
} }
TextField { TextField {
id: imagestore id: imagestore
width: root.width-17*mm; Layout.fillWidth: true
height: 2.5*root.fontFactor*osSettings.bigFontSize; visible:text!=""
visible:imagestore.text!=""
font.pointSize: osSettings.systemFontSize
selectByMouse: true selectByMouse: true
text: ""
wrapMode: TextEdit.NoWrap wrapMode: TextEdit.NoWrap
onTextChanged: imagestoredir=imagestore.text onTextChanged: imagestoredir=imagestore.text
} }
MButton { Button {
visible:imagestore.text!="" visible:imagestore.text!=""
text: "..." text: "..."
font.pointSize: osSettings.bigFontSize
onClicked:{imagestoreDialog.open()} onClicked:{imagestoreDialog.open()}
} }
@ -434,7 +347,6 @@ Page{
id: imagestoreDialog id: imagestoreDialog
title: "Please choose a directory" title: "Please choose a directory"
currentFolder: StandardPaths.standardLocations(StandardPaths.PicturesLocation)[0] currentFolder: StandardPaths.standardLocations(StandardPaths.PicturesLocation)[0]
//selectFolder: true
onAccepted: { onAccepted: {
var imagestoreString=imagestoreDialog.selectedFolder.toString(); var imagestoreString=imagestoreDialog.selectedFolder.toString();
imagestoreString=imagestoreString.replace(/^(file:\/{2})/,"")+"/" imagestoreString=imagestoreString.replace(/^(file:\/{2})/,"")+"/"
@ -443,12 +355,10 @@ Page{
} }
} }
Button {
MButton {
id:confirmationOAuth id:confirmationOAuth
width: parent.width Layout.fillWidth: true
text: qsTr("Connect") text: qsTr("Connect")
font.pointSize: osSettings.bigFontSize
visible: (osSettings.osType=="Android")?userButton.text!= qsTr("User"):true visible: (osSettings.osType=="Android")?userButton.text!= qsTr("User"):true
onClicked:{ onClicked:{
if (servername.text==""){Helperjs.showMessage(qsTr("Error"), qsTr("No server given!"),root)} if (servername.text==""){Helperjs.showMessage(qsTr("Error"), qsTr("No server given!"),root)}
@ -517,12 +427,10 @@ Page{
} }
} }
MButton { Button {
id:confirmation id:confirmation
width: 10*root.fontFactor*osSettings.bigFontSize;
text: qsTr("Confirm") text: qsTr("Confirm")
font.pointSize: osSettings.bigFontSize visible: false
visible: false// (osSettings.osType=="Android")?userButton.text!= qsTr("User"):true
onClicked:{ onClicked:{
accountBusy.running=true; accountBusy.running=true;
var userconfig={server: servername.displayText, username: username.text, password:Qt.btoa(password.text), imagestore:imagestoredir,interval:""}; var userconfig={server: servername.displayText, username: username.text, password:Qt.btoa(password.text), imagestore:imagestoredir,interval:""};
@ -536,11 +444,10 @@ Page{
else {Helperjs.showMessage(qsTr("Error"), errormessage,root)} else {Helperjs.showMessage(qsTr("Error"), errormessage,root)}
}} }}
MButton { Button {
id: setDefault id: setDefault
width: 10*root.fontFactor*osSettings.bigFontSize; Layout.fillWidth: true
text: qsTr("Set as default") text: qsTr("Set as default")
font.pointSize: osSettings.bigFontSize
visible: false visible: false
onClicked:{ onClicked:{
accountBusy.running=true; accountBusy.running=true;
@ -559,6 +466,58 @@ Page{
} }
} }
} }
function setServericon(server){
if ((server!=null) && (server!="")){
xhr.setUrl(server);
xhr.setApi("/api/statusnet/config");
xhr.clearParams();
xhr.get();
}
}
function verify(userconfig){
Helperjs.friendicaRequest(userconfig,"/api/v1/accounts/verify_credentials",root,function(obj){
accountBusy.running=false;
try{var credentials=JSON.parse(obj);
if (credentials.hasOwnProperty('error')){print("error "+credentials.error);
Helperjs.showMessage(qsTr("Error"),qsTr("Wrong password or 2FA enabled!"),root)
}
else{
if (users.length==0){Service.setDefaultOptions(db);}
if (userconfig.hasOwnProperty("APIVersion")){userconfig.password=""}
if (imagestoredir==""){
imagestoredir=filesystem.homePath+"/"+credentials.username+"/";
userconfig.imagestore=imagestoredir
}
if(userconfig.imagestore == filesystem.homePath+"/"+credentials.username+"/")
{filesystem.makePath(filesystem.homePath+"/"+credentials.username);}
filesystem.Directory=imagestoredir;
filesystem.makeDir("contacts");
filesystem.makeDir("albums");
userconfig.accountId=credentials.id;
userconfig.username=credentials.username;
Service.storeConfig(db,userconfig);
Service.readConfig(db,function(userconfig){
Helperjs.readData(db,"config","",function(storedUsers){
storedUsers.sort(function(obj1, obj2) {
return obj1.isActive - obj2.isActive;
});
accountPage.users=storedUsers});
//reset values
login=userconfig;
news=[];
contactlist=[];
rootstack.currentIndex=0;
newstypeSignal("refresh");
},"isActive",0);
Helperjs.showMessage(qsTr("Success"),qsTr("Name")+": "+credentials.display_name+"\nScreen Name: "+credentials.username,root)
rootstackView.pop()
}
}catch(e){Helperjs.showMessage(qsTr("Error"),qsTr("Wrong password or 2FA enabled!"+e),root)};
})
}
states: [ states: [
State { State {
name: "new_oauth" name: "new_oauth"

View file

@ -30,227 +30,125 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
import QtQuick 2.11 import QtQuick 2.11
//import QtQuick.Dialogs 1.2
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
import QtQuick.Layouts 1.11
import "qrc:/js/service.js" as Service import "qrc:/js/service.js" as Service
import "qrc:/js/helper.js" as Helperjs import "qrc:/js/helper.js" as Helperjs
import "qrc:/qml/configqml" import "qrc:/qml/configqml"
import "qrc:/qml/genericqml" import "qrc:/qml/genericqml"
Page{
width: parent.width
height: parent.height
ScrollView{
anchors.fill: parent
contentHeight: 40*root.fontFactor*osSettings.bigFontSize
contentWidth: root.width
clip:true
Label { ColumnLayout{
text: qsTr("News as") anchors.fill: parent
font.pointSize:osSettings.systemFontSize
x: root.fontFactor*osSettings.bigFontSize; y: 2*root.fontFactor*osSettings.bigFontSize
}
Rectangle{ Label {
x: root.fontFactor*osSettings.bigFontSize; y: 4*root.fontFactor*osSettings.bigFontSize; text: qsTr("News as")
width: newsTypeField.contentWidth+2*mm; height: 2*root.fontFactor*osSettings.bigFontSize font.pointSize: osSettings.bigFontSize
color: osSettings.backgroundDimColor//"#F3F3F3" }
radius: 0.5*mm
Label{ ComboBox {
id: newsTypeField Layout.minimumWidth:root.width - mm * 3 - closeButton.width
anchors.fill: parent model: [ qsTr("Timeline"), qsTr("Conversations") ]
font.pointSize:osSettings.bigFontSize currentIndex: globaloptions["newsViewType"] == "Timeline"?0:1
text:qsTr("Conversations") onCurrentIndexChanged: {
} Service.updateglobaloptions(root.db,"newsViewType",currentText);
MouseArea{
anchors.fill:parent
onClicked:newstypemenu.popup()
}
} }
Menu { }
id:newstypemenu
width:12*root.fontFactor*osSettings.bigFontSize Label {
MenuItem { text: qsTr("Max. News")
font.pointSize: osSettings.bigFontSize font.pointSize: osSettings.bigFontSize
text: qsTr("Timeline") }
onTriggered: {newsTypeField.text=qsTr("Timeline");
Service.updateglobaloptions(root.db,"newsViewType","Timeline");} Row{
} TextField {
MenuItem { id:maxNewsText
font.pointSize: osSettings.bigFontSize text:maxNews.value
text: qsTr("Conversations") onTextChanged: {
onTriggered: {newsTypeField.text=qsTr("Conversations"); Service.updateglobaloptions(root.db,"max_news",text);
Service.updateglobaloptions(root.db,"newsViewType","Conversations");} maxNews.value = text;
} }
} }
Slider{
Label { id: maxNews
text: qsTr("Max. News") width: root.width - maxNewsText.width - mm * 2 - closeButton.width
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 from: 0;to:2000; stepSize: 100
value: root.globaloptions.hasOwnProperty("max_news")?root.globaloptions.max_news:1000 value: root.globaloptions.hasOwnProperty("max_news")?root.globaloptions.max_news:1000
} onMoved: {
Service.updateglobaloptions(root.db,"max_news",value);
Rectangle{
color: osSettings.backgroundDimColor
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: osSettings.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("Default News Tabs")
font.pointSize: osSettings.systemFontSize
}
Repeater{id:newstypeRepeater
model: 4
delegate:ComboBox{
required property int index
model: ["Home", "Replies", "DirectMessages","Favorites","Public Timeline","Notifications"]
currentIndex: model.indexOf(globaloptions.defaultNewsTypes[index])
onCurrentTextChanged: {
if (currentText !== globaloptions.defaultNewsTypes[index]){
globaloptions.defaultNewsTypes.splice(index,1,currentText);
Service.updateglobaloptions(root.db,"defaultNewsTypes",globaloptions.defaultNewsTypes)
root.globaloptionsChanged()
}
}
}
}
}
Column{
//visible: osSettings.osType=="Android"
x: root.fontFactor*osSettings.bigFontSize
y: 26*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: 3*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 Label{
// // height: 2*root.fontFactor*osSettings.bigFontSize text: qsTr("#nsfw")
// width: 2*root.fontFactor*osSettings.bigFontSize; font.pointSize: osSettings.bigFontSize
// anchors.top: parent.top }
// anchors.topMargin:root.fontFactor*osSettings.bigFontSize
// anchors.right: parent.right CheckBox{
// anchors.rightMargin: 1*mm id: nsfwCheckbox
// text: "\uf057" text: qsTr("Hide")
// font.pointSize: osSettings.bigFontSize checked:globaloptions["hide_nsfw"]==1
// onClicked:{rootstackView.pop()} onClicked: {
// } Service.updateglobaloptions(root.db,"hide_nsfw",checked?1:0);
}
}
Label{
text: qsTr("Default News Tabs")
font.pointSize: osSettings.bigFontSize
}
Repeater{id:newstypeRepeater
model: 4
delegate:ComboBox{
required property int index
model: ["Home", "Replies", "DirectMessages","Favorites","Public Timeline","Notifications"]
currentIndex: model.indexOf(globaloptions.defaultNewsTypes[index])
onCurrentTextChanged: {
if (currentText !== globaloptions.defaultNewsTypes[index]){
globaloptions.defaultNewsTypes.splice(index,1,currentText);
Service.updateglobaloptions(root.db,"defaultNewsTypes",globaloptions.defaultNewsTypes)
root.globaloptionsChanged()
}
}
}
}
Label{
text: qsTr("Dark Mode")
font.pointSize: osSettings.bigFontSize
}
RadioButton{
text: qsTr("System")
checked: globaloptions["view_darkmode"]==0 || globaloptions["view_darkmode"]==undefined
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
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
onClicked: {
if(checked==true){
Service.updateglobaloptions(root.db,"view_darkmode",2);
root.Material.theme=Material.Light
}
}
}
} }

View file

@ -30,7 +30,6 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
import QtQuick 2.11 import QtQuick 2.11
//import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.11 import QtQuick.Layouts 1.11
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
import "qrc:/js/service.js" as Service import "qrc:/js/service.js" as Service
@ -38,36 +37,54 @@ import "qrc:/qml/configqml"
import "qrc:/qml/genericqml" import "qrc:/qml/genericqml"
Page{ Page{
//anchors.fill: parent width: parent.width
width:root.width height: parent.height
height:root.height
TabBar { ColumnLayout{
id: configbar anchors.fill: parent
width: parent.width-3*root.fontFactor*osSettings.bigFontSize//osSettings.osType=="Android"?parent.width-3*root.fontFactor*osSettings.bigFontSize:parent.width TabBar {
height: 2*root.fontFactor*osSettings.bigFontSize id: configbar
x: osSettings.osType=="Android"?2*osSettings.bigFontSize:0 position:TabBar.Header
//visible: !wideScreen currentIndex: 0
position:TabBar.Header TabButton {
currentIndex: 0 text: qsTr("Appearance")
TabButton { font.pointSize: osSettings.systemFontSize
text: qsTr("Appearance") width:root.width/3
font.pointSize: osSettings.systemFontSize }
height: 2*root.fontFactor*osSettings.bigFontSize TabButton {
width:6*root.fontFactor*osSettings.bigFontSize text: qsTr("Sync")
font.pointSize: osSettings.systemFontSize
width:root.width/3
}
TabButton {
text: qsTr("Start")
visible:osSettings.osType=="Linux"
font.pointSize: osSettings.systemFontSize
width:root.width/3
}
} }
TabButton {
text: qsTr("Sync") StackLayout{
font.pointSize: osSettings.systemFontSize Layout.fillWidth:true
height: 2*root.fontFactor*osSettings.bigFontSize Layout.fillHeight:true
width:10*root.fontFactor*osSettings.bigFontSize Layout.leftMargin: mm
} id:configTabView
TabButton { currentIndex: configbar.currentIndex
text: qsTr("Start")
visible:osSettings.osType=="Linux" Loader{
font.pointSize: osSettings.systemFontSize id: appearanceLoader
height: 2*root.fontFactor*osSettings.bigFontSize source:(configTabView.currentIndex==0)? "qrc:/qml/configqml/ConfigAppearancePage.qml":""
width:10*root.fontFactor*osSettings.bigFontSize }
Loader{
id: syncLoader
source:(configTabView.currentIndex==1)? "qrc:/qml/configqml/SyncConfig.qml":""
}
Loader{
id: startLoader
source:(configTabView.currentIndex==2)? "qrc:/qml/configqml/ConfigStartPage.qml":""
}
} }
} }
@ -82,49 +99,20 @@ Page{
id: leftDrawerAndroid id: leftDrawerAndroid
} }
StackLayout{ Column {
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":""
}
Loader{
id: syncLoader
source:(configTabView.currentIndex==1)? "qrc:/qml/configqml/SyncConfig.qml":""
}
Loader{
id: startLoader
source:(configTabView.currentIndex==2)? "qrc:/qml/configqml/ConfigStartPage.qml":""
}
}
MButton{
id:closeButton
// height: 2*root.fontFactor*osSettings.bigFontSize
//width: 2*root.fontFactor*osSettings.bigFontSize;
anchors.top: parent.top
anchors.topMargin:2*root.fontFactor*osSettings.bigFontSize
anchors.right: parent.right anchors.right: parent.right
anchors.rightMargin: 1*mm anchors.top: parent.top
text: "\uf057" anchors.topMargin: configbar.height + mm
font.pointSize: osSettings.bigFontSize spacing: mm
onClicked:{rootstackView.pop()} CloseButton {id: closeButton}
Button {
anchors.left: closeButton.left
width: height
text: "?"
onClicked:{
rootstackView.push("qrc:/qml/configqml/InfoBox.qml");
}
}
} }
} }

View file

@ -32,49 +32,20 @@
import QtQuick 2.11 import QtQuick 2.11
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
Page{ Column{
//anchors.fill: parent anchors.fill: parent
width:root.width
height:root.height-6*root.fontFactor*osSettings.bigFontSize Label {
text: qsTr("Autostart")
font.pointSize: osSettings.bigFontSize
}
CheckBox{ CheckBox{
id: autostartCheckbox id: autostartCheckbox
x: mm
y: root.fontFactor*osSettings.bigFontSize
width: 10*root.fontFactor*osSettings.bigFontSize
checked:filesystem.isAutostart checked:filesystem.isAutostart
//style: CheckBoxStyle { text: qsTr("Enable")
text: qsTr("Autostart")
font.pointSize: osSettings.bigFontSize
onClicked: { onClicked: {
toggle(); filesystem.setAutostart(checked);
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

@ -34,13 +34,13 @@ import QtQuick.Controls 2.12
import "qrc:/qml/genericqml" import "qrc:/qml/genericqml"
Page{ Page{
Text{id:infoBoxText Label{
anchors.top:closeButton.bottom id:infoBoxText
anchors.topMargin: mm anchors.left: parent.left
anchors.right: parent.right
anchors.top: closeButton.bottom
anchors.leftMargin: mm
textFormat: Text.RichText textFormat: Text.RichText
width: root.width-mm
font.pointSize: osSettings.systemFontSize
color: osSettings.primaryTextColor
wrapMode: Text.WrapAtWordBoundaryOrAnywhere wrapMode: Text.WrapAtWordBoundaryOrAnywhere
text: "<b>Friendiqa v0.6.9 </b><br>Licensed under GPL 3 with the exception of OpenSSL <br> "+ text: "<b>Friendiqa v0.6.9 </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>"+ "Website <a href='https://friendiqa.ma-nic.de'>https://friendiqa.ma-nic.de</a><br>"+
@ -52,16 +52,10 @@ Page{
"AndroidNative by <a href='https://github.com/benlau/androidnative.pri'>Ben Lau</a><br>"+ "AndroidNative by <a href='https://github.com/benlau/androidnative.pri'>Ben Lau</a><br>"+
"This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (<a href='http://www.openssl.org/'>http://www.openssl.org/</a>)" "This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (<a href='http://www.openssl.org/'>http://www.openssl.org/</a>)"
onLinkActivated:{ onLinkActivated:{
Qt.openUrlExternally(link)} Qt.openUrlExternally(link)
}
} }
MButton{ CloseButton {
id:closeButton
anchors.top: parent.top 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

@ -37,46 +37,47 @@ import "qrc:/js/service.js" as Service
ScrollView{ ScrollView{
id:leftDrawerScrollviewId id:leftDrawerScrollviewId
clip: true clip: true
width:parent.width-mm anchors.fill: parent
height: parent.height anchors.margins: mm
contentHeight: leftDrawerColumn.height
property string currentnewstabstatus:root.globaloptions.hasOwnProperty("newsViewType")?root.globaloptions.newsViewType:"Conversations"; property string currentnewstabstatus:root.globaloptions.hasOwnProperty("newsViewType")?root.globaloptions.newsViewType:"Conversations";
Column{ Column{
id:leftDrawerColumn id:leftDrawerColumn
x:mm width:parent.width
y:0.5*root.fontFactor*osSettings.bigFontSize
width:parent.width-2*mm
height: 4*root.fontFactor*osSettings.bigFontSize
spacing: 0.7*root.fontFactor*osSettings.bigFontSize spacing: 0.7*root.fontFactor*osSettings.bigFontSize
Label{ Label{
width:implicitWidth width:parent.width
font.family: fontAwesome.name font.family: fontAwesome.name
font.pointSize: osSettings.systemFontSize font.pointSize: osSettings.systemFontSize
text: "\uf085 "+ qsTr("Settings") text: "\uf085 "+ qsTr("Settings")
MouseArea{ MouseArea{
anchors.fill:parent anchors.fill:parent
onClicked:{rootstackView.push("qrc:qml/configqml/ConfigPage.qml"); onClicked:{
if(!wideScreen){leftDrawerAndroid.close()} rootstackView.push("qrc:qml/configqml/ConfigPage.qml");
if(!wideScreen){
leftDrawerAndroid.close();
}
} }
} }
} }
Label{y: 2*root.fontFactor*osSettings.bigFontSize Label{
width:implicitWidth width:parent.width
font.family: fontAwesome.name font.family: fontAwesome.name
font.pointSize: osSettings.systemFontSize font.pointSize: osSettings.systemFontSize
text: "\uf2bb " + qsTr("Accounts") text: "\uf2bb " + qsTr("Accounts")
MouseArea{ MouseArea{
anchors.fill:parent anchors.fill:parent
onClicked:{rootstackView.push("qrc:qml/configqml/AccountPage.qml"); onClicked:{
if(!wideScreen){leftDrawerAndroid.close()} rootstackView.push("qrc:qml/configqml/AccountPage.qml");
if(!wideScreen){
leftDrawerAndroid.close();
}
} }
} }
} }
Label{y: 4*root.fontFactor*osSettings.bigFontSize Label{width:parent.width
width:implicitWidth
font.family: fontAwesome.name font.family: fontAwesome.name
font.pointSize: osSettings.systemFontSize font.pointSize: osSettings.systemFontSize
text: "\uf08b " +qsTr("Quit") text: "\uf08b " +qsTr("Quit")
@ -86,8 +87,10 @@ ScrollView{
Service.cleanNews(root.db,function(){ Service.cleanNews(root.db,function(){
Service.cleanHashtags(root.db,function(){ Service.cleanHashtags(root.db,function(){
Service.cleanContacts(root.login,root.db,function(){ Service.cleanContacts(root.login,root.db,function(){
Qt.quit()}) Qt.quit();
})}) });
});
});
} }
} }
} }
@ -99,7 +102,6 @@ ScrollView{
} }
ListView{ ListView{
id:accountList id:accountList
y: 6.5*root.fontFactor*osSettings.bigFontSize
width:parent.width width:parent.width
height: contentHeight height: contentHeight
model: accountModel model: accountModel
@ -109,16 +111,9 @@ ScrollView{
Component.onCompleted:{ Component.onCompleted:{
Service.readAllLogins(db,function(accounts){ Service.readAllLogins(db,function(accounts){
if (accounts.length>0 && bar.currentIndex==0){ for(var account in accounts) {
leftDrawerColumn.height=6.5*root.fontFactor*osSettings.bigFontSize+accounts.length*17*root.fontFactor*osSettings.bigFontSize accountModel.append({"account":accounts[account]})
for(var account in accounts) {
accountModel.append({"account":accounts[account]})
}
}else if(accounts.length>0 && bar.currentIndex==1){
leftDrawerColumn.height=6.5*root.fontFactor*osSettings.bigFontSize+accounts.length*8*root.fontFactor*osSettings.bigFontSize
for(var account in accounts) {
accountModel.append({"account":accounts[account]})
}
} }
})} })
}
} }

View file

@ -40,10 +40,7 @@ QtObject{
property string osType: "Linux" property string osType: "Linux"
property int systemFontSize: root.font.pointSize*1.1 property int systemFontSize: root.font.pointSize*1.1
property int bigFontSize: systemFontSize*1.5 property int bigFontSize: systemFontSize*1.5
//property string attachImageDir:filesystem.homePath+"/Pictures/"
property string imagePickQml: "ImagePickerLinux" property string imagePickQml: "ImagePickerLinux"
//SystemPalette { id: sysPalette; colorGroup: SystemPalette.Active }
//property SystemPalette name: value
property color backgroundColor: palette.window property color backgroundColor: palette.window
property color backgroundDimColor: palette.button property color backgroundDimColor: palette.button
property color primaryTextColor: palette.windowText property color primaryTextColor: palette.windowText

View file

@ -32,55 +32,33 @@
import QtQuick 2.11 import QtQuick 2.11
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
import QtQuick.Layouts 1.11
import "qrc:/qml/configqml" import "qrc:/qml/configqml"
import "qrc:/js/service.js" as Service import "qrc:/js/service.js" as Service
Rectangle{ Column {
color: osSettings.dialogColor
property string adapter: "" property string adapter: ""
width: parent.width
height: 4*root.fontFactor*osSettings.bigFontSize
Label{ Label{
x: mm
y: 0.5*mm
font.pointSize: osSettings.systemFontSize
text: qsTr(adapter) text: qsTr(adapter)
} }
CheckBox{ Row {
id: syncCheckbox CheckBox{
x: mm width: root.width/2
y: root.fontFactor*osSettings.bigFontSize id: syncCheckbox
width: 10*root.fontFactor*osSettings.bigFontSize checked:globaloptions["sync_"+adapter]==1
checked:(globaloptions["sync_"+adapter]==1)?true:false text: qsTr("sync")
//style: CheckBoxStyle { onClicked: {
text: qsTr("sync") Service.updateglobaloptions(root.db,"sync_"+adapter,checked?1:0);
font.pointSize: osSettings.bigFontSize
onClicked: {
toggle();
if(syncCheckbox.checked==true){
Service.updateglobaloptions(root.db,"sync_"+adapter,0);syncCheckbox.checked=false;
}
else{
Service.updateglobaloptions(root.db,"sync_"+adapter,1);syncCheckbox.checked=true;
} }
} }
} CheckBox{
CheckBox{ width: parent.width / 2
id: notifyCheckbox id: notifyCheckbox
x: 10*root.fontFactor*osSettings.bigFontSize
y: root.fontFactor*osSettings.bigFontSize
width: 10*root.fontFactor*osSettings.bigFontSize
enabled: adapter!="Notifications" enabled: adapter!="Notifications"
checked:(globaloptions["notify_"+adapter]==1)?true:false checked:globaloptions["notify_"+adapter]==1
text: qsTr("notify") text: qsTr("notify")
font.pointSize: osSettings.bigFontSize
onClicked: { onClicked: {
toggle(); Service.updateglobaloptions(root.db,"notify_"+adapter,checked?1:0);
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,44 +31,23 @@
import QtQuick 2.11 import QtQuick 2.11
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
import QtQuick.Layouts 1.11
import "qrc:/qml/configqml" import "qrc:/qml/configqml"
import "qrc:/qml/genericqml" import "qrc:/qml/genericqml"
import "qrc:/js/service.js" as Service import "qrc:/js/service.js" as Service
Page{ ColumnLayout {
//color:"white" anchors.fill: parent
width:root.width
height: root.height
//height:root.height
Label { Label {
text: qsTr("Sync Interval (0=None)") text: qsTr("Sync Interval (0=None)")
font.pointSize: osSettings.bigFontSize font.pointSize: osSettings.bigFontSize
//visible: false
x: root.fontFactor*osSettings.bigFontSize; y: root.fontFactor*osSettings.bigFontSize; //width:35*mm;wrapMode: Text.Wrap
} }
Slider{ id: messageIntervalSlider Row {
x:8*root.fontFactor*osSettings.bigFontSize; y: 4*root.fontFactor*osSettings.bigFontSize; TextField {
width: root.width-10*root.fontFactor*osSettings.bigFontSize; id:messageIntervalField
height:2*root.fontFactor*osSettings.bigFontSize
value: globaloptions.hasOwnProperty("syncinterval")?globaloptions.syncinterval:0
from: 0;to:120; stepSize: 15
}
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: osSettings.dialogColor
radius: 0.5*mm
TextEdit{
id: messageIntervalField
anchors.fill: parent
font.pointSize: osSettings.bigFontSize
verticalAlignment:TextEdit.AlignRight
color: osSettings.primaryTextColor
text:messageIntervalSlider.value text:messageIntervalSlider.value
focus: true
selectByMouse: true
onTextChanged: { onTextChanged: {
Service.updateglobaloptions(root.db,"syncinterval",text); Service.updateglobaloptions(root.db,"syncinterval",text);
if(osSettings.osType=="Android"){ if(osSettings.osType=="Android"){
@ -76,41 +55,35 @@ Page{
} else if(osSettings.osType=="Linux" && text !=0){ } else if(osSettings.osType=="Linux" && text !=0){
root.updateSyncinterval(parseInt(text)) root.updateSyncinterval(parseInt(text))
} }
messageIntervalSlider.value = text;
}
}
Slider{
id: messageIntervalSlider
width: root.width - messageIntervalField.width - mm * 3 - closeButton.width
from: 0;to:120; stepSize: 15
value: globaloptions.hasOwnProperty("syncinterval")?globaloptions.syncinterval:0
onMoved: {
Service.updateglobaloptions(root.db,"syncinterval",value);
if(osSettings.osType=="Android"){
alarm.setAlarm(value);
} else if(osSettings.osType=="Linux" && value !=0){
root.updateSyncinterval(parseInt(value))
}
} }
} }
} }
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; Label{
font.pointSize: osSettings.bigFontSize
text:qsTr("Min.") text:qsTr("Min.")
font.pointSize: osSettings.bigFontSize
} }
ScrollView{ SyncComponent{adapter:"Timeline"}
width: root.width SyncComponent{adapter:"Replies"}
height: root.height - 10*root.fontFactor*osSettings.bigFontSize; SyncComponent{ adapter:"DirectMessages"}
y:7*root.fontFactor*osSettings.bigFontSize SyncComponent{ adapter:"Notifications"}
clip:true SyncComponent{ adapter: "Events"}
Column{ SyncComponent{adapter: "FriendRequests"}
width: parent.width
spacing:mm
SyncComponent{adapter:"Timeline"}
SyncComponent{adapter:"Replies"}
SyncComponent{ adapter:"DirectMessages"}
SyncComponent{ adapter:"Notifications"}
SyncComponent{ adapter: "Events"}
SyncComponent{adapter: "FriendRequests"}
}
}
// 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()}
// }
} }

View file

@ -76,13 +76,13 @@ Rectangle {
source:(contact.profile_image!="")? "file://"+contact.profile_image : contact.profile_image_url source:(contact.profile_image!="")? "file://"+contact.profile_image : contact.profile_image_url
onStatusChanged: if (contactImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"} onStatusChanged: if (contactImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"}
} }
Text{ Label{
font.pointSize: osSettings.bigFontSize font.pointSize: osSettings.bigFontSize
anchors.left: contactImage.right anchors.left: contactImage.right
anchors.margins: 1*mm anchors.margins: 1*mm
text:Qt.atob(contact.name) text:Qt.atob(contact.name)
} }
Text { Label {
id:selected id:selected
anchors.right:parent.right anchors.right:parent.right
visible: contactlist.indexOf(contact)>-1 visible: contactlist.indexOf(contact)>-1
@ -110,7 +110,7 @@ Rectangle {
} }
} }
MButton { Button {
id: closeButton id: closeButton
anchors.top: parent.top anchors.top: parent.top
anchors.topMargin: 1*mm anchors.topMargin: 1*mm

View file

@ -96,7 +96,7 @@ Page{
} }
} }
MButton { Button {
id: closeButton id: closeButton
anchors.top: parent.top anchors.top: parent.top
anchors.topMargin: 0.5*root.fontFactor*osSettings.bigFontSize anchors.topMargin: 0.5*root.fontFactor*osSettings.bigFontSize
@ -133,7 +133,7 @@ Page{
height: childrenRect.height height: childrenRect.height
color: osSettings.backgroundColor color: osSettings.backgroundColor
required property string section required property string section
Text { Label {
color: osSettings.secondaryTextColor color: osSettings.secondaryTextColor
text: parent.section text: parent.section
font.bold: true font.bold: true

View file

@ -111,7 +111,7 @@ Item{
} }
} }
MButton { Button {
id: updateFriendsButton id: updateFriendsButton
text: "\uf021" text: "\uf021"
anchors.top: parent.top anchors.top: parent.top
@ -195,7 +195,7 @@ Item{
height: childrenRect.height height: childrenRect.height
color: osSettings.backgroundColor color: osSettings.backgroundColor
required property string section required property string section
Text { Label {
color: osSettings.secondaryTextColor color: osSettings.secondaryTextColor
text: parent.section text: parent.section
font.bold: true font.bold: true
@ -211,8 +211,7 @@ Item{
color: osSettings.dialogColor color: osSettings.dialogColor
width:friendsView.width width:friendsView.width
height:6*mm height:6*mm
Text{ Label{
color: osSettings.primaryTextColor
font.family: fontAwesome.name font.family: fontAwesome.name
font.pointSize: osSettings.bigFontSize font.pointSize: osSettings.bigFontSize
anchors.centerIn: parent anchors.centerIn: parent

View file

@ -75,7 +75,7 @@ Item {
} }
} }
MButton{ Button{
id: closeButton id: closeButton
visible: false visible: false
anchors.right: parent.right anchors.right: parent.right
@ -88,7 +88,7 @@ Item {
} }
} }
MButton{ Button{
id:infobutton id:infobutton
text:"?" text:"?"
font.pointSize: osSettings.bigFontSize font.pointSize: osSettings.bigFontSize

View file

@ -72,7 +72,7 @@ Item{
} }
} }
} }
// MButton {//requestGroups() not working with Friendica 02/2022 // Button {//requestGroups() not working with Friendica 02/2022
// id: updateGroupsButton // id: updateGroupsButton
// text: "\uf021" // text: "\uf021"
// anchors.top: parent.top // anchors.top: parent.top

View file

@ -112,7 +112,7 @@ Rectangle {
callback(profiletext) callback(profiletext)
} }
MButton { Button {
id: update id: update
anchors.top: parent.top anchors.top: parent.top
anchors.topMargin: mm anchors.topMargin: mm
@ -172,7 +172,7 @@ Rectangle {
anchors.top: photoImage.top anchors.top: photoImage.top
anchors.right: photoImage.right anchors.right: photoImage.right
} }
Text { Label {
id:phototext id:phototext
z:4 z:4
font.family: fontAwesome.name font.family: fontAwesome.name
@ -184,7 +184,7 @@ Rectangle {
font.pointSize: 1.2*osSettings.bigFontSize font.pointSize: 1.2*osSettings.bigFontSize
} }
MButton{ Button{
id:updatebutton id:updatebutton
width: 8*root.fontFactor*osSettings.bigFontSize width: 8*root.fontFactor*osSettings.bigFontSize
visible: "file://"+profile.friendica_owner.profile_image!= photoImage.source visible: "file://"+profile.friendica_owner.profile_image!= photoImage.source
@ -219,13 +219,12 @@ Rectangle {
width:profileView.width width:profileView.width
color: osSettings.backgroundColor color: osSettings.backgroundColor
height: 5*mm+profiletextfield.height height: 5*mm+profiletextfield.height
Text{ Label{
y:mm y:mm
font.pointSize: osSettings.systemFontSize font.pointSize: osSettings.systemFontSize
text:"<b>"+qsTr("profile id")+": </b> "+profileid+"<br>" text:"<b>"+qsTr("profile id")+": </b> "+profileid+"<br>"
color:osSettings.primaryTextColor
} }
Text{ Label{
id:profiletextfield id:profiletextfield
x:2*mm x:2*mm
y:4.5*mm y:4.5*mm
@ -233,16 +232,14 @@ Rectangle {
wrapMode: Text.Wrap wrapMode: Text.Wrap
font.pointSize: osSettings.systemFontSize font.pointSize: osSettings.systemFontSize
text:profiletext text:profiletext
color: osSettings.primaryTextColor
onLinkActivated: Qt.openUrlExternally(link) onLinkActivated: Qt.openUrlExternally(link)
} }
} }
} }
Component{ Component{
id:textcomponent id:textcomponent
Text{ Label{
id:namelabeltext id:namelabeltext
color: osSettings.primaryTextColor
width: namelabelflickable.width width: namelabelflickable.width
height: implicitHeight height: implicitHeight
font.pointSize: osSettings.bigFontSize font.pointSize: osSettings.bigFontSize

View file

@ -179,69 +179,52 @@ ApplicationWindow{
else {rootstack.currentIndex=0;close.accepted=false} else {rootstack.currentIndex=0;close.accepted=false}
} }
Rectangle{ footer: TabBar{
anchors.fill: parent
color: osSettings.backgroundColor
}
footer: ToolBar{
id: roottoolbar
width:root.width width:root.width
background: Rectangle{ id: bar
anchors.fill: parent onCurrentIndexChanged: {
color: osSettings.backgroundDimColor rootstack.currentIndex=bar.currentIndex;
try{while(rootstackView.depth>1){rootstackView.pop()}}catch(e){}
} }
RowLayout{ TabButton {
anchors.fill: parent ToolTip.visible: pressed || hovered
ToolTip.text: qsTr("Posts")
TabBar { width: root.width/4
id: bar Label {
Layout.fillWidth: true text: "\uf03a"
onCurrentIndexChanged: { anchors.centerIn: parent
rootstack.currentIndex=bar.currentIndex; font.family: fontAwesome.name
try{while(rootstackView.depth>1){rootstackView.pop()}}catch(e){} }
} onDoubleClicked: {newstypeSignal("refresh")}
TabButton { }
font.family: fontAwesome.name TabButton {
text: "\uf03a" ToolTip.visible: pressed || hovered
background:Rectangle{ ToolTip.text: qsTr("Contacts")
anchors.fill: parent width: root.width/4
color: osSettings.backgroundDimColor Label {
} text: "\uf0c0"
ToolTip.visible: pressed || hovered anchors.centerIn: parent
ToolTip.text: qsTr("Posts") font.family: fontAwesome.name
onDoubleClicked: {newstypeSignal("refresh")} }
} }
TabButton { TabButton {
font.family: fontAwesome.name ToolTip.visible: pressed || hovered
text: "\uf0c0" ToolTip.text: qsTr("Photos")
background:Rectangle{ width: root.width/4
anchors.fill: parent Label {
color: osSettings.backgroundDimColor text: "\uf03e"
} anchors.centerIn: parent
ToolTip.visible: pressed || hovered font.family: fontAwesome.name
ToolTip.text: qsTr("Contacts") }
} }
TabButton { TabButton {
font.family: fontAwesome.name ToolTip.visible: pressed || hovered
text: "\uf03e" ToolTip.text: qsTr("Calendar")
background:Rectangle{ width: root.width/4
anchors.fill: parent Label {
color: osSettings.backgroundDimColor text: "\uf073"
} anchors.centerIn: parent
ToolTip.visible: pressed || hovered font.family: fontAwesome.name
ToolTip.text: qsTr("Photos")
}
TabButton {
font.family: fontAwesome.name
text: "\uf073"
background:Rectangle{
anchors.fill: parent
color: osSettings.backgroundDimColor
}
ToolTip.visible: pressed || hovered
ToolTip.text: qsTr("Calendar")
}
} }
} }
} }
@ -250,7 +233,7 @@ ApplicationWindow{
//y:roottoolbar.height //y:roottoolbar.height
//anchors.fill: parent //anchors.fill: parent
width:root.width width:root.width
height: root.height-roottoolbar.contentHeight height: root.height-bar.contentHeight
initialItem: StackLayout{ initialItem: StackLayout{
id:rootstack id:rootstack
width:rootstackView.width width:rootstackView.width

View file

@ -30,6 +30,8 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
import QtQuick 2.0 import QtQuick 2.0
import QtQuick.Controls 2.12
Rectangle{ Rectangle{
id: blueButton id: blueButton
width: Math.max(mainText.width+2*mm,5*mm) width: Math.max(mainText.width+2*mm,5*mm)
@ -45,9 +47,8 @@ Rectangle{
signal clicked signal clicked
state:"" state:""
Text{ Label{
id:mainText id:mainText
color: osSettings.primaryTextColor
anchors.centerIn: parent anchors.centerIn: parent
width: contentWidth width: contentWidth
height: contentHeight height: contentHeight

View file

@ -28,18 +28,23 @@
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
import QtQuick 2.9
import QtQuick.Controls 6.3 import QtQuick 2.0
import QtQuick.Controls 2.12
Button{ Button{
id: mButton id: closeButton
property alias color: bg.color width: height
width: Math.max(implicitContentWidth+2*mm,3*root.fontFactor*osSettings.bigFontSize) anchors.topMargin: mm
//radius: mm anchors.right: parent.right
height: 2.5*root.fontFactor*osSettings.bigFontSize anchors.rightMargin: mm
//color: Material.foreground onClicked: {
font.family: fontAwesome.name rootstackView.pop()
font.pointSize: osSettings.bigFontSize }
//highlighted:true
background: Rectangle{id:bg;color: osSettings.dialogColor; Label {
radius: 0.5*mm} anchors.centerIn: parent
font.family: fontAwesome.name
text: "\uf057"
}
} }

View file

@ -40,43 +40,12 @@ import "qrc:/qml/genericqml"
Item{ Item{
id:imageDialog id:imageDialog
z:2 z:2
// border.color: "grey"
// color: Material.backgroundColor
// width: parent.width-root.fontFactor*osSettings.bigFontSize
// height: parent.height-3*root.fontFactor*osSettings.bigFontSize
// x: 0.5*root.fontFactor*osSettings.bigFontSize
// y: 2*root.fontFactor*osSettings.bigFontSize
property string directory: "" property string directory: ""
property bool multiple: false property bool multiple: false
property string imageUrl: "" property string imageUrl: ""
//property var imageUrls: []
signal ready(); signal ready();
function pickImage() {imageFileDialog.open()} function pickImage() {imageFileDialog.open()}
// Text{
// id:directoryText
// anchors.bottom: parent.bottom
//// x:0.5*mm
//// y:0.5*mm
// width: imageDialog.width-3.5*root.fontFactor*osSettings.bigFontSize
// height:contentHeight
// font.pointSize: osSettings.bigFontSize
// wrapMode: Text.Wrap
// text: directory
// color: Material.primaryTextColor
// }
// Button{
// id:closeButton
// height: 2*root.fontFactor*osSettings.bigFontSize
// anchors.top: parent.top
// anchors.topMargin: 0.5*mm
// anchors.right: parent.right
// anchors.rightMargin: 1*mm
// text: "\uf057"
// onClicked:{
// ready();imageDialog.destroy()
// }
// }
FileDialog { FileDialog {
id: imageFileDialog id: imageFileDialog
title: "Please choose a file" title: "Please choose a file"
@ -89,120 +58,4 @@ Item{
ready(); ready();
} }
} }
// ListView {
// id: imageView
// x:0.5*mm
// y: 2.5*root.fontFactor*osSettings.bigFontSize//Math.max(directoryText.height, closeButton.height)+mm
// width: parent.width-2*mm
// height: parent.height-3*root.fontFactor*osSettings.bigFontSize
// boundsBehavior:Flickable.StopAtBounds
// clip: true
// model: imageModel
// delegate: imageItem
// ScrollBar.vertical: ScrollBar { }
// }
// FolderListModel{
// id: imageModel
// nameFilters: ["*.png", "*.jpg",".jpeg","*.JPG","*.gif"]
// sortField: FolderListModel.Time
// sortReversed:false
// showDotAndDotDot: true
// showDirs: true
// showDirsFirst: true
// folder:directory
// }
// BusyIndicator{
// id: imageBusy
// anchors.horizontalCenter: imageView.horizontalCenter
// anchors.top:imageView.top
// anchors.topMargin: 2*mm
// width: 2*root.fontFactor*osSettings.bigFontSize
// height: 2*root.fontFactor*osSettings.bigFontSize
// running:false
// }
// Component{
// id:imageItem
// Item{
// width:imageView.width
// height: Math.max(fileImage.height,1.5*root.fontFactor*osSettings.bigFontSize)+2*mm
// Rectangle{
// id:imagetextRectangle
// color:"black"
// x:mm
// z:3
// opacity: fileIsDir?0:0.5
// width:imagetext.contentWidth
// height: imagetext.contentHeight
// anchors.bottom: fileImage.bottom
// }
// Text {
// id:imagetext
// x: mm//fileIsDir?11*mm:mm
// z:4
// text: fileIsDir?"\uf07b "+fileName:fileName
// width: fileIsDir?parent.width - 2.5*root.fontFactor*osSettings.bigFontSize :imageView.width-mm
// anchors.bottom: fileImage.bottom
// color: fileIsDir?Material.primaryTextColor:"white"
// font.pointSize: osSettings.bigFontSize
// wrapMode:Text.Wrap
// }
// Text {
// id:selected
// anchors.right:parent.right
// visible: attachImageURLs.indexOf(fileURL)>-1
// z:4
// text: "\u2713"
// width: 2*root.fontFactor*osSettings.bigFontSize
// anchors.top: fileImage.top
// color: "green"
// font.pointSize: 3*osSettings.bigFontSize
// }
// Image{id:fileImage
// width: imageView.width-mm
// fillMode:Image.PreserveAspectFit
// source:fileIsDir?"":fileURL
// }
// MouseArea{
// anchors.fill: parent
// onClicked:{
// if (fileName==".."){
// imageModel.folder=imageModel.parentFolder;
// directory=imageModel.parentFolder
// }
// else if (fileIsDir){
// imageModel.folder=fileURL;
// directory=fileURL
// }
// else{
// if (multiple!=true){
// //attachImageURLs.push(fileURL);
// //attachImage(fileURL);
// imageUrls.push(fileURL);
// imageUrl=fileURL;
// ready();
// imageDialog.destroy()
// }
// else {
// if(selected.visible==true){
// imageUrls.splice(imageUrls.indexOf(fileURL,1))
// selected.visible=false
// }
// else{
// imageUrls.push(fileURL);
// selected.visible=true;
// }
// imageUrl=fileURL
// }
// }
// }
// }
// }
// }
// Component.onCompleted: imageFileDialog.open()
} }

View file

@ -62,10 +62,9 @@ Rectangle{
} }
} }
Text{ //cid not working in Friendica 02/2022 Label{ //cid not working in Friendica 02/2022
x:0.5*mm x:0.5*mm
y:0.5*mm y:0.5*mm
color: osSettings.primaryTextColor
text: qsTr("Friends") text: qsTr("Friends")
} }
ListView { ListView {
@ -95,8 +94,7 @@ Rectangle{
else if (contactstatus=="negative"){contactitemRect.color= "red"} else if (contactstatus=="negative"){contactitemRect.color= "red"}
else{contactitemRect.color= osSettings.backgroundColor}} else{contactitemRect.color= osSettings.backgroundColor}}
//border.color:Material.frameColor //border.color:Material.frameColor
Text{ Label{
color: osSettings.primaryTextColor
text:contact.screen_name text:contact.screen_name
} }
MouseArea{ MouseArea{
@ -124,8 +122,7 @@ Rectangle{
else {contactstatus="neutral"} } else {contactstatus="neutral"} }
} }
} }
Text{ Label{
color: osSettings.primaryTextColor
x:contactView.width+2*mm x:contactView.width+2*mm
y:0.5*mm y:0.5*mm
text: qsTr("Groups") text: qsTr("Groups")
@ -157,8 +154,7 @@ Rectangle{
else{groupitemRect.color= osSettings.backgroundColor}} else{groupitemRect.color= osSettings.backgroundColor}}
color: osSettings.backgroundColor color: osSettings.backgroundColor
//border.color: Material.frameColor //border.color: Material.frameColor
Text{ Label{
color: osSettings.primaryTextColor
text:group.groupname text:group.groupname
} }
MouseArea{ MouseArea{
@ -182,7 +178,7 @@ Rectangle{
else {groupstatus="neutral"} } else {groupstatus="neutral"} }
} }
} }
MButton{ Button{
x:0.5*mm x:0.5*mm
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.bottomMargin:1 anchors.bottomMargin:1
@ -194,7 +190,7 @@ Rectangle{
Service.savePermissions(db,perms) Service.savePermissions(db,perms)
} }
} }
MButton{ Button{
x:contactView.width+2*mm x:contactView.width+2*mm
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.bottomMargin:1 anchors.bottomMargin:1

View file

@ -162,7 +162,7 @@ Page {
y: mm y: mm
spacing:4 spacing:4
MButton{ Button{
id:photobutton id:photobutton
height: 6*mm height: 6*mm
width: 8*mm width: 8*mm
@ -179,7 +179,7 @@ Page {
} }
} }
MButton{ Button{
id:dmbutton id:dmbutton
height: 6*mm height: 6*mm
width: 8*mm width: 8*mm
@ -192,7 +192,7 @@ Page {
} }
} }
MButton{ Button{
id:eventbutton id:eventbutton
visible:(contact.network=="dfrn") visible:(contact.network=="dfrn")
height: 6*mm height: 6*mm
@ -206,7 +206,7 @@ Page {
rootstackView.pop() rootstackView.pop()
} }
} }
MButton{ Button{
id:approvebutton id:approvebutton
visible:(contact.hasOwnProperty("acct")&&!contact.searchContact) visible:(contact.hasOwnProperty("acct")&&!contact.searchContact)
height: 6*mm height: 6*mm
@ -220,7 +220,7 @@ Page {
rootstackView.pop() rootstackView.pop()
} }
} }
MButton{ Button{
id:rejectbutton id:rejectbutton
visible:(contact.hasOwnProperty("acct")&&!contact.searchContact) visible:(contact.hasOwnProperty("acct")&&!contact.searchContact)
height: 6*mm height: 6*mm
@ -234,7 +234,7 @@ Page {
rootstackView.pop() rootstackView.pop()
} }
} }
MButton{ Button{
id:ignorebutton id:ignorebutton
visible:(contact.hasOwnProperty("acct")&&!contact.searchContact) visible:(contact.hasOwnProperty("acct")&&!contact.searchContact)
height: 6*mm height: 6*mm
@ -248,7 +248,7 @@ Page {
rootstackView.pop() rootstackView.pop()
} }
} }
MButton{ Button{
id:followbutton id:followbutton
visible:(contact.isFriend==0 || !contact.hasOwnProperty("isFriend")) visible:(contact.isFriend==0 || !contact.hasOwnProperty("isFriend"))
height: 6*mm height: 6*mm
@ -264,7 +264,7 @@ Page {
} }
} }
MButton{ Button{
id:unfollowbutton id:unfollowbutton
visible:(contact.isFriend==1) visible:(contact.isFriend==1)
height: 6*mm height: 6*mm
@ -279,7 +279,7 @@ Page {
} }
} }
MButton{ Button{
id: blockbutton id: blockbutton
visible:(contact.statusnet_blocking!=1) visible:(contact.statusnet_blocking!=1)
height: 6*mm height: 6*mm
@ -295,7 +295,7 @@ Page {
} }
} }
MButton{ Button{
id: unblockbutton id: unblockbutton
visible:(contact.statusnet_blocking==1) visible:(contact.statusnet_blocking==1)
height: 6*mm height: 6*mm
@ -318,14 +318,13 @@ Page {
height: implicitHeight height: implicitHeight
text:contact.name+" (@"+contact.screen_name+")" text:contact.name+" (@"+contact.screen_name+")"
wrapMode: Text.Wrap wrapMode: Text.Wrap
color: osSettings.primaryTextColor
font.pointSize: 1.2*osSettings.bigFontSize font.pointSize: 1.2*osSettings.bigFontSize
font.family: "Noto Sans" font.family: "Noto Sans"
anchors.top: contactView.width<35*root.fontFactor*osSettings.systemFontSize?profileImage.bottom:buttonflow.bottom anchors.top: contactView.width<35*root.fontFactor*osSettings.systemFontSize?profileImage.bottom:buttonflow.bottom
anchors.margins: mm anchors.margins: mm
anchors.left: contactView.width<35*root.fontFactor*osSettings.systemFontSize?contactView.left:profileImage.right anchors.left: contactView.width<35*root.fontFactor*osSettings.systemFontSize?contactView.left:profileImage.right
} }
Text{ Label{
id:detailtext id:detailtext
anchors.top: namelabel.bottom anchors.top: namelabel.bottom
anchors.left: contactView.width<35*root.fontFactor*osSettings.systemFontSize?contactView.left:profileImage.right anchors.left: contactView.width<35*root.fontFactor*osSettings.systemFontSize?contactView.left:profileImage.right
@ -336,7 +335,6 @@ Page {
font.family: "Noto Sans" font.family: "Noto Sans"
textFormat:Text.RichText textFormat:Text.RichText
wrapMode: Text.Wrap wrapMode: Text.Wrap
color: osSettings.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+ 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>"+ "<br> <b>"+qsTr("URL")+":</b> <a href='"+ contact.url+"'>"+contact.url+"</a><br>"+
"<b>"+qsTr("Created at")+":</b> "+createdAtDate.toLocaleString(Qt.locale())+"<br>"+ "<b>"+qsTr("Created at")+":</b> "+createdAtDate.toLocaleString(Qt.locale())+"<br>"+
@ -383,7 +381,7 @@ Page {
source: "qrc:/js/newsworker.js" source: "qrc:/js/newsworker.js"
} }
MButton { Button {
id: closeButton id: closeButton
anchors.top: parent.top anchors.top: parent.top
anchors.topMargin: 0.5*root.fontFactor*osSettings.bigFontSize anchors.topMargin: 0.5*root.fontFactor*osSettings.bigFontSize

View file

@ -142,7 +142,7 @@ Page {
source: "qrc:/js/newsworker.js" source: "qrc:/js/newsworker.js"
} }
MButton { Button {
id: closeButton id: closeButton
anchors.top: parent.top anchors.top: parent.top
anchors.topMargin: 1*mm anchors.topMargin: 1*mm

View file

@ -1,4 +1,4 @@
// This file is part of Friendiqa s// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa // https://git.friendi.ca/lubuwest/Friendiqa
// Copyright (C) 2020 Marco R. <thomasschmidt45@gmx.net> // Copyright (C) 2020 Marco R. <thomasschmidt45@gmx.net>
// //
@ -75,8 +75,7 @@ Rectangle {
source:(contact.profile_image!="")? "file://"+contact.profile_image : contact.profile_image_url source:(contact.profile_image!="")? "file://"+contact.profile_image : contact.profile_image_url
onStatusChanged: if (contactImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"} onStatusChanged: if (contactImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"}
} }
Text{ Label{
color: osSettings.primaryTextColor
font.pointSize: osSettings.bigFontSize font.pointSize: osSettings.bigFontSize
anchors.left: contactImage.right anchors.left: contactImage.right
anchors.margins: 1*mm anchors.margins: 1*mm
@ -90,7 +89,7 @@ Rectangle {
} }
} }
MButton { Button {
id: closeButton id: closeButton
anchors.top: parent.top anchors.top: parent.top
anchors.topMargin: 1*mm anchors.topMargin: 1*mm

View file

@ -38,7 +38,7 @@ Rectangle {
radius:0.3*mm radius:0.3*mm
width:hashtagText.contentWidth+mm width:hashtagText.contentWidth+mm
height:root.fontFactor*osSettings.bigFontSize height:root.fontFactor*osSettings.bigFontSize
Text{ Label{
id:hashtagText id:hashtagText
font.pointSize: osSettings.systemFontSize font.pointSize: osSettings.systemFontSize
color: osSettings.secondaryTextColor color: osSettings.secondaryTextColor

View file

@ -195,7 +195,7 @@ Page{
anchors.right: uploadImage.right anchors.right: uploadImage.right
color: "black" color: "black"
opacity: 0.5 opacity: 0.5
Text{anchors.centerIn:parent;font.family: fontAwesome.name;text: "\uf01e";color: "white"} Label{anchors.centerIn:parent;font.family: fontAwesome.name;text: "\uf01e";color: "white"}
MouseArea{ MouseArea{
anchors.fill:parent; anchors.fill:parent;
onClicked:{ onClicked:{
@ -214,7 +214,7 @@ Page{
anchors.left: uploadImage.left anchors.left: uploadImage.left
color: "black" color: "black"
opacity: 0.5 opacity: 0.5
Text{anchors.centerIn:parent;font.family: fontAwesome.name; text: "\uf00d";color: "white"} Label{anchors.centerIn:parent;font.family: fontAwesome.name; text: "\uf00d";color: "white"}
MouseArea{ MouseArea{
anchors.fill:parent; anchors.fill:parent;
onClicked:{ onClicked:{
@ -223,7 +223,7 @@ Page{
} }
} }
Text { Label {
id:uploadedArrow id:uploadedArrow
anchors.right:uploadImage.right anchors.right:uploadImage.right
visible: imageUploaded visible: imageUploaded

View file

@ -379,7 +379,7 @@ Window{
bodyField.cursorPosition=bodyField.cursorPosition+hashtag.length+1 bodyField.cursorPosition=bodyField.cursorPosition+hashtag.length+1
tagSelector.visible=false tagSelector.visible=false
} }
delegate: MButton {text:tag;onClicked: tagSelector.processTagSelection(tag)} delegate: Button {text:tag;onClicked: tagSelector.processTagSelection(tag)}
} }
ListModel{id:tagModel} ListModel{id:tagModel}
Row{ Row{
@ -388,7 +388,7 @@ Window{
spacing: mm spacing: mm
height: 3.5*root.fontFactor*osSettings.bigFontSize height: 3.5*root.fontFactor*osSettings.bigFontSize
x: 0.5*mm x: 0.5*mm
MButton { Button {
id: boldButton id: boldButton
text: "\uf032" // icon-bold text: "\uf032" // icon-bold
ToolTip.delay: 500 ToolTip.delay: 500
@ -404,7 +404,7 @@ Window{
bodyField.forceActiveFocus() bodyField.forceActiveFocus()
} }
} }
MButton { Button {
id: italicButton id: italicButton
text: "\uf033" // icon-italic text: "\uf033" // icon-italic
ToolTip.delay: 500 ToolTip.delay: 500
@ -417,7 +417,7 @@ Window{
onClicked: {document.italic = !document.italic;bodyField.forceActiveFocus()} onClicked: {document.italic = !document.italic;bodyField.forceActiveFocus()}
} }
MButton { Button {
id: liststyleButton id: liststyleButton
text: "\uf03a" // icon-align-justify text: "\uf03a" // icon-align-justify
ToolTip.delay: 500 ToolTip.delay: 500
@ -428,7 +428,7 @@ Window{
// checked: document.alignment == Qt.AlignJustify // checked: document.alignment == Qt.AlignJustify
onClicked: {document.liststyle = !document.liststyle;bodyField.forceActiveFocus()} onClicked: {document.liststyle = !document.liststyle;bodyField.forceActiveFocus()}
} }
MButton { Button {
id: codeblockButton id: codeblockButton
text: "\uf121" // icon-code text: "\uf121" // icon-code
ToolTip.delay: 500 ToolTip.delay: 500
@ -439,7 +439,7 @@ Window{
// checked: document.alignment == Qt.AlignJustify // checked: document.alignment == Qt.AlignJustify
onClicked: {document.codeblock = !document.codeblock;bodyField.forceActiveFocus()} onClicked: {document.codeblock = !document.codeblock;bodyField.forceActiveFocus()}
} }
MButton { Button {
id: plainButton id: plainButton
text: bodyField.textFormat==TextEdit.PlainText?qsTr("Rendered"):qsTr("MD") // icon-code text: bodyField.textFormat==TextEdit.PlainText?qsTr("Rendered"):qsTr("MD") // icon-code
ToolTip.delay: 500 ToolTip.delay: 500
@ -466,7 +466,7 @@ Window{
height: 3.5*root.fontFactor*osSettings.bigFontSize height: 3.5*root.fontFactor*osSettings.bigFontSize
x: 0.5*mm x: 0.5*mm
// MButton{id:permButton //Permissions not working in Friendica 02/2022 // Button{id:permButton //Permissions not working in Friendica 02/2022
// visible: !conversation && (newsSwipeview.stacktype!=="DirectMessages") // visible: !conversation && (newsSwipeview.stacktype!=="DirectMessages")
// height: 2*root.fontFactor*osSettings.bigFontSize // height: 2*root.fontFactor*osSettings.bigFontSize
// width: 2*root.fontFactor*osSettings.bigFontSize // width: 2*root.fontFactor*osSettings.bigFontSize
@ -474,7 +474,7 @@ Window{
// onClicked: { if (permissionDialog.visible==false){permissionDialog.visible=true} else{permissionDialog.visible=false}} // onClicked: { if (permissionDialog.visible==false){permissionDialog.visible=true} else{permissionDialog.visible=false}}
// } // }
MButton{ Button{
id:smileyButton id:smileyButton
text: "\uf118" text: "\uf118"
ToolTip.delay: 500 ToolTip.delay: 500
@ -485,7 +485,7 @@ Window{
onClicked: {if (smileyDialog.visible==false){smileyDialog.visible=true} else{smileyDialog.visible=false}} onClicked: {if (smileyDialog.visible==false){smileyDialog.visible=true} else{smileyDialog.visible=false}}
} }
MButton{ Button{
id:hastagButton id:hastagButton
text: "\uf292" text: "\uf292"
ToolTip.delay: 500 ToolTip.delay: 500
@ -495,7 +495,7 @@ Window{
width: 3*root.fontFactor*osSettings.bigFontSize width: 3*root.fontFactor*osSettings.bigFontSize
onClicked: {if (tagSelector.visible==false){hashtagmenu()} else{tagSelector.visible=false}} onClicked: {if (tagSelector.visible==false){hashtagmenu()} else{tagSelector.visible=false}}
} }
MButton{ Button{
id:imagesButton id:imagesButton
visible:(newsSwipeview.stacktype!="DirectMessages") visible:(newsSwipeview.stacktype!="DirectMessages")
text: "\uf03e" text: "\uf03e"
@ -512,7 +512,7 @@ Window{
else{imageUploadDialog.visible=false}} else{imageUploadDialog.visible=false}}
} }
MButton { Button {
id: cancelButton id: cancelButton
ToolTip.delay: 500 ToolTip.delay: 500
ToolTip.visible: pressed || hovered ToolTip.visible: pressed || hovered
@ -522,7 +522,7 @@ Window{
text: "\uf057" text: "\uf057"
onClicked: {messageSend.close()} onClicked: {messageSend.close()}
} }
MButton { Button {
id: formatButton id: formatButton
ToolTip.delay: 500 ToolTip.delay: 500
ToolTip.visible: pressed || hovered ToolTip.visible: pressed || hovered
@ -532,7 +532,7 @@ Window{
text: "\uf031" text: "\uf031"
onClicked: {formatRow.visible?formatRow.visible=false:formatRow.visible=true} onClicked: {formatRow.visible?formatRow.visible=false:formatRow.visible=true}
} }
MButton { Button {
id: sendButton id: sendButton
ToolTip.delay: 500 ToolTip.delay: 500
ToolTip.visible: pressed || hovered ToolTip.visible: pressed || hovered

View file

@ -42,7 +42,7 @@ Rectangle{
signal clicked signal clicked
state:"" state:""
Text{ Label{
id:mainText id:mainText
color: "grey" color: "grey"
anchors.right: parent.right anchors.right: parent.right

View file

@ -45,7 +45,7 @@ AnimatedImage {id:gif;
height: imageCountText.contentHeight+mm height: imageCountText.contentHeight+mm
x: (gif.width-gif.paintedWidth)/2+gif.paintedWidth-width x: (gif.width-gif.paintedWidth)/2+gif.paintedWidth-width
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
Text { Label {
anchors.centerIn: parent anchors.centerIn: parent
id: imageCountText id: imageCountText
text: "+ " + (model.newsitemobject.imageAttachmentList.length-1).toString() text: "+ " + (model.newsitemobject.imageAttachmentList.length-1).toString()

View file

@ -58,7 +58,7 @@ Page{
id: photolistModel id: photolistModel
} }
MButton { Button {
id: closeButton id: closeButton
z:2 z:2
anchors.top: parent.top anchors.top: parent.top

View file

@ -335,8 +335,7 @@ Rectangle{
border.width: 1 border.width: 1
width:newsView.width width:newsView.width
height:6*mm height:6*mm
Text{ Label{
color: osSettings.primaryTextColor
font.pointSize: osSettings.systemFontSize font.pointSize: osSettings.systemFontSize
anchors.centerIn: parent anchors.centerIn: parent
text:qsTr("More") text:qsTr("More")
@ -482,7 +481,7 @@ Rectangle{
source: "qrc:/js/newsworker.js" source: "qrc:/js/newsworker.js"
} }
Text { Label {
id: closeButton id: closeButton
//Svisible: !(globaloptions.defaultNewsTypes.indexOf(newsSwipeview.stacktype)>-1) //Svisible: !(globaloptions.defaultNewsTypes.indexOf(newsSwipeview.stacktype)>-1)
anchors.top: parent.top anchors.top: parent.top
@ -523,7 +522,7 @@ Rectangle{
height: noticeText.height+2*mm height: noticeText.height+2*mm
visible: (downloadNotice.text!="") visible: (downloadNotice.text!="")
Text{ Label{
id:noticeText id:noticeText
color: "grey" color: "grey"
anchors.centerIn: parent anchors.centerIn: parent

View file

@ -129,7 +129,7 @@ Page{
function getIcon(typerequest){ function getIcon(typerequest){
switch (typerequest){ switch (typerequest){
case "Home": return "\uf015" case "Home": return "\uf015";
case "Favorites": return "\uf005"; case "Favorites": return "\uf005";
case "Replies": return "\uf0ec"; case "Replies": return "\uf0ec";
case "DirectMessages": return "\uf0e0"; case "DirectMessages": return "\uf0e0";
@ -173,14 +173,17 @@ Page{
leftDrawerAndroid.visible?leftDrawerAndroid.close():leftDrawerAndroid.open()} leftDrawerAndroid.visible?leftDrawerAndroid.close():leftDrawerAndroid.open()}
} }
MButton{ Button{
z:2 z:2
anchors.right: parent.right anchors.right: parent.right
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
// fontColor: "grey"
// border.color: "transparent" Label {
text: "\uf040" anchors.centerIn: parent
font.pointSize: osSettings.bigFontSize font.family: fontAwesome.name
text: "\uf040"
}
onClicked:{ onClicked:{
if (newsSwipeview.stacktype=="DirectMessages"){openMessageSend("directmessage","")} if (newsSwipeview.stacktype=="DirectMessages"){openMessageSend("directmessage","")}
else {openMessageSend("active","")} else {openMessageSend("active","")}
@ -225,6 +228,7 @@ Page{
onCurrentIndexChanged: { onCurrentIndexChanged: {
if(newstypes[currentIndex]){stacktype=newstypes[currentIndex]} if(newstypes[currentIndex]){stacktype=newstypes[currentIndex]}
else{stacktype="Home"} else{stacktype="Home"}
newstabbar.currentIndex=newsSwipeview.currentIndex;
} }
Loader{ Loader{

View file

@ -34,18 +34,17 @@ import QtQuick.Controls 6.3
TabButton { TabButton {
id: tabbutton id: tabbutton
font.family: fontAwesome.name
font.pointSize : osSettings.bigFontSize
width: newstabbar.width/5 width: newstabbar.width/5
property string buttontype: "" property string buttontype: ""
text: getIcon(buttontype)
background:Rectangle{
anchors.fill: parent
color: osSettings.backgroundDimColor
border.color: newstypes[newsSwipeview.currentIndex]==buttontype?osSettings.accentColor:color
}
ToolTip.delay: 500 ToolTip.delay: 500
ToolTip.visible: pressed || hovered ToolTip.visible: pressed || hovered
ToolTip.text: qsTr(buttontype) ToolTip.text: qsTr(buttontype)
onDoubleClicked: {newstypeSignal(buttontype)} onDoubleClicked: {newstypeSignal(buttontype)}
Label {
anchors.centerIn: parent
font.family: fontAwesome.name
text: getIcon(buttontype)
}
} }

View file

@ -36,7 +36,7 @@ Rectangle{
width:toprow.width/2; width:toprow.width/2;
height:toprow.width/3//video.hasVideo?newscolumn.width/4*3:10*mm height:toprow.width/3//video.hasVideo?newscolumn.width/4*3:10*mm
property var attachment:({}) property var attachment:({})
Text{ Label{
id:noticeText id:noticeText
text:"\uf144"; text:"\uf144";
color:"light grey" color:"light grey"

View file

@ -41,7 +41,7 @@ Page{
width:root.width; width:root.width;
height:root.height-3*root.fontFactor*osSettings.bigFontSize height:root.height-3*root.fontFactor*osSettings.bigFontSize
property alias source:video.source property alias source:video.source
Text{ Label{
id:noticeText id:noticeText
text:"" text:""
color:"light grey" color:"light grey"
@ -92,7 +92,7 @@ Page{
value: video.bufferProgress value: video.bufferProgress
} }
MButton { Button {
id: closeButton id: closeButton
z:2 z:2
anchors.top: parent.top anchors.top: parent.top

View file

@ -138,8 +138,7 @@ Item {
width: toprow.width-2 width: toprow.width-2
height: itemMessage.height height: itemMessage.height
onClicked: {pushConversation()} onClicked: {pushConversation()}
Text { Label {
color: osSettings.primaryTextColor
linkColor: osSettings.accentColor linkColor: osSettings.accentColor
id: itemMessage id: itemMessage
textFormat: Text.RichText textFormat: Text.RichText
@ -284,7 +283,7 @@ Item {
implicitWidth: newsitem.width/5 implicitWidth: newsitem.width/5
implicitHeight:root.fontFactor*osSettings.bigFontSize implicitHeight:root.fontFactor*osSettings.bigFontSize
color:"transparent" color:"transparent"
Text{ Label{
anchors.centerIn: parent anchors.centerIn: parent
font.pointSize: osSettings.bigFontSize font.pointSize: osSettings.bigFontSize
font.family:fontAwesome.name font.family:fontAwesome.name
@ -313,7 +312,7 @@ Item {
implicitWidth: newsitem.width/5 implicitWidth: newsitem.width/5
implicitHeight:root.fontFactor*osSettings.bigFontSize implicitHeight:root.fontFactor*osSettings.bigFontSize
color:"transparent" color:"transparent"
Text{ Label{
anchors.centerIn: parent anchors.centerIn: parent
font.pointSize: osSettings.bigFontSize font.pointSize: osSettings.bigFontSize
font.family:fontAwesome.name font.family:fontAwesome.name
@ -342,7 +341,7 @@ Item {
implicitWidth: newsitem.width/5 implicitWidth: newsitem.width/5
implicitHeight:root.fontFactor*osSettings.bigFontSize implicitHeight:root.fontFactor*osSettings.bigFontSize
color:"transparent" color:"transparent"
Text{ Label{
anchors.centerIn: parent anchors.centerIn: parent
font.pointSize: osSettings.bigFontSize font.pointSize: osSettings.bigFontSize
font.family:fontAwesome.name font.family:fontAwesome.name
@ -363,7 +362,7 @@ Item {
height: parent.height height: parent.height
visible:(newsitemobject.messagetype!==2) visible:(newsitemobject.messagetype!==2)
color:"transparent" color:"transparent"
Text{ Label{
id:replysymbol id:replysymbol
color: osSettings.secondaryTextColor color: osSettings.secondaryTextColor
anchors.centerIn: parent anchors.centerIn: parent
@ -399,7 +398,7 @@ Item {
height: parent.height height: parent.height
visible:(newsitemobject.messagetype!==2) visible:(newsitemobject.messagetype!==2)
color:"transparent" color:"transparent"
Text{ Label{
id:newsmenusymbol id:newsmenusymbol
color: osSettings.secondaryTextColor color: osSettings.secondaryTextColor
anchors.centerIn: parent anchors.centerIn: parent
@ -417,7 +416,7 @@ Item {
id:newsmenu id:newsmenu
width: 10*root.fontFactor*osSettings.systemFontSize width: 10*root.fontFactor*osSettings.systemFontSize
delegate: MenuItem{ delegate: MenuItem{
contentItem: Text{ contentItem: Label{
font.pointSize: osSettings.systemFontSize font.pointSize: osSettings.systemFontSize
color: osSettings.secondaryTextColor color: osSettings.secondaryTextColor
text: parent.text text: parent.text
@ -484,7 +483,7 @@ Item {
title: qsTr("Attending") title: qsTr("Attending")
width: 10*root.fontFactor*osSettings.systemFontSize width: 10*root.fontFactor*osSettings.systemFontSize
delegate: MenuItem{ delegate: MenuItem{
contentItem: Text{ contentItem: Label{
font.pointSize: osSettings.systemFontSize font.pointSize: osSettings.systemFontSize
color: osSettings.secondaryTextColor color: osSettings.secondaryTextColor
text: parent.text text: parent.text

View file

@ -61,7 +61,7 @@ Rectangle{
else{permButton.text="\uf023"} else{permButton.text="\uf023"}
}} }}
Text{ Label{
x:0.5*mm x:0.5*mm
y:0.5*mm y:0.5*mm
text: qsTr("Friends") text: qsTr("Friends")
@ -94,7 +94,7 @@ Rectangle{
else{contactitemRect.color= "white"}} else{contactitemRect.color= "white"}}
color: "white" color: "white"
border.color:"grey" border.color:"grey"
Text{ Label{
color:"grey" color:"grey"
text:contact.screen_name text:contact.screen_name
font.pixelSize: 2*mm font.pixelSize: 2*mm
@ -124,7 +124,7 @@ Rectangle{
else {contactstatus="neutral"} } else {contactstatus="neutral"} }
} }
} }
Text{ Label{
x:contactView.width+2*mm x:contactView.width+2*mm
y:0.5*mm y:0.5*mm
text: qsTr("Groups") text: qsTr("Groups")
@ -157,7 +157,7 @@ Rectangle{
else{groupitemRect.color= "white"}} else{groupitemRect.color= "white"}}
color: "white" color: "white"
border.color:"grey" border.color:"grey"
Text{ Label{
color:"grey" color:"grey"
text:group.groupname text:group.groupname
font.pixelSize: 2*mm font.pixelSize: 2*mm
@ -183,7 +183,7 @@ Rectangle{
else {groupstatus="neutral"} } else {groupstatus="neutral"} }
} }
} }
MButton{ Button{
x:0.5*mm x:0.5*mm
height: 6*mm height: 6*mm
width: 8*mm width: 8*mm
@ -197,7 +197,7 @@ Rectangle{
Service.savePermissions(db,perms) Service.savePermissions(db,perms)
} }
} }
MButton{ Button{
x:contactView.width+2*mm x:contactView.width+2*mm
height: 6*mm height: 6*mm
width: 8*mm width: 8*mm

View file

@ -43,7 +43,7 @@ Rectangle{
height:root.height/2 height:root.height/2
color: osSettings.backgroundColor color: osSettings.backgroundColor
MButton{ Button{
id:closeButton id:closeButton
anchors.top: parent.top anchors.top: parent.top
anchors.topMargin: 1*mm anchors.topMargin: 1*mm

View file

@ -136,7 +136,7 @@ Page{
// } // }
// } // }
MButton{ Button{
id:closeButton id:closeButton
text: "\uf057" text: "\uf057"
width: 2.5*root.fontFactor*osSettings.bigFontSize width: 2.5*root.fontFactor*osSettings.bigFontSize
@ -155,18 +155,6 @@ Page{
editable:true editable:true
model: albumModel model: albumModel
// delegate: ItemDelegate {
// width: album.width
// contentItem: Text {
// //text: modelData
// color: "white"
// font: album.font
// font.pixelSize: album.font.pixelSize
// elide: Text.ElideRight
// verticalAlignment: Text.AlignVCenter
// }
// //highlighted: album.highlightedIndex === index
// }
onAccepted: { onAccepted: {
if (find(currentText) === -1) { if (find(currentText) === -1) {
albumModel.append({text: editText}) albumModel.append({text: editText})
@ -176,20 +164,6 @@ Page{
} }
ListModel{id:albumModel} ListModel{id:albumModel}
// Text {
// text: qsTr("Album")
// x: 4*mm; y: 10*mm
// }
// Text {
// text: qsTr("Image")
// x: 4*mm; y: 17*mm
// }
// Text {
// text: qsTr("Description")
// x: 4*mm; y: 33*mm
// }
ListView{ ListView{
id: imageUploadView id: imageUploadView

View file

@ -71,7 +71,7 @@ Package {
height: phototext.contentHeight height: phototext.contentHeight
anchors.bottom: photoWrapper.bottom anchors.bottom: photoWrapper.bottom
} }
Text { Label {
id:phototext id:phototext
z:4 z:4
text: photoDescription.trim() text: photoDescription.trim()

View file

@ -204,7 +204,7 @@ StackView{
value: fotorectangle.currentimageno/fotorectangle.newimages.length value: fotorectangle.currentimageno/fotorectangle.newimages.length
} }
MButton{ Button{
id: uploadPhoto id: uploadPhoto
anchors.top: parent.top anchors.top: parent.top
anchors.topMargin: 0.5*mm anchors.topMargin: 0.5*mm
@ -214,7 +214,7 @@ StackView{
onClicked: {photoStack.push("qrc:/qml/photoqml/ImageUploadDialog.qml")} onClicked: {photoStack.push("qrc:/qml/photoqml/ImageUploadDialog.qml")}
} }
MButton{ Button{
id: updatePhotolist id: updatePhotolist
anchors.top: parent.top anchors.top: parent.top
anchors.topMargin: 0.5*mm anchors.topMargin: 0.5*mm
@ -241,7 +241,7 @@ StackView{
onClicked: {photoupdatemenu.popup()} onClicked: {photoupdatemenu.popup()}
} }
MButton{ Button{
id: phototabstatusButton id: phototabstatusButton
anchors.top: parent.top anchors.top: parent.top
anchors.topMargin: 0.5*mm anchors.topMargin: 0.5*mm
@ -291,8 +291,7 @@ StackView{
color: osSettings.dialogColor color: osSettings.dialogColor
width:12*mm width:12*mm
height:6*mm height:6*mm
Text{ Label{
color: osSettings.primaryTextColor
font.pointSize: 0.75*osSettings.systemFontSize font.pointSize: 0.75*osSettings.systemFontSize
anchors.centerIn: parent anchors.centerIn: parent
text:qsTr("More") text:qsTr("More")
@ -317,7 +316,7 @@ StackView{
ListView { width: parent.width; height:parent.height; model: visualphotoModel.parts.browser; interactive: false } ListView { width: parent.width; height:parent.height; model: visualphotoModel.parts.browser; interactive: false }
MButton { Button {
id: backButton id: backButton
text: "\uf057" text: "\uf057"
x: parent.width - backButton.width - root.fontFactor*osSettings.bigFontSize x: parent.width - backButton.width - root.fontFactor*osSettings.bigFontSize

View file

@ -85,7 +85,7 @@ Package {
height: albumtext.contentHeight height: albumtext.contentHeight
anchors.bottom: albumWrapper.bottom anchors.bottom: albumWrapper.bottom
} }
Text { Label {
id:albumtext id:albumtext
text: albumname text: albumname
width:albumWrapper.width-1*mm width:albumWrapper.width-1*mm