From 87ee80bb883dd1b694a4532f392840828be2eea1 Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Wed, 23 Nov 2016 10:16:02 +0100 Subject: [PATCH] feat(Linphone/Timeline): display a shadow below tooltip --- tests/ui/modules/Common/Styles/PopupStyle.qml | 6 +++--- tests/ui/modules/Common/Tooltip/Tooltip.qml | 5 +++++ tests/ui/modules/Linphone/Chat/Chat.qml | 4 ++-- tests/ui/modules/Linphone/Timeline.qml | 14 +++++++------- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/tests/ui/modules/Common/Styles/PopupStyle.qml b/tests/ui/modules/Common/Styles/PopupStyle.qml index 6a8d7b0e0..ba28fe528 100644 --- a/tests/ui/modules/Common/Styles/PopupStyle.qml +++ b/tests/ui/modules/Common/Styles/PopupStyle.qml @@ -15,9 +15,9 @@ QtObject { property QtObject shadow: QtObject { property color color: Colors.l - property int horizontalOffset: 4 - property int radius: 8 + property int horizontalOffset: 2 + property int radius: 10 property int samples: 15 - property int verticalOffset: 4 + property int verticalOffset: 2 } } diff --git a/tests/ui/modules/Common/Tooltip/Tooltip.qml b/tests/ui/modules/Common/Tooltip/Tooltip.qml index dfd62b904..21a42ae55 100644 --- a/tests/ui/modules/Common/Tooltip/Tooltip.qml +++ b/tests/ui/modules/Common/Tooltip/Tooltip.qml @@ -80,6 +80,11 @@ ToolTip { background: Item { id: container + layer { + enabled: true + effect: PopupShadow {} + } + Rectangle { anchors { fill: parent diff --git a/tests/ui/modules/Linphone/Chat/Chat.qml b/tests/ui/modules/Linphone/Chat/Chat.qml index 01efbd08a..974f420ca 100644 --- a/tests/ui/modules/Linphone/Chat/Chat.qml +++ b/tests/ui/modules/Linphone/Chat/Chat.qml @@ -62,7 +62,7 @@ ColumnLayout { // Cast section to integer because Qt converts the // $dateSection in string!!! text: new Date(+section).toLocaleDateString( - Qt.locale() + Qt.locale(App.locale()) ) } } @@ -144,7 +144,7 @@ ColumnLayout { color: ChatStyle.entry.time.color font.pointSize: ChatStyle.entry.time.fontSize text: new Date($timestamp).toLocaleString( - Qt.locale(), + Qt.locale(App.locale()), 'hh:mm' ) verticalAlignment: Text.AlignVCenter diff --git a/tests/ui/modules/Linphone/Timeline.qml b/tests/ui/modules/Linphone/Timeline.qml index 05df26eb5..de2ae67dd 100644 --- a/tests/ui/modules/Linphone/Timeline.qml +++ b/tests/ui/modules/Linphone/Timeline.qml @@ -95,14 +95,14 @@ ColumnLayout { usernameColor: view.currentIndex === index ? TimelineStyle.contact.username.color.selected : TimelineStyle.contact.username.color.normal - } - Loader { - anchors.fill: parent - sourceComponent: TooltipArea { - text: $timelineEntry.timestamp.toLocaleString( - Qt.locale(App.locale()), Locale.ShortFormat - ) + Loader { + anchors.fill: parent + sourceComponent: TooltipArea { + text: $timelineEntry.timestamp.toLocaleString( + Qt.locale(App.locale()), Locale.ShortFormat + ) + } } }