From 9c8c1c5ec412644be792253088ed22f38132d8ad Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 20 Aug 2018 10:43:21 +0200 Subject: Cleaner layouting of calendar sidebar --- views/calendar/qml/DateSelector.qml | 4 ++++ views/calendar/qml/DateView.qml | 36 +++++++++++++++++++----------------- views/calendar/qml/View.qml | 3 ++- 3 files changed, 25 insertions(+), 18 deletions(-) diff --git a/views/calendar/qml/DateSelector.qml b/views/calendar/qml/DateSelector.qml index bc297505..c8717d8f 100644 --- a/views/calendar/qml/DateSelector.qml +++ b/views/calendar/qml/DateSelector.qml @@ -37,6 +37,8 @@ Column { verticalCenter: parent.verticalCenter left: parent.left } + height: parent.height + width: parent.height color: Kube.Colors.darkBackgroundColor iconName: Kube.Icons.goBack_inverted onClicked: { @@ -60,6 +62,8 @@ Column { verticalCenter: parent.verticalCenter right: parent.right } + height: parent.height + width: parent.height color: Kube.Colors.darkBackgroundColor iconName: Kube.Icons.goNext_inverted onClicked: { diff --git a/views/calendar/qml/DateView.qml b/views/calendar/qml/DateView.qml index c42b35fe..cc9eba7c 100644 --- a/views/calendar/qml/DateView.qml +++ b/views/calendar/qml/DateView.qml @@ -21,28 +21,30 @@ import QtQuick.Controls 2.2 import org.kube.framework 1.0 as Kube -Row { +Item { id: root property date date: null - - spacing: Kube.Units.smallSpacing - - Kube.Label { - anchors.verticalCenter: parent.verticalCenter - text: root.date.getDate() - color: Kube.Colors.highlightedTextColor - font.pointSize: Kube.Units.defaultFontSize * 3 - } - Column { - anchors.verticalCenter: parent.verticalCenter + height: Kube.Units.gridUnit * 2 + Row { + anchors.fill: parent + spacing: Kube.Units.smallSpacing Kube.Label { - text: root.date.toLocaleString(Qt.locale(), "dddd") + anchors.verticalCenter: parent.verticalCenter + text: root.date.getDate() color: Kube.Colors.highlightedTextColor + font.pointSize: Kube.Units.defaultFontSize * 3 } - Kube.Label { - text: root.date.toLocaleString(Qt.locale(), "MMMM yyyy") - color: Kube.Colors.highlightedTextColor - font.pointSize: Kube.Units.smallFontSize + Column { + anchors.verticalCenter: parent.verticalCenter + Kube.Label { + text: root.date.toLocaleString(Qt.locale(), "dddd") + color: Kube.Colors.highlightedTextColor + } + Kube.Label { + text: root.date.toLocaleString(Qt.locale(), "MMMM yyyy") + color: Kube.Colors.highlightedTextColor + font.pointSize: Kube.Units.smallFontSize + } } } } diff --git a/views/calendar/qml/View.qml b/views/calendar/qml/View.qml index e25baa15..e49894ca 100644 --- a/views/calendar/qml/View.qml +++ b/views/calendar/qml/View.qml @@ -78,6 +78,7 @@ RowLayout { right: parent.right margins: Kube.Units.largeSpacing } + spacing: Kube.Units.largeSpacing Kube.PositiveButton { id: newEventButton objectName: "newEventButton" @@ -108,7 +109,7 @@ RowLayout { bottomMargin: Kube.Units.largeSpacing rightMargin: Kube.Units.largeSpacing } - height: Math.min(implicitHeight, parent.height - (topLayout.y + topLayout.height) - Kube.Units.largeSpacing) + height: Math.min(implicitHeight, parent.height - (topLayout.y + topLayout.height) - Kube.Units.largeSpacing - anchors.bottomMargin) spacing: Kube.Units.largeSpacing -- cgit v1.2.3