From 430e6103b65b52b31fe288b236378bf302be399a Mon Sep 17 00:00:00 2001 From: Michael Bohlender Date: Wed, 7 Dec 2016 21:03:17 +0100 Subject: initial attachent delegate --- .../package/contents/ui/AttachmentDelegate.qml | 63 ++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 components/package/contents/ui/AttachmentDelegate.qml (limited to 'components/package/contents/ui') diff --git a/components/package/contents/ui/AttachmentDelegate.qml b/components/package/contents/ui/AttachmentDelegate.qml new file mode 100644 index 00000000..18d6def4 --- /dev/null +++ b/components/package/contents/ui/AttachmentDelegate.qml @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2016 Michael Bohlender, + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import QtQuick 2.7 +import QtQuick.Layouts 1.1 +import org.kde.kirigami 1.0 as Kirigami + +Rectangle { + + property string name + property string icon + + anchors.centerIn: parent + + width: content.width + Kirigami.Units.largeSpacing + height: content.height + Kirigami.Units.largeSpacing + + color: Kirigami.Theme.textColor + + RowLayout { + id: content + + anchors.centerIn: parent + + spacing: Kirigami.Units.largeSpacing / 2 + + Rectangle { + id: mimetype + + height: Kirigami.Units.gridUnit + width: Kirigami.Units.gridUnit + + color: Kirigami.Theme.backgroundColor + + Kirigami.Icon { + height: parent.height + width: height + + source: "text-csv" + } + } + + Text { + text: "some attachment.csv" + color: Kirigami.Theme.backgroundColor + } + } +} -- cgit v1.2.3