From eccd8772189e94483a10c9090b3054b4aa7524c1 Mon Sep 17 00:00:00 2001 From: Michael Bohlender Date: Fri, 2 Mar 2018 10:30:07 +0100 Subject: bring events forward when hovered --- views/calendar/qml/View.qml | 18 ++++++++++++++++-- views/calendar/qml/WeekEvents.qml | 24 +++++++++++++++++++++++- 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/views/calendar/qml/View.qml b/views/calendar/qml/View.qml index ac82ec70..704b46f7 100644 --- a/views/calendar/qml/View.qml +++ b/views/calendar/qml/View.qml @@ -26,7 +26,6 @@ import org.kube.framework 1.0 as Kube FocusScope { id: root - Item { anchors { top: parent.top @@ -173,6 +172,7 @@ FocusScope { model: parent.events delegate: Rectangle { + id: eventDelegate anchors { right: parent.right rightMargin: Kube.Units.smallSpacing @@ -194,11 +194,25 @@ FocusScope { text: model.text color: Kube.Colors.highlightedTextColor } + + MouseArea { + anchors.fill: parent + + hoverEnabled: true + + onEntered: { + eventDelegate.z = eventDelegate.z + 100 + } + onExited: { + eventDelegate.z = eventDelegate.z - 100 + + } + + } } } } } - } } } diff --git a/views/calendar/qml/WeekEvents.qml b/views/calendar/qml/WeekEvents.qml index c8a420e0..005fb19e 100644 --- a/views/calendar/qml/WeekEvents.qml +++ b/views/calendar/qml/WeekEvents.qml @@ -63,7 +63,29 @@ ListModel { ] } ListElement { - events: [] + events: [ + ListElement { + color: "#134bab" + starts: 8 + duration: 5 + indention: 0 + text: "Meeting" + }, + ListElement { + color: "#af1a6a" + starts: 8 + duration: 4 + indention: 1 + text: "Meeting2" + }, + ListElement { + color: "#af1a6a" + starts: 9 + duration: 7 + indention: 2 + text: "Meeting2" + } + ] } ListElement { events: [] -- cgit v1.2.3