From 4dea0dc97524a7489a0f838af9ef4ba4c2835a8f Mon Sep 17 00:00:00 2001 From: Michael Bohlender Date: Sun, 8 Nov 2015 21:01:50 +0100 Subject: add colorpalette and unit --- .../package/contents/ui/ColorPalette.qml | 26 ++++++++++++++++++++++ .../kmail-quick/package/contents/ui/main.qml | 26 ++++++++++------------ 2 files changed, 38 insertions(+), 14 deletions(-) create mode 100644 applications/kmail-quick/package/contents/ui/ColorPalette.qml diff --git a/applications/kmail-quick/package/contents/ui/ColorPalette.qml b/applications/kmail-quick/package/contents/ui/ColorPalette.qml new file mode 100644 index 00000000..db85cac6 --- /dev/null +++ b/applications/kmail-quick/package/contents/ui/ColorPalette.qml @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2015 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 3 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, see . + */ + +import QtQuick 2.4 + +//TODO probably expose it from the Cpp side +Item { + property string background: "#fcfcfc" + property string selected: "#3daee9" + property string read: "#232629" + property string border: "#232629" +} \ No newline at end of file diff --git a/applications/kmail-quick/package/contents/ui/main.qml b/applications/kmail-quick/package/contents/ui/main.qml index 75e781fc..4d53aa08 100644 --- a/applications/kmail-quick/package/contents/ui/main.qml +++ b/applications/kmail-quick/package/contents/ui/main.qml @@ -39,37 +39,35 @@ ApplicationWindow { FolderListView { id: folderList - width: unit.width * 100 - Layout.maximumWidth: unit.width * 200 - Layout.minimumWidth: unit.width * 50 - - color: "green" + width: unit.size * 55 + Layout.maximumWidth: unit.size * 150 + Layout.minimumWidth: unit.size * 30 } MailListView { id: mailList - width: unit.width * 150 - Layout.maximumWidth: unit.width * 300 - Layout.minimumWidth: unit.width * 50 - - color: "red" + width: unit.size * 80 + Layout.maximumWidth: unit.size * 250 + Layout.minimumWidth: unit.size * 50 } SingleMailView { id: mailView Layout.fillWidth: true - - color: "blue" } } //TODO find a better way to scale UI - Label { + Item { id: unit - text: " " + property int size: 5 + } + + ColorPalette { + id: colorPalette } } -- cgit v1.2.3