From 49b240ffa141dbab6f7d03c4d682abcd70faf594 Mon Sep 17 00:00:00 2001 From: Michael Bohlender Date: Thu, 19 Apr 2018 11:34:24 +0200 Subject: hide time chooser when daylong event --- views/calendar/qml/DayChooser.qml | 7 ++++++- views/calendar/qml/EventView.qml | 31 ++++++++++++++++++++++--------- 2 files changed, 28 insertions(+), 10 deletions(-) (limited to 'views') diff --git a/views/calendar/qml/DayChooser.qml b/views/calendar/qml/DayChooser.qml index a18bafd0..0a40b1a9 100644 --- a/views/calendar/qml/DayChooser.qml +++ b/views/calendar/qml/DayChooser.qml @@ -97,7 +97,6 @@ Item { Layout.column: 1 Layout.fillWidth: true - } WeekNumberColumn { @@ -116,6 +115,12 @@ Item { Layout.fillWidth: true Layout.fillHeight: true + + delegate: Kube.AbstractButton { + text: model.day + + width: Kube.Units.gridUnit * 3 + } } } } diff --git a/views/calendar/qml/EventView.qml b/views/calendar/qml/EventView.qml index 6f34cefa..c86f0f42 100644 --- a/views/calendar/qml/EventView.qml +++ b/views/calendar/qml/EventView.qml @@ -26,6 +26,8 @@ import org.kube.framework 1.0 as Kube FocusScope { id: root + property bool daylong + Rectangle { anchors { top: parent.top @@ -49,14 +51,16 @@ FocusScope { Kube.TextField { width: parent.width - placeholderText: "Titel" + placeholderText: "Title" } RowLayout { spacing: Kube.Units.smallSpacing DayChooser { } - TimeChooser { } + TimeChooser { + visible: !root.daylong + } Kube.Label { text: " " + qsTr("till") + " " @@ -64,7 +68,10 @@ FocusScope { DayChooser { } - TimeChooser { } + TimeChooser { + visible: !root.daylong + + } } RowLayout { @@ -72,16 +79,22 @@ FocusScope { RowLayout { Layout.fillHeight: true - Kube.CheckBox { - } + Kube.CheckBox { + checked: root.daylong - Kube.Label { - text: "daylong" - } + onClicked: { + root.daylong = !root.daylong + } + } + + Kube.Label { + text: "daylong" + } } Kube.ComboBox { - model: ["once", "reoccuring"] + model: ["once", "dayly", "weekly"] + } } -- cgit v1.2.3