Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit f1350271 authored by Camilo higuita's avatar Camilo higuita

update to work wiht chnages on new mauikit #1

parent 224b3682
import QtQuick 2.9
import QtQuick.Controls 2.3
import org.kde.mauikit 1.0 as Maui
import org.kde.kirigami 2.6 as Kirigami
import QtQuick.Layouts 1.3
import "views/contacts"
......@@ -36,7 +37,7 @@ Maui.ApplicationWindow
accentColor: darkTheme ? "#3c4862" : Maui.Style.highlightColor
altToolBars: false
leftIcon.iconColor: footBar.visible ? highlightColor : textColor
leftIcon.checked: footBar.visible
// onSearchButtonClicked: footBar.visible = !footBar.visible
leftIcon.visible: true
rightIcon.visible: false
......@@ -48,7 +49,7 @@ Maui.ApplicationWindow
property bool darkTheme : Maui.FM.loadSettings("dark", "theme", false) == "true"
mainMenu: [
Maui.MenuItem
MenuItem
{
checkable: true
text: qsTr("Dark theme");
......@@ -59,66 +60,63 @@ Maui.ApplicationWindow
Maui.FM.saveSettings("dark", darkTheme, "theme")
if(isAndroid)
Maui.Android.statusbarColor(backgroundColor, !darkTheme)
Maui.Android.statusbarColor(backgroundColor, !darkTheme)
}
}
]
headBar.rightContent: Maui.ToolButton
headBar.rightContent: ToolButton
{
id: _dialerButton
iconName: "dialer-pad"
Layout.fillHeight: true
iconColor: currentView === views.dialer ? highlightColor : textColor
icon.name: "dialer-pad"
icon.color: currentView === views.dialer ? highlightColor : textColor
// text: qsTr("Dialer")
// visible: isAndroid
showIndicator: currentView === views.dialer
checked: currentView === views.dialer
onClicked: currentView = views.dialer
}
headBar.middleContent: [
Maui.ToolButton
{
id: _favsButton
iconName: "draw-star"
Layout.fillHeight: true
iconColor: currentView === views.favs ? highlightColor : textColor
// text: qsTr("Favorites")
showIndicator: currentView === views.favs
onClicked: currentView = views.favs
},
Maui.ToolButton
{
id: _logButton
iconName: "view-media-recent"
Layout.fillHeight: true
iconColor: currentView === views.log ? highlightColor : textColor
// text: qsTr("Favorites")
showIndicator: currentView === views.log
onClicked: currentView = views.log
headBar.middleContent: Kirigami.ActionToolBar
{
},
actions: [
Kirigami.Action
{
id: _favsButton
icon.name: "draw-star"
text: qsTr("Favorites")
icon.color: currentView === views.favs ? highlightColor : textColor
checked: currentView === views.favs
onTriggered: currentView = views.favs
},
Kirigami.Action
{
id: _logButton
icon.name: "view-media-recent"
icon.color: currentView === views.log ? highlightColor : textColor
text: qsTr("Favorites")
checked: currentView === views.log
onTriggered: currentView = views.log
},
Maui.ToolButton
{
id: _contactsButton
Layout.fillHeight: true
iconName: "view-contacts"
iconColor: currentView === views.contacts ? highlightColor : textColor
// text: qsTr("Contacts")
// height: parent.height
showIndicator: currentView === views.contacts
onClicked: currentView = views.contacts
}
]
Kirigami.Action
{
id: _contactsButton
Layout.fillHeight: true
icon.name: "view-contacts"
icon.color: currentView === views.contacts ? highlightColor : textColor
text: qsTr("Contacts")
checked: currentView === views.contacts
onTriggered: currentView = views.contacts
}
]
}
SwipeView
{
......@@ -144,7 +142,7 @@ Maui.ApplicationWindow
LogsView
{
id: _logView
id: _logView
}
ContactsView
......@@ -166,11 +164,12 @@ Maui.ApplicationWindow
color: highlightColor
radius: Math.max(width, height)
Maui.ToolButton
ToolButton
{
anchors.centerIn: parent
iconName: "list-add-user"
iconColor: "white"
icon.name: "list-add-user"
icon.color: "white"
flat: true
onClicked: _newContactDialog.open()
}
}
......
......@@ -4,7 +4,7 @@ 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.6 as Kirigami
Maui.Dialog
{
......@@ -19,7 +19,7 @@ Maui.Dialog
footBar.implicitHeight: toolBarHeight * 1.3
footBar.rightContent: Maui.Button
footBar.rightContent: Button
{
visible: isMobile
// Layout.fillHeight: visible
......@@ -27,8 +27,8 @@ Maui.Dialog
icon.name: "dialer-call"
text: qsTr("Call")
// display: ToolButton.TextUnderIcon
colorScheme.backgroundColor: infoColor
colorScheme.textColor: "#fff"
Kirigami.Theme.backgroundColor: infoColor
Kirigami.Theme.textColor: "#fff"
onClicked:
{
if(isAndroid)
......@@ -36,25 +36,25 @@ Maui.Dialog
}
}
footBar.leftContent: Maui.Button
footBar.leftContent: Button
{
visible: isMobile
// Layout.fillHeight: visible
// Layout.fillWidth: visible
text: qsTr("Close")
// display: ToolButton.TextUnderIcon
colorScheme.backgroundColor: warningColor
colorScheme.textColor: "#fff"
Kirigami.Theme.backgroundColor: warningColor
Kirigami.Theme.textColor: "#fff"
onClicked: control.close()
}
footBar.middleContent: [
Maui.ToolButton
ToolButton
{
Layout.fillHeight: true
iconName: "send-email"
icon.name: "send-email"
visible: contact.email
// text: qsTr("Message")
display: ToolButton.TextUnderIcon
......@@ -66,10 +66,10 @@ Maui.Dialog
},
Maui.ToolButton
ToolButton
{
Layout.fillHeight: true
iconName: "send-sms"
icon.name: "send-sms"
visible: contact.tel
// text: qsTr("Message")
......@@ -87,15 +87,15 @@ Maui.Dialog
headBar.drawBorder: false
headBar.rightContent:[
Maui.ToolButton
ToolButton
{
Layout.fillWidth: true
Layout.fillHeight: true
iconName: "draw-star"
icon.name: "draw-star"
text: qsTr("Fav")
display: ToolButton.TextBesideIcon
iconColor: contact.fav == "1" ? "#FFD700" : textColor
icon.color: contact.fav == "1" ? "#FFD700" : textColor
onClicked:
{
contact["fav"] = contact.fav == "1" ? "0" : "1"
......@@ -105,25 +105,25 @@ Maui.Dialog
}
},
Maui.ToolButton
ToolButton
{
Layout.fillWidth: true
Layout.fillHeight: true
iconName: "document-share"
icon.name: "document-share"
text: qsTr("Share")
display: ToolButton.TextBesideIcon
},
Maui.ToolButton
ToolButton
{
Layout.fillWidth: true
Layout.fillHeight: true
iconName: "document-edit"
icon.name: "document-edit"
text: qsTr("Edit")
onClicked: _editContactDialog.open()
iconColor: suggestedColor
icon.color: suggestedColor
display: ToolButton.TextBesideIcon
}
......@@ -147,13 +147,13 @@ Maui.Dialog
}
headBar.drawBorder: false
headBar.rightContent: Maui.Button
headBar.rightContent: Button
{
icon.name: "user-trash"
// text: qsTr("Remove")
onClicked: _removeDialog.open()
colorScheme.backgroundColor: dangerColor
colorScheme.textColor: "#fff"
Kirigami.Theme.backgroundColor: dangerColor
Kirigami.Theme.textColor: "#fff"
}
Maui.Dialog
......
......@@ -4,9 +4,7 @@ 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 FMList 1.0
import org.kde.kirigami 2.6 as Kirigami
Maui.Dialog
{
......@@ -26,20 +24,19 @@ Maui.Dialog
onRejected: control.close()
footBar.leftContent: Maui.Button
footBar.leftContent: Button
{
text: qsTr("Cancel")
colorScheme.backgroundColor: warningColor
colorScheme.textColor: "#fff"
Kirigami.Theme.backgroundColor: warningColor
Kirigami.Theme.textColor: "#fff"
onClicked: control.close()
}
footBar.rightContent: Maui.Button
footBar.rightContent: Button
{
text: qsTr("Save")
colorScheme.backgroundColor: infoColor
colorScheme.textColor: "#fff"
Kirigami.Theme.backgroundColor: infoColor
Kirigami.Theme.textColor: "#fff"
onClicked:
{
......@@ -88,7 +85,7 @@ Maui.Dialog
onClicked:{
_fileDialog.mode = _fileDialog.modes.OPEN
_fileDialog.filterType= FMList.IMAGE
_fileDialog.filterType= Maui.FMList.IMAGE
_fileDialog.show(function(paths)
{
console.log("selected image", paths)
......@@ -135,12 +132,12 @@ Maui.Dialog
}
}
Maui.ToolButton
ToolButton
{
iconName: "list-add"
iconColor: "white"
icon.name: "list-add"
icon.color: "white"
enabled: false
size: iconSizes.big
icon.width: iconSizes.big
anchors.centerIn: parent
}
}
......
......@@ -27,7 +27,7 @@ GridLayout
Layout.fillHeight: true
Layout.fillWidth: true
Maui.Button
Button
{
height: buttonSize
width: height
......
import QtQuick 2.9
import QtQuick.Controls 2.3
import org.kde.mauikit 1.0 as Maui
import org.kde.kirigami 2.6 as Kirigami
import QtQuick.Layouts 1.3
import UnionModels 1.0
import "../contacts"
......@@ -41,7 +42,7 @@ Maui.Page
Layout.fillHeight: true
Layout.fillWidth: true
Maui.Button
Button
{
icon.name: "send-sms"
icon.color: textColor
......@@ -64,7 +65,7 @@ Maui.Page
Layout.fillHeight: true
Layout.fillWidth: true
Maui.Button
Button
{
icon.name: "dialer-call"
icon.color: "white"
......@@ -72,7 +73,7 @@ Maui.Page
width: height
anchors.centerIn: parent
// bg.radius: Math.max(width, height)
colorScheme.backgroundColor: suggestedColor
Kirigami.Theme.backgroundColor: suggestedColor
onClicked:
{
......@@ -89,7 +90,7 @@ Maui.Page
Layout.fillHeight: true
Layout.fillWidth: true
Maui.Button
Button
{
icon.name: "edit-clear"
icon.color: textColor
......@@ -206,9 +207,5 @@ Maui.Page
anchors.centerIn: parent
}
}
}
}
......@@ -26,10 +26,10 @@ Maui.Page
id: _callLogsModel
}
Maui.Menu
Menu
{
id: _menu
Maui.MenuItem
MenuItem
{
text: qsTr("Call")
icon.name: "dialer-call"
......@@ -40,7 +40,7 @@ Maui.Page
}
}
Maui.MenuItem
MenuItem
{
text: qsTr("Save as..")
icon.name: "list-add-user"
......
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