Commit 552da5d9 authored by camilo higuita's avatar camilo higuita

fixes

parent 2451e91a
......@@ -15,8 +15,8 @@ Maui.ApplicationWindow
{
id: root
title: qsTr("Contacts")
about.appDescription: qsTr("Union lists your contacts and keeps them synced across devices.")
about.appIcon: "qrc:/smartphone.svg"
Maui.App.description: qsTr("Union lists your contacts and keeps them synced across devices.")
Maui.App.iconName: "qrc:/smartphone.svg"
property int currentView : views.favs
readonly property var views : ({
......@@ -42,30 +42,12 @@ Maui.ApplicationWindow
leftIcon.visible: true
rightIcon.visible: false
// headBar.implicitHeight: toolBarHeight * 1.2
headBar.drawBorder: false
// headBarBGColor: backgroundColor
// headBarFGColor: textColor
property bool darkTheme : Maui.FM.loadSettings("dark", "theme", false) == "true"
// Maui.Dialog
// {
// id: _accountsForm
// defaultButtons: false
// maxHeight: 300* unit
// maxWidth: maxHeight
// Accounts.AddAccountForm {
// anchors.fill: parent
// appId: "org.maui.dialer"
// onAccountAdded: {
// console.log("Account Secret :", secret);
// }
// }
// }
mainMenu: [
mainMenu: [
MenuItem
{
checkable: true
......@@ -79,13 +61,6 @@ Maui.ApplicationWindow
if(isAndroid)
Maui.Android.statusbarColor(backgroundColor, !darkTheme)
}
},
MenuItem
{
checkable: true
text: qsTr("Accounts");
onTriggered: _accountsForm.open()
}
]
......@@ -93,20 +68,14 @@ Maui.ApplicationWindow
{
id: _dialerButton
icon.name: "call-start"
// icon.name: "dialer-pad"
// icon.color: currentView === views.dialer ? Kirigami.Theme.highlightColor : Kirigami.Theme.textColor
// text: qsTr("Dialer")
// visible: isAndroid
checked: currentView === views.dialer
onClicked: currentView = views.dialer
}
headBar.middleContent: Kirigami.ActionToolBar
{
display: isWide ? ToolButton.TextBesideIcon : ToolButton.IconOnly
actions: [
Kirigami.Action
{
id: _favsButton
......@@ -174,16 +143,14 @@ Maui.ApplicationWindow
{
id: _contacsView
list.query: ""
// altToolBars: isMobile
showAccountFilter: isAndroid
Rectangle
{
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.margins: space.huge
height: toolBarHeight
anchors.margins: Maui.Style.space.huge
height: Maui.Style.toolBarHeight
width: height
color: Kirigami.Theme.highlightColor
......@@ -199,25 +166,14 @@ Maui.ApplicationWindow
}
}
// headBarExit: false
headBar.drawBorder: false
// headBar.implicitHeight: toolBarHeight * 1.4
headBar.plegable: false
headBar.middleContent: Maui.TextField
{
id: _searchField
// height: toolBarHeightAlt
// anchors.centerIn: parent
Layout.preferredWidth: isWide ? _contacsView.width * 0.8 : _contacsView.view.width
focusReason : Qt.PopupFocusReason
// height: rowHeight
placeholderText: qsTr("Search %1 contacts... ".arg(_contacsView.view.count))
onAccepted: _contacsView.list.query = text
onCleared: _contacsView.list.reset()
// colorScheme.backgroundColor: cardColor
// colorScheme.borderColor: "transparent"
// colorScheme.textColor: textColor
onTextEdited: _contacsView.list.query = text
onTextChanged: _contacsView.list.query = text
}
......
......@@ -25,7 +25,7 @@ SwipeDelegate
property alias label3 : _label3
property alias label4 : _label4
property int radius : radiusV * 2
property int radius : Maui.Style.radiusV * 2
swipe.enabled: showMenuIcon
......@@ -61,10 +61,6 @@ SwipeDelegate
// border.color: Qt.rgba(_bg.color.r, _bg.color.g, _bg.color.b, swipe.position < 0)
radius: control.radius
// anchors.fill: control
RowLayout
{
id: _layout
......@@ -78,7 +74,7 @@ SwipeDelegate
visible: control.width > Kirigami.Units.gridUnit * 15
Layout.fillHeight: true
Layout.preferredWidth: iconSizes.huge
Layout.preferredWidth: Maui.Style.iconSizes.huge
clip: true
Rectangle
......@@ -144,7 +140,6 @@ SwipeDelegate
width: _img.width
height: _img.height
radius: control.radius
// border.color: borderColor
}
}
}
......@@ -155,21 +150,13 @@ SwipeDelegate
{
id: _iconComponent
// ToolButton
// {
// icon.name: "view-media-artist"
// size: iconSizes.big
// icon.color: "white"
// }
Label
{
anchors.fill: parent
horizontalAlignment: Qt.AlignHCenter
verticalAlignment: Qt.AlignVCenter
color: "white"
font.pointSize: fontSizes.huge
font.pointSize: Maui.Style.fontSizes.huge
font.bold: true
font.weight: Font.Bold
text: model.n[0].toUpperCase()
......@@ -198,7 +185,7 @@ SwipeDelegate
Layout.fillHeight: visible
Layout.fillWidth: visible
text: model.n
font.pointSize: fontSizes.big
font.pointSize: Maui.Style.fontSizes.big
font.bold: true
font.weight: Font.Bold
elide: Text.ElideMiddle
......@@ -212,7 +199,7 @@ SwipeDelegate
Layout.fillHeight: visible
Layout.fillWidth: visible
text: model.tel
font.pointSize: fontSizes.small
font.pointSize: Maui.Style.fontSizes.small
font.weight: Font.Light
wrapMode: Text.WrapAnywhere
elide: Text.ElideMiddle
......@@ -226,7 +213,6 @@ SwipeDelegate
visible: control.width > Kirigami.Units.gridUnit * 30
Layout.fillHeight: visible
Layout.fillWidth: visible
clip: true
ColumnLayout
{
......@@ -242,7 +228,7 @@ SwipeDelegate
horizontalAlignment: Qt.AlignRight
text: model.email
font.pointSize: fontSizes.small
font.pointSize: Maui.Style.fontSizes.small
font.weight: Font.Light
wrapMode: Text.WrapAnywhere
elide: Text.ElideMiddle
......@@ -258,7 +244,7 @@ SwipeDelegate
Layout.alignment: Qt.AlignRight
horizontalAlignment: Qt.AlignRight
text: model.title
font.pointSize: fontSizes.small
font.pointSize: Maui.Style.fontSizes.small
font.weight: Font.Light
wrapMode: Text.WrapAnywhere
elide: Text.ElideMiddle
......@@ -271,7 +257,7 @@ SwipeDelegate
Item
{
Layout.fillHeight: true
Layout.preferredWidth: iconSizes.big
Layout.preferredWidth: Maui.Style.iconSizes.big
Layout.alignment: Qt.AlignRight
Layout.margins: space.big
......@@ -296,8 +282,8 @@ SwipeDelegate
id: _rowActions
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
spacing: space.big
padding: space.medium
spacing: Maui.Style.space.big
padding: Maui.Style.space.medium
ToolButton
{
......
......@@ -10,8 +10,8 @@ Maui.Dialog
{
id: control
maxWidth: unit * 500
maxHeight: unit * 800
maxWidth: Maui.Style.unit * 500
maxHeight: Maui.Style.unit * 800
property var contact : ({})
rejectButton.visible: true
......@@ -173,7 +173,7 @@ Maui.Dialog
{
id: _contactPic
Layout.fillWidth: true
Layout.preferredHeight: iconSizes.huge * (contact.photo ? 1.5 : 1)
Layout.preferredHeight: Maui.Style.iconSizes.huge * (contact.photo ? 1.5 : 1)
Rectangle
{
......@@ -228,7 +228,7 @@ Maui.Dialog
anchors.centerIn: parent
width: _img.width
height: _img.height
radius: radiusV* 2
radius: Maui.Style.radiusV* 2
}
}
}
......@@ -253,7 +253,7 @@ Maui.Dialog
verticalAlignment: Qt.AlignVCenter
color: "white"
font.pointSize: fontSizes.huge * 1.5
font.pointSize: Maui.Style.fontSizes.huge * 1.5
font.bold: true
font.weight: Font.Bold
text: contact.n ? contact.n[0] : "?"
......@@ -280,35 +280,35 @@ Maui.Dialog
// }
Item
{
Layout.fillWidth: true
Layout.fillHeight: true
ScrollView
Kirigami.ScrollablePage
{
anchors.fill: parent
contentHeight: _formLayout.implicitHeight
contentWidth: _formLayout.width
clip: true
Layout.fillWidth: true
Layout.fillHeight: true
Kirigami.Theme.backgroundColor: "transparent"
padding: 0
leftPadding: padding
rightPadding: padding
topPadding: padding
bottomPadding: padding
ColumnLayout
{
id: _formLayout
width: parent.width
spacing: space.large
spacing: Maui.Style.space.large
ColumnLayout
{
Layout.fillWidth: true
spacing: space.small
spacing: Maui.Style.space.small
visible: contact.account
Label
{
Layout.fillHeight: true
Layout.fillWidth: true
text: qsTr("Account")
font.pointSize: fontSizes.default
font.pointSize: Maui.Style.fontSizes.default
font.weight: Font.Light
color: Kirigami.Theme.textColor
}
......@@ -320,7 +320,7 @@ Maui.Dialog
width: parent.width
text: contact.account
font.pointSize: fontSizes.big
font.pointSize: Maui.Style.fontSizes.big
font.weight: Font.Bold
color: Kirigami.Theme.textColor
wrapMode: Text.WrapAnywhere
......@@ -330,14 +330,14 @@ Maui.Dialog
ColumnLayout
{
Layout.fillWidth: true
spacing: space.small
spacing: Maui.Style.space.small
visible: contact.n
Label
{
Layout.fillHeight: true
Layout.fillWidth: true
text: qsTr("Name")
font.pointSize: fontSizes.default
font.pointSize: Maui.Style.fontSizes.default
font.weight: Font.Light
color: Kirigami.Theme.textColor
}
......@@ -349,7 +349,7 @@ Maui.Dialog
width: parent.width
text: contact.n
font.pointSize: fontSizes.big
font.pointSize: Maui.Style.fontSizes.big
font.weight: Font.Bold
color: Kirigami.Theme.textColor
}
......@@ -358,7 +358,7 @@ Maui.Dialog
ColumnLayout
{
Layout.fillWidth: true
spacing: space.small
spacing: Maui.Style.space.small
visible: contact.tel
Label
......@@ -366,7 +366,7 @@ Maui.Dialog
Layout.fillHeight: true
Layout.fillWidth: true
text: qsTr("Phone")
font.pointSize: fontSizes.default
font.pointSize: Maui.Style.fontSizes.default
font.weight: Font.Light
color: Kirigami.Theme.textColor
}
......@@ -375,7 +375,7 @@ Maui.Dialog
{
Layout.fillHeight: true
Layout.fillWidth: true
font.pointSize: fontSizes.big
font.pointSize: Maui.Style.fontSizes.big
font.weight: Font.Bold
color: Kirigami.Theme.textColor
text: contact.tel
......@@ -386,7 +386,7 @@ Maui.Dialog
ColumnLayout
{
Layout.fillWidth: true
spacing: space.small
spacing: Maui.Style.space.small
visible: contact.email
Label
......@@ -394,7 +394,7 @@ Maui.Dialog
Layout.fillHeight: true
Layout.fillWidth: true
text: qsTr("Email")
font.pointSize: fontSizes.default
font.pointSize: Maui.Style.fontSizes.default
font.weight: Font.Light
color: Kirigami.Theme.textColor
......@@ -404,7 +404,7 @@ Maui.Dialog
{
Layout.fillHeight: true
Layout.fillWidth: true
font.pointSize: fontSizes.big
font.pointSize: Maui.Style.fontSizes.big
font.weight: Font.Bold
color: Kirigami.Theme.textColor
text: contact.email
......@@ -415,7 +415,7 @@ Maui.Dialog
ColumnLayout
{
Layout.fillWidth: true
spacing: space.small
spacing: Maui.Style.space.small
visible: contact.org && contact.org.length
Label
......@@ -423,7 +423,7 @@ Maui.Dialog
Layout.fillHeight: true
Layout.fillWidth: true
text: qsTr("Organization")
font.pointSize: fontSizes.default
font.pointSize: Maui.Style.fontSizes.default
font.weight: Font.Light
color: Kirigami.Theme.textColor
}
......@@ -434,7 +434,7 @@ Maui.Dialog
Layout.fillWidth: true
width: parent.width
text: contact.org
font.pointSize: fontSizes.big
font.pointSize: Maui.Style.fontSizes.big
font.weight: Font.Bold
color: Kirigami.Theme.textColor
}
......@@ -444,14 +444,14 @@ Maui.Dialog
{
visible: contact.title && contact.title.length
Layout.fillWidth: visible
spacing: space.small
spacing: Maui.Style.space.small
Label
{
Layout.fillHeight: parent.visible
Layout.fillWidth: parent.visible
text: qsTr("Title")
font.pointSize: fontSizes.default
font.pointSize: Maui.Style.fontSizes.default
font.weight: Font.Light
color: Kirigami.Theme.textColor
}
......@@ -462,17 +462,14 @@ Maui.Dialog
Layout.fillWidth: true
width: parent.width
text: parent.visible ? contact.title : undefined
font.pointSize: fontSizes.big
font.pointSize: Maui.Style.fontSizes.big
font.weight: Font.Bold
color: Kirigami.Theme.textColor
}
}
}
}
}
}
......
......@@ -18,7 +18,7 @@ Maui.Page
property bool gridView : false
property bool showAccountFilter: false
padding: space.big
padding: Maui.Style.space.big
Maui.BaseModel
{
......@@ -38,7 +38,7 @@ Maui.Page
isMask: false
title: qsTr("There's no contacts")
body: qsTr("Add new contacts")
emojiSize: iconSizes.huge
emojiSize: Maui.Style.iconSizes.huge
visible: !view.count
onActionTriggered: _newContactDialog.open()
}
......@@ -57,7 +57,7 @@ Maui.Page
ListView
{
id: _listView
spacing: space.big
spacing: Maui.Style.space.big
clip: true
header: Item
{
......@@ -130,7 +130,7 @@ Maui.Page
{
id: _delegate
height: unit * 60
height: Maui.Style.unit * 60
width: isWide ? control.width * 0.8 : _listView.width
anchors.horizontalCenter: parent.horizontalCenter
showMenuIcon: true
......@@ -164,10 +164,10 @@ Maui.Page
{
id: _gridView
model: _contactsModel
cellWidth: unit * 120
cellHeight: unit * 120
itemSize: Math.min(unit * 120)
spacing: space.medium
cellWidth: Maui.Style.unit * 120
cellHeight: Maui.Style.unit * 120
itemSize: Math.min(Maui.Style.unit * 120)
spacing: Maui.Style.space.medium
centerContent: false
adaptContent: true
......
This diff is collapsed.
......@@ -2,20 +2,18 @@ import QtQuick 2.9
import QtQuick.Controls 2.3
import QtQuick.Layouts 1.3
import QtGraphicalEffects 1.0
import org.kde.mauikit 1.0 as Maui
import org.kde.kirigami 2.2 as Kirigami
import org.kde.kirigami 2.7 as Kirigami
Maui.Dialog
{
id: control
property var contact : ({})
maxWidth: unit * 500
maxWidth: Maui.Style.unit * 500
maxHeight: maxWidth
page.padding: Maui.Style.space.small
onAccepted:
{
......@@ -37,8 +35,6 @@ Maui.Dialog
else if(_combobox.currentText === contact.tel)
Maui.Android.sendSMS(contact.tel, _subjectTextField.text, _editor.text)
}
close();
}
......@@ -54,15 +50,12 @@ Maui.Dialog
{
id: _combobox
Layout.fillWidth: true
Layout.preferredHeight: toolBarHeightAlt
Layout.preferredHeight: Maui.Style.toolBarHeightAlt
// text: isAndroid ? contact.tel : contact.email
font.bold: true
font.weight: Font.Bold
font.pointSize: fontSizes.big
// colorScheme.viewBackgroundColor: cardColor
// colorScheme.borderColor: "transparent"
// colorScheme.textColor: "#fff"
font.pointSize: Maui.Style.fontSizes.big
model:
{
if(contact.email && contact.tel)
......@@ -81,22 +74,18 @@ Maui.Dialog
id: _subjectTextField
visible: _combobox.currentText === contact.email
Layout.fillWidth: true
Layout.preferredHeight: toolBarHeightAlt
Layout.preferredHeight: Maui.Style.toolBarHeightAlt
placeholderText: qsTr("Subject")
font.bold: true
font.weight: Font.Bold
font.pointSize: fontSizes.big
font.pointSize: Maui.Style.fontSizes.big
}
Maui.Editor
{
id: _editor
Layout.fillHeight: true
Layout.fillWidth: true
headBar.drawBorder: false
headBar.plegable: false
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment