diff --git a/src/app/webbrowser/BottomEdgeHandle.qml b/src/app/webbrowser/BottomEdgeHandle.qml index 5128ff2eb..d7ec26aa6 100644 --- a/src/app/webbrowser/BottomEdgeHandle.qml +++ b/src/app/webbrowser/BottomEdgeHandle.qml @@ -22,7 +22,9 @@ import Ubuntu.Components 1.3 SwipeArea { direction: SwipeArea.Upwards - readonly property real dragFraction: dragging ? Math.min(1.0, Math.max(0.0, distance / parent.height)) : 0.0 + readonly property real dragFraction: Math.min(1.0, Math.max(0.0, distance / parent.height)) readonly property var thresholds: [0.05, 0.18, 0.36, 0.54, 1.0] readonly property int stage: thresholds.map(function(t) { return dragFraction <= t }).indexOf(true) + + immediateRecognition: true } diff --git a/src/app/webbrowser/Browser.qml b/src/app/webbrowser/Browser.qml index 7402b4424..565018faf 100644 --- a/src/app/webbrowser/Browser.qml +++ b/src/app/webbrowser/Browser.qml @@ -578,7 +578,6 @@ Common.BrowserView { if (visible) { currentWebview.hideContextMenu(); - chrome.state = "hidden"; } else { chrome.state = "shown"; @@ -588,6 +587,12 @@ Common.BrowserView { states: State { name: "shown" } + + onStateChanged: { + if (state === "shown") { + chrome.state = "hidden"; + } + } function closeAndSwitchToTab(index) { recentView.reset() @@ -602,16 +607,20 @@ Common.BrowserView { model: tabsModel readonly property real delegateMinHeight: units.gu(20) delegateHeight: { - if (recentView.state == "shown") { - return Math.max(height / 3, delegateMinHeight) - } else if (bottomEdgeHandle.stage == 0) { - return height - } else if (bottomEdgeHandle.stage == 1) { - return (1 - 1.8 * bottomEdgeHandle.dragFraction) * height - } else if (bottomEdgeHandle.stage >= 2) { - return Math.max(height / 3, delegateMinHeight) + if (recentView.visible) { + if (recentView.state == "shown") { + return Math.max(height / 3, delegateMinHeight) + } else if (bottomEdgeHandle.stage == 0) { + return height + } else if (bottomEdgeHandle.stage == 1) { + return (1 - 1.8 * bottomEdgeHandle.dragFraction) * height + } else if (bottomEdgeHandle.stage >= 2) { + return Math.max(height / 3, delegateMinHeight) + } else { + return delegateMinHeight + } } else { - return delegateMinHeight + return height } } chromeHeight: chrome.height diff --git a/src/app/webbrowser/NavigationBar.qml b/src/app/webbrowser/NavigationBar.qml index 627941c18..b6df9a850 100644 --- a/src/app/webbrowser/NavigationBar.qml +++ b/src/app/webbrowser/NavigationBar.qml @@ -224,24 +224,6 @@ FocusScope { onTriggered: internal.webview.findController.next() } - ChromeButton { - id: closeButton - objectName: "closeButton" - - iconName: "close" - iconSize: 0.3 * height - iconColor: root.iconColor - - height: root.height - width: height * 0.8 - - anchors.verticalCenter: parent.verticalCenter - - visible: tabListMode - - onTriggered: closeTabRequested() - } - ChromeButton { id: downloadsButton objectName: "downloadsButton"