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 d74fc703 authored by camilo higuita's avatar camilo higuita

bring up to date to lastest mauikit changes form new-simpler-page

parent 1c388ebd
import QtQuick 2.9
import QtQuick.Controls 2.2
import org.kde.kirigami 2.4 as Kirigami
import org.kde.kirigami 2.7 as Kirigami
import org.kde.mauikit 1.0 as Maui
import "src/widgets"
......@@ -14,14 +14,11 @@ Maui.ApplicationWindow
title: qsTr("Buho")
/***** PROPS *****/
floatingBar: true
footBarOverlap: true
allowRiseContent: false
// altToolBars: false
/**** BRANDING COLORS ****/
menuButton.colorScheme.highlightColor: accentColor
searchButton.colorScheme.highlightColor: accentColor
// menuButton.colorScheme.highlightColor: accentColor
// searchButton.colorScheme.highlightColor: accentColor
headBarBGColor: viewBackgroundColor
headBarFGColor: textColor
accentColor : "#ff9494"
......@@ -43,47 +40,43 @@ Maui.ApplicationWindow
property color headBarTint : Qt.lighter(headBarBGColor, 1.25)
headBar.middleContent: [
Maui.ToolButton
ToolButton
{
onClicked: currentView = views.notes
iconColor: active ? accentColor : textColor
colorScheme.highlightColor: accentColor
iconName: "view-notes"
icon.color: active ? accentColor : textColor
Kirigami.Theme.highlightColor: accentColor
icon.name: "view-notes"
text: qsTr("Notes")
active: currentView === views.notes
showIndicator: true
checked: currentView === views.notes
},
Maui.ToolButton
ToolButton
{
onClicked: currentView = views.links
iconColor: active ? accentColor : textColor
colorScheme.highlightColor: accentColor
iconName: "view-links"
icon.color: active ? accentColor : textColor
Kirigami.Theme.highlightColor: accentColor
icon.name: "view-links"
text: qsTr("Links")
active: currentView === views.links
showIndicator: true
checked: currentView === views.links
},
Maui.ToolButton
ToolButton
{
onClicked: currentView = views.books
iconColor: active? accentColor : textColor
colorScheme.highlightColor: accentColor
iconName: "view-books"
icon.color: active? accentColor : textColor
Kirigami.Theme.highlightColor: accentColor
icon.name: "view-books"
text: qsTr("Books")
active: currentView === views.books
showIndicator: true
checked: currentView === views.books
},
Maui.ToolButton
ToolButton
{
iconColor: active ? accentColor : textColor
colorScheme.highlightColor: accentColor
iconName: "tag"
icon.color: active ? accentColor : textColor
Kirigami.Theme.highlightColor: accentColor
icon.name: "tag"
text: qsTr("Tags")
active: currentView === views.tags
showIndicator: true
checked: currentView === views.tags
}
]
......@@ -91,7 +84,6 @@ Maui.ApplicationWindow
headBar.drawBorder: false
headBar.implicitHeight: toolBarHeight * 1.5
Rectangle
{
z: 999
......@@ -110,24 +102,24 @@ Maui.ApplicationWindow
{
id: addButton
anchors.fill : parent
iconName: "list-add"
iconColor: altColorText
icon.name: "list-add"
icon.color: altColorText
barHeight: parent.height
alignment: Qt.AlignLeft
content: [
Maui.ToolButton
ToolButton
{
iconName: "view-notes"
icon.name: "view-notes"
onClicked: newNote()
},
Maui.ToolButton
ToolButton
{
iconName: "view-links"
icon.name: "view-links"
onClicked: newLink()
},
Maui.ToolButton
ToolButton
{
iconName: "view-books"
icon.name: "view-books"
}
]
}
......@@ -140,7 +132,7 @@ Maui.ApplicationWindow
}
mainMenu: [
Maui.MenuItem
MenuItem
{
text: qsTr("Syncing")
onTriggered: syncDialog.open()
......@@ -192,14 +184,12 @@ Maui.ApplicationWindow
{
id: notesView
onNoteClicked: setNote(note)
altToolBars: !isMobile
}
LinksView
{
id: linksView
onLinkClicked: previewLink(link)
altToolBars: !isMobile
}
BooksView
......
......@@ -9,7 +9,7 @@ Maui.Page
property alias cardsView : cardsView
headBar.visible: false
margins: isMobile ? space.big : space.enormous
padding: isMobile ? space.big : space.enormous
CardsView
......
......@@ -26,26 +26,25 @@ Maui.Page
headBar.visible: !cardsView.holder.visible
headBar.drawBorder: false
margins: space.big
headBarExit: false
headBarTitle : cardsView.count + " links"
padding: space.big
title : cardsView.count + " links"
headBar.leftContent: [
Maui.ToolButton
ToolButton
{
iconName: cardsView.gridView ? "view-list-icons" : "view-list-details"
icon.name: cardsView.gridView ? "view-list-icons" : "view-list-details"
onClicked: cardsView.gridView = !cardsView.gridView
},
Maui.ToolButton
ToolButton
{
iconName: "view-sort"
icon.name: "view-sort"
onClicked: sortMenu.open();
Menu
{
id: sortMenu
Maui.MenuItem
MenuItem
{
text: qsTr("Ascedent")
checkable: true
......@@ -53,7 +52,7 @@ Maui.Page
onTriggered: linksList.order = Links.ASC
}
Maui.MenuItem
MenuItem
{
text: qsTr("Descendent")
checkable: true
......@@ -63,32 +62,32 @@ Maui.Page
MenuSeparator{}
Maui.MenuItem
MenuItem
{
text: qsTr("Title")
onTriggered: KEY.TITLE
}
Maui.MenuItem
MenuItem
{
text: qsTr("Color")
onTriggered: linksList.sortBy = KEY.COLOR
}
Maui.MenuItem
MenuItem
{
text: qsTr("Add date")
onTriggered: linksList.sortBy = KEY.ADD_DATE
}
Maui.MenuItem
MenuItem
{
text: qsTr("Updated")
onTriggered: linksList.sortBy = KEY.UPDATED
}
Maui.MenuItem
MenuItem
{
text: qsTr("Fav")
onTriggered: linksList.sortBy = KEY.FAV
......@@ -98,19 +97,19 @@ Maui.Page
]
headBar.rightContent: [
Maui.ToolButton
ToolButton
{
iconName: "tag-recents"
icon.name: "tag-recents"
},
Maui.ToolButton
ToolButton
{
iconName: "edit-pin"
icon.name: "edit-pin"
},
Maui.ToolButton
ToolButton
{
iconName: "view-calendar"
icon.name: "view-calendar"
}
]
......
......@@ -11,29 +11,29 @@ Maui.Dialog
widthHint: 0.97
maxWidth: 800*unit
maxHeight: maxWidth
page.margins: 0
page.padding: 0
property color selectedColor : "transparent"
property alias webView: webViewer.item
signal linkSaved(var link)
headBar.leftContent: [
Maui.ToolButton
ToolButton
{
id: pinButton
iconName: "edit-pin"
icon.name: "edit-pin"
checkable: true
iconColor: checked ? highlightColor : textColor
icon.color: checked ? highlightColor : textColor
// onClicked: checked = !checked
},
Maui.ToolButton
ToolButton
{
iconName: "document-save"
icon.name: "document-save"
},
Maui.ToolButton
ToolButton
{
iconName: "document-launch"
icon.name: "document-launch"
onClicked: Maui.FM.openUrl(webView.url)
}
]
......@@ -46,29 +46,29 @@ Maui.Dialog
footBar.leftContent: [
Maui.ToolButton
ToolButton
{
id: favButton
iconName: "love"
icon.name: "love"
checkable: true
iconColor: checked ? "#ff007f" : textColor
icon.color: checked ? "#ff007f" : textColor
},
Maui.ToolButton
ToolButton
{
iconName: "document-share"
icon.name: "document-share"
onClicked: isAndroid ? Maui.Android.shareLink(webView.url) :
shareDialog.show(webView.url)
},
Maui.ToolButton
ToolButton
{
iconName: "document-export"
icon.name: "document-export"
},
Maui.ToolButton
ToolButton
{
iconName: "entry-delete"
icon.name: "entry-delete"
}
]
......
......@@ -22,17 +22,16 @@ Maui.Page
signal noteClicked(var note)
margins: space.big
padding: space.big
headBarExit : false
headBar.drawBorder: false
headBar.visible: !cardsView.holder.visible
headBarTitle : cardsView.count + " notes"
title : cardsView.count + " notes"
headBar.leftContent: [
Maui.ToolButton
ToolButton
{
iconName: cardsView.gridView ? "view-list-details" : "view-list-icons"
icon.name: cardsView.gridView ? "view-list-details" : "view-list-icons"
onClicked:
{
cardsView.gridView = !cardsView.gridView
......@@ -41,17 +40,17 @@ Maui.Page
]
headBar.rightContent: [
Maui.ToolButton
ToolButton
{
iconName: "view-sort"
icon.name: "view-sort"
onClicked: sortMenu.open();
Maui.Menu
Menu
{
id: sortMenu
parent: parent
Maui.MenuItem
MenuItem
{
text: qsTr("Ascedent")
checkable: true
......@@ -59,7 +58,7 @@ Maui.Page
onTriggered: notesList.order = Notes.ASC
}
Maui.MenuItem
MenuItem
{
text: qsTr("Descendent")
checkable: true
......@@ -69,7 +68,7 @@ Maui.Page
MenuSeparator{}
Maui.MenuItem
MenuItem
{
text: qsTr("Title")
checkable: true
......@@ -77,7 +76,7 @@ Maui.Page
onTriggered: notesList.sortBy = KEY.TITLE
}
Maui.MenuItem
MenuItem
{
text: qsTr("Color")
checkable: true
......@@ -85,7 +84,7 @@ Maui.Page
onTriggered: notesList.sortBy = KEY.COLOR
}
Maui.MenuItem
MenuItem
{
text: qsTr("Add date")
checkable: true
......@@ -93,7 +92,7 @@ Maui.Page
onTriggered: notesList.sortBy = KEY.ADD_DATE
}
Maui.MenuItem
MenuItem
{
text: qsTr("Updated")
checkable: true
......@@ -101,7 +100,7 @@ Maui.Page
onTriggered: notesList.sortBy = KEY.UPDATED
}
Maui.MenuItem
MenuItem
{
text: qsTr("Fav")
checkable: true
......@@ -110,12 +109,12 @@ Maui.Page
}
}
},
Maui.ToolButton
ToolButton
{
id: pinButton
iconName: "edit-pin"
icon.name: "edit-pin"
checkable: true
iconColor: checked ? highlightColor : textColor
icon.color: checked ? highlightColor : textColor
}
]
......
......@@ -2,7 +2,7 @@ import QtQuick 2.9
import QtQuick.Controls 2.3
import org.kde.mauikit 1.0 as Maui
Maui.Menu
Menu
{
implicitWidth: colorBar.implicitWidth + space.medium
property bool isFav : false
......@@ -14,7 +14,7 @@ Maui.Menu
signal pinClicked(int pin)
signal copyClicked()
Maui.MenuItem
MenuItem
{
text: qsTr(isFav? "UnFav" : "Fav")
onTriggered:
......@@ -24,7 +24,7 @@ Maui.Menu
}
}
Maui.MenuItem
MenuItem
{
text: qsTr(isPin? "UnPin" : "Pin")
onTriggered:
......@@ -34,7 +34,7 @@ Maui.Menu
}
}
Maui.MenuItem
MenuItem
{
text: qsTr("Export")
onTriggered:
......@@ -43,7 +43,7 @@ Maui.Menu
}
}
Maui.MenuItem
MenuItem
{
text: qsTr("Copy")
onTriggered:
......@@ -53,7 +53,7 @@ Maui.Menu
}
}
Maui.MenuItem
MenuItem
{
text: qsTr("Delete")
onTriggered:
......@@ -68,7 +68,7 @@ Maui.Menu
}
Maui.MenuItem
MenuItem
{
width: parent.width
height: rowHeight
......
......@@ -34,12 +34,12 @@ Maui.Dialog
headBar.visible: previewReady
footBar.visible: previewReady
headBar.leftContent: Maui.ToolButton
headBar.leftContent: ToolButton
{
id: pinButton
iconName: "window-pin"
icon.name: "window-pin"
checkable: true
iconColor: checked ? highlightColor : textColor
icon.color: checked ? highlightColor : textColor
// onClicked: checked = !checked
}
......@@ -50,24 +50,24 @@ Maui.Dialog
footBar.leftContent: [
Maui.ToolButton
ToolButton
{
id: favButton
iconName: "love"
icon.name: "love"
checkable: true
iconColor: checked ? "#ff007f" : textColor
icon.color: checked ? "#ff007f" : textColor
},
Maui.ToolButton
ToolButton
{
iconName: "document-share"
icon.name: "document-share"
onClicked: isAndroid ? Maui.Android.shareText(link.text) :
shareDialog.show(link.text)
},
Maui.ToolButton
ToolButton
{
iconName: "document-export"
icon.name: "document-export"
}
]
......
......@@ -2,6 +2,7 @@ import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.0
import org.kde.mauikit 1.0 as Maui
import org.kde.kirigami 2.6 as Kirigami
Maui.Dialog
{
......@@ -18,72 +19,72 @@ Maui.Dialog
rejectButton.visible: false
signal noteSaved(var note)
page.margins: 0
page.padding: 0
colorScheme.backgroundColor: selectedColor
colorScheme.textColor: fgColor
headBar.leftContent: [
Maui.ToolButton
ToolButton
{
iconName: "edit-undo"
icon.name: "edit-undo"
enabled: editor.body.canUndo
onClicked: editor.body.undo()
opacity: enabled ? 1 : 0.5
iconColor: control.colorScheme.textColor
icon.color: control.colorScheme.textColor
},
Maui.ToolButton
ToolButton
{
iconName: "edit-redo"
icon.name: "edit-redo"
enabled: editor.body.canRedo
onClicked: editor.body.redo()
opacity: enabled ? 1 : 0.5
iconColor: control.colorScheme.textColor
icon.color: control.colorScheme.textColor
},
Maui.ToolButton
ToolButton
{
iconName: "format-text-bold"
icon.name: "format-text-bold"
focusPolicy: Qt.TabFocus
iconColor: checked ? highlightColor : control.colorScheme.textColor
icon.color: checked ? highlightColor : control.colorScheme.textColor
checkable: true
checked: editor.document.bold
onClicked: editor.document.bold = !editor.document.bold
},
Maui.ToolButton
ToolButton
{
iconName: "format-text-italic"
iconColor: checked ? highlightColor : control.colorScheme.textColor
icon.name: "format-text-italic"
icon.color: checked ? highlightColor : control.colorScheme.textColor
focusPolicy: Qt.TabFocus
checkable: true
checked: editor.document.italic
onClicked: editor.document.italic = !editor.document.italic
},
Maui.ToolButton
ToolButton
{
iconName: "format-text-underline"
iconColor: checked ? highlightColor : control.colorScheme.textColor
icon.name: "format-text-underline"
icon.color: checked ? highlightColor : control.colorScheme.textColor
focusPolicy: Qt.TabFocus
checkable: true
checked: editor.document.underline
onClicked: editor.document.underline = !editor.document.underline
},
Maui.ToolButton
ToolButton
{
iconName: "format-text-uppercase"
iconColor: checked ? highlightColor : control.colorScheme.textColor
icon.name: "format-text-uppercase"
icon.color: checked ? highlightColor : control.colorScheme.textColor
focusPolicy: Qt.TabFocus
checkable: true
checked: editor.document.uppercase
onClicked: editor.document.uppercase = !editor.document.uppercase
},
Maui.ToolButton
ToolButton
{
iconName: "image"
iconColor: control.colorScheme.textColor
icon.name: "image"
icon.color: control.colorScheme.textColor
}
]
......@@ -93,43 +94,43 @@ Maui.Dialog
}
footBar.leftContent: [
Maui.ToolButton
ToolButton
{
id: pinButton
iconName: "edit-pin"
icon.name: "edit-pin"
checkable: true
iconColor: checked ? highlightColor : control.colorScheme.textColor
icon.color: checked ? highlightColor : control.colorScheme.textColor
// onClicked: checked = !checked
},
Maui.ToolButton
ToolButton
{
id: favButton
iconName: "love"
icon.name: "love"
checkable: true
iconColor: checked ? "#ff007f" : control.colorScheme.textColor
icon.color: checked ? "#ff007f" : control.colorScheme.textColor
},
Maui.ToolButton
ToolButton
{
iconName: "document-share"
icon.name: "document-share"
onClicked: isAndroid ? Maui.Android.shareText(editor.body.text) :
shareDialog.show(editor.body.text)
iconColor: control.colorScheme.textColor
icon.color: control.colorScheme.textColor
},