Commit 6737946e authored by Camilo higuita's avatar Camilo higuita

push past changes

parent 76786fe8
......@@ -13,6 +13,7 @@
<file>assets/RedPlanet.png</file>
<file>assets/Rainbow.png</file>
<file>assets/BugSearch.png</file>
<file>assets/pix.svg</file>
</qresource>
<qresource prefix="/"/>
</RCC>
Subproject commit 04529188cf1eb36e7a3304fdfeca6b7c3d76d19a
Subproject commit a89b6421a0115317a1128a2216cea40ecf9c0742
......@@ -50,7 +50,8 @@ Maui.ApplicationWindow
// visibility: fullScreen ? ApplicationWindow.FullScreen : ApplicationWindow.Windowed
// altToolBars: true
about.appDescription: qsTr("Pix is an image gallery manager made for Maui. Pix is a convergent and multiplatform app that works under Android and GNU Linux distros.")
about.appIcon: "qrc:/img/assets/pix.svg"
/*READONLY PROPS*/
readonly property var views : ({
viewer: 0,
......@@ -102,8 +103,7 @@ Maui.ApplicationWindow
headBar.visible: !fullScreen
headBar.middleContent: PixsBar {}
ColumnLayout
content: ColumnLayout
{
id: mainPage
anchors.fill: parent
......
......@@ -19,7 +19,6 @@
<file>widgets/views/Viewer/Viewer.qml</file>
<file>widgets/views/Viewer/Viewer.js</file>
<file>widgets/views/Folders/PicsView.qml</file>
<file>view_models/PixPopup.qml</file>
<file>widgets/views/Pix.js</file>
<file>widgets/PixFooter.qml</file>
<file>widgets/dialogs/Tags/TagsDialog.qml</file>
......@@ -34,7 +33,6 @@
<file>widgets/views/Viewer/ViewerMenu.qml</file>
<file>widgets/views/Tags/TagsSidebar.qml</file>
<file>widgets/views/Viewer/ConfigurationDialog.qml</file>
<file>view_models/PixDialog.qml</file>
<file>widgets/PicMenu.qml</file>
<file>widgets/views/Search/SearchView.qml</file>
<file>widgets/views/Viewer/ViewerDelegate.qml</file>
......
import QtQuick 2.9
import QtQuick.Controls 2.2
Dialog
{
width: parent.width * (isMobile ? 0.7 : 0.5)
height: parent.height * (isMobile ? 0.7 : 0.5)
x: (parent.width - width) / 2
y: (parent.height - height) / 2
parent: ApplicationWindow.overlay
modal: true
clip: true
margins: 1
padding: space.tiny*0.5
}
......@@ -22,10 +22,14 @@ Maui.Page
/*signals*/
signal picClicked(int index)
floatingBar: true
footBarOverlap: true
onItemSizeChanged: refreshGrid()
Maui.Holder
{
id: holder
id: holder
visible: grid.count === 0
}
......@@ -84,13 +88,14 @@ Maui.Page
iconName: "edit-select"
onClicked: selectionMode = !selectionMode
iconColor: selectionMode ? highlightColor : textColor
},
Maui.ToolButton
{
id: menuBtn
iconName: "overflow-menu"
onClicked: isMobile? gridMenu.open() : gridMenu.popup()
}
{
id: menuBtn
iconName: "overflow-menu"
onClicked: isMobile? gridMenu.open() : gridMenu.popup()
}
]
headBar.leftContent: [
Maui.ToolButton
......@@ -104,6 +109,23 @@ Maui.Page
iconColor: !fitPreviews ? highlightColor : textColor
}
]
footBar.middleContent: [
Maui.ToolButton
{
iconName: "list-add"
iconColor: altColorText
onClicked: zoomIn()
},
Maui.ToolButton
{
iconName: "list-remove"
iconColor: altColorText
onClicked: zoomOut()
}
]
GridView
{
id: grid
......@@ -139,13 +161,7 @@ Maui.Page
onWidthChanged:
{
var amount = parseInt(grid.width/(itemSize + itemSpacing),10)
var leftSpace = parseInt(grid.width-(amount*(itemSize + itemSpacing)), 10)
var size = parseInt((itemSize + itemSpacing)+(parseInt(leftSpace/amount, 10)), 10)
size = size > itemSize + itemSpacing ? size : itemSize + itemSpacing
grid.cellWidth = size
refreshGrid()
// grid.cellHeight = size
}
......@@ -221,4 +237,27 @@ Maui.Page
{
VIEWER.open(grid.model, index)
}
function zoomIn()
{
itemSize = itemSize + 20
}
function zoomOut()
{
itemSize = itemSize - 20
}
function refreshGrid()
{
var amount = parseInt(grid.width/(itemSize + itemSpacing),10)
var leftSpace = parseInt(grid.width-(amount*(itemSize + itemSpacing)), 10)
var size = parseInt((itemSize + itemSpacing)+(parseInt(leftSpace/amount, 10)), 10)
size = size > itemSize + itemSpacing ? size : itemSize + itemSpacing
grid.cellWidth = size
}
}
import QtQuick 2.9
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.2
import QtQuick.Controls.Material 2.1
import org.kde.kirigami 2.2 as Kirigami
Popup
{
property int maxWidth : Kirigami.Units.gridUnit*6
property int maxHeight : Kirigami.Units.gridUnit*6
parent: ApplicationWindow.overlay
width: parent === ApplicationWindow.overlay ? (root.pageStack.wideMode ? parent.width * 0.4 :
(isMobile ? parent.width * 0.8 :
parent.width * 0.7)) :
parent.width * 0.7 > maxWidth ? maxWidth :
parent.width * 0.7
height: parent === ApplicationWindow.overlay ? (root.pageStack.wideMode ? parent.height * 0.5 :
(isMobile ? parent.height * 0.8 :
parent.height * 0.7)) :
parent.height * 0.7 > maxHeight ? maxHeight :
parent.height * 0.7
x: parent.width / 2 - width / 2
y: parent.height / 2 - height / 2
z: 999
modal: true
focus: true
clip: true
margins: 1
padding: 2
enter: Transition
{
NumberAnimation { property: "opacity"; from: 0.0; to: 1.0; duration: 150 }
}
exit: Transition
{
NumberAnimation { property: "opacity"; from: 1.0; to: 0.0; duration: 150 }
}
Material.accent: highlightColor
Material.background: backgroundColor
Material.primary: backgroundColor
Material.foreground: textColor
}
......@@ -4,13 +4,14 @@ import QtQuick.Layouts 1.3
import "../../../view_models"
import "../../../db/Query.js" as Q
import "../../views/Pix.js" as PIX
import org.kde.mauikit 1.0 as Maui
PixDialog
Maui.Dialog
{
property var picUrls : []
signal picTagged(string tag)
standardButtons: Dialog.Save | Dialog.Cancel
maxHeight: unit * 500
onOpened: populate()
onAccepted: addToAlbum(albumsList.model.get(albumsList.currentIndex).album)
......@@ -19,21 +20,18 @@ PixDialog
{
anchors.fill: parent
AlbumsList
{
id: albumsList
Layout.fillHeight: true
Layout.fillWidth: true
width: parent.width
height: parent.height
}
TextField
Maui.TextField
{
id: albumText
Layout.fillWidth: true
Layout.leftMargin: contentMargins
Layout.rightMargin: contentMargins
placeholderText: "New album..."
onAccepted:
{
......
......@@ -24,8 +24,11 @@ ListView
Maui.Holder
{
id: holder
message: "<h2>No Albums!</h2><p>Start creating new albums</p>"
emoji: "qrc:/img/assets/face.png"
emoji: "qrc:/img/assets/RedPlanet.png"
isMask: false
title : "No albums!"
body: "Start creating new albums"
emojiSize: iconSizes.huge
visible: count === 0
}
......
......@@ -7,7 +7,7 @@ import "../../views/Pix.js" as PIX
import org.kde.mauikit 1.0 as Maui
PixDialog
Maui.Dialog
{
property var picUrls : []
property bool forAlbum : false
......@@ -15,38 +15,40 @@ PixDialog
signal picTagged(string tag, string url)
signal tagsAdded(var tags, var urls)
standardButtons: Dialog.Save | Dialog.Cancel
maxHeight: unit * 500
onAccepted: setTags()
onRejected: close()
onOpened: populate()
ColumnLayout
{
anchors.fill: parent
TagsList
Item
{
id: tagsList
Layout.fillHeight: true
Layout.fillWidth: true
width: parent.width
height: parent.height
onTagClicked:
TagsList
{
tagListComposer.model.insert(0, {tag: tagsList.model.get(index).tag})
id: tagsList
width: parent.width
height: parent.height
onTagClicked:
{
tagListComposer.model.insert(0, {tag: tagsList.model.get(index).tag})
}
}
}
TextField
Maui.TextField
{
id: tagText
Layout.fillWidth: true
Layout.leftMargin: contentMargins
Layout.rightMargin: contentMargins
placeholderText: "Tags..."
placeholderText: "New tags..."
onAccepted:
{
var tags = tagText.text.split(",")
......@@ -128,7 +130,7 @@ PixDialog
if(picUrls.length === 1)
tagListComposer.populate(forAlbum ? tag.getAbstractTags("album", picUrl, true) :
tag.getUrlTags(picUrl, true))
tagListComposer.populate(forAlbum ? tag.getAbstractTags("album", picUrls[0], true) :
tag.getUrlTags(picUrls[0], true))
}
}
......@@ -26,9 +26,12 @@ ListView
Maui.Holder
{
id: holder
message: "<h2>No Tags!</h2><p>Start tagging your pics</p>"
emoji: "qrc:/img/assets/face.png"
emoji: "qrc:/img/assets/Electricity.png"
visible: count === 0
isMask: false
title : "No tags!"
body: "Start tagging your pics"
emojiSize: iconSizes.huge
}
model: ListModel{}
......
......@@ -33,7 +33,8 @@ Kirigami.PageRow
Maui.NewDialog
{
id: newAlbumDialog
title: qsTr("New album...")
title: qsTr("New album")
message: qsTr("Create a new album to organize your images. You can sync tags with different albums.")
onFinished: addAlbum(text)
}
......@@ -159,9 +160,10 @@ Kirigami.PageRow
function addAlbum(album)
{
if(!pix.checkExistance("albums", "album", album))
if (pix.addAlbum(album))
albumGrid.model.append({"album": album})
if(album.length > 0)
if(!pix.checkExistance("albums", "album", album))
if (pix.addAlbum(album))
albumGrid.model.append({"album": album})
}
......
......@@ -78,3 +78,5 @@ function selectItem(item)
})
}
......@@ -34,17 +34,12 @@ Maui.Page
iconName: "view-filter"
}
footBar.middleContent: TextField
footBar.middleContent: Maui.TextField
{
id: searchInput
placeholderText: qsTr("Search...")
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
selectByMouse: !isMobile
focus: true
wrapMode: TextEdit.Wrap
selectionColor: highlightColor
selectedTextColor: highlightedTextColor
width: footBar.middleLayout.width * 0.9
onAccepted: runSearch(searchInput.text)
}
......
......@@ -28,7 +28,7 @@ Kirigami.PageRow
Maui.NewDialog
{
id: newTagDialog
title: qsTr("New tag...")
title: qsTr("New tag")
onFinished:
{
tag.tag(text)
......
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import org.kde.mauikit 1.0 as Maui
import "../../../view_models"
PixDialog
Maui.Dialog
{
standardButtons: Dialog.Save | Dialog.Cancel
title: qsTr("Viewer configuration")
onAccepted: saveConfs()
......
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