Commit 7d9675c7 authored by Camilo higuita's avatar Camilo higuita

remove unsused files and improve cards

parent 98e665cb
......@@ -72,7 +72,9 @@ Maui.ApplicationWindow
}
]
headBar.colorScheme.borderColor: Qt.darker(accentColor, 1.4)
footBar.colorScheme.backgroundColor: accentColor
footBar.colorScheme.borderColor: Qt.darker(accentColor, 1.4)
footBarMargins: space.huge
footBarAligment: Qt.AlignRight
footBar.middleContent: [
......
mauikit @ 8e325f89
Subproject commit 6f3c265427206ec9b60e25a940df6cf934d79e0f
Subproject commit 8e325f894fe9d9d0ee32243ead6e670b410561c0
......@@ -17,6 +17,5 @@
<file>src/widgets/CardsList.qml</file>
<file>src/widgets/CardMenu.qml</file>
<file>src/utils/owl.js</file>
<file>src/widgets/CardsViewK.qml</file>
</qresource>
</RCC>
......@@ -70,7 +70,7 @@ Maui.Page
holder.title : "No Links!"
holder.body: "Click here to save a new link"
holder.emojiSize: iconSizes.huge
itemHeight: unit * 250
Connections
{
target: cardsView.holder
......
......@@ -25,19 +25,6 @@ ItemDelegate
background: Rectangle
{
color: "transparent"
layer.enabled: isMobile
layer.effect: DropShadow
{
anchors.fill: card
visible: card.visible
horizontalOffset: 0
verticalOffset: 3
radius: 8.0
samples: 17
color: Qt.darker(noteColor, 1.5)
source: card
}
}
MouseArea
......@@ -51,8 +38,6 @@ ItemDelegate
}
}
Rectangle
{
id: card
......@@ -82,13 +67,33 @@ ItemDelegate
spacing: 0
clip: true
Label
{
id: date
padding: 0
visible: date.text.length > 0
Layout.leftMargin: space.medium
Layout.topMargin: space.medium
Layout.rightMargin: space.medium
Layout.alignment: Qt.AlignLeft
Layout.fillWidth: true
text: Qt.formatDateTime(new Date(model.addDate), "d MMM h:mm")
color: Qt.darker(model.color)
elide: Qt.ElideRight
wrapMode: TextEdit.WrapAnywhere
font.weight: Font.Bold
font.bold: true
font.pointSize: fontSizes.small
}
Label
{
id: title
padding: 0
visible: title.text.length > 0
Layout.leftMargin: space.medium
Layout.topMargin: space.medium
Layout.bottomMargin: space.medium
Layout.rightMargin: space.medium
Layout.alignment: Qt.AlignLeft
......@@ -98,12 +103,9 @@ ItemDelegate
color: Qt.darker(model.color, 3)
elide: Qt.ElideRight
wrapMode: TextEdit.WrapAnywhere
font.weight: Font.Bold
font.bold: true
font.pointSize: fontSizes.large
}
TextArea
......@@ -142,7 +144,7 @@ ItemDelegate
Layout.alignment: Qt.AlignCenter
clip: true
Layout.topMargin: space.medium
sourceComponent: typeof model.preview !== 'undefined' ? imgComponent : ""
sourceComponent: typeof model.preview !== 'undefined' ? imgComponent : undefined
}
}
......
......@@ -13,7 +13,7 @@ GridView
readonly property int defaultSize : unit * 200
property int itemWidth : !gridView ? width :
(isMobile? width * 0.5 : unit * 400)
property int itemHeight: unit * 120
property int itemHeight: unit * 180
property int itemSpacing: space.huge
signal itemClicked(int index)
......@@ -66,6 +66,8 @@ GridView
}
}
ScrollBar.vertical: ScrollBar{ id:scrollBar; visible: !isMobile}
// onWidthChanged: if(!isMobile && gridView) adaptGrid()
function adaptGrid()
......
import QtQuick 2.9
import QtQuick.Controls 2.2
import org.kde.kirigami 2.4 as Kirigami
import org.kde.mauikit 1.0 as Maui
Kirigami.CardsGridView
{
id: cardViewRoot
property bool gridView : true
readonly property int defaultSize : unit * 200
property int itemWidth : !gridView ? width :
unit * 400
property int itemHeight: unit * 120
property int itemSpacing: space.huge
signal itemClicked(int index)
boundsBehavior: !isMobile? Flickable.StopAtBounds : Flickable.DragAndOvershootBounds
maximumColumnWidth: itemWidth
Maui.Holder
{
id: holder
visible: count < 1
z: 999
}
CardMenu
{
id: cardMenu
}
model: ListModel
{
id: cardsModel
}
CardDelegate
{
id: delegate
cardWidth: itemWidth
cardHeight: itemWidth
onClicked:
{
currentIndex = index
itemClicked(index)
}
onRightClicked:
{
currentIndex = index
cardMenu.popup()
}
onPressAndHold:
{
currentIndex = index
cardMenu.popup()
}
}
}
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