From 4263778b2cf06dbdba24c7dfe2e54268a50de257 Mon Sep 17 00:00:00 2001 From: Szabolcs David Date: Thu, 21 Feb 2019 14:04:44 +0100 Subject: Quicknanobrowser: Hide status bubble properly Status bubble is always visible in the lower left corner. Change-Id: I334246d65261b8c762aafb7d276122f63fe3a8ba Reviewed-by: Allan Sandfeld Jensen --- examples/webengine/quicknanobrowser/BrowserWindow.qml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'examples/webengine') diff --git a/examples/webengine/quicknanobrowser/BrowserWindow.qml b/examples/webengine/quicknanobrowser/BrowserWindow.qml index 8d62482da..0ac69ef24 100644 --- a/examples/webengine/quicknanobrowser/BrowserWindow.qml +++ b/examples/webengine/quicknanobrowser/BrowserWindow.qml @@ -380,11 +380,12 @@ ApplicationWindow { focus: true onLinkHovered: function(hoveredUrl) { - if (hoveredUrl === "") - resetStatusText.start(); + if (hoveredUrl == "") + hideStatusText.start(); else { - resetStatusText.stop(); statusText.text = hoveredUrl; + statusBubble.visible = true; + hideStatusText.stop(); } } @@ -566,6 +567,7 @@ ApplicationWindow { id: statusBubble color: "oldlace" property int padding: 8 + visible: false anchors.left: parent.left anchors.bottom: parent.bottom @@ -578,9 +580,12 @@ ApplicationWindow { elide: Qt.ElideMiddle Timer { - id: resetStatusText + id: hideStatusText interval: 750 - onTriggered: statusText.text = "" + onTriggered: { + statusText.text = ""; + statusBubble.visible = false; + } } } } -- cgit v1.2.3