Skip to content
This repository has been archived by the owner on Jan 22, 2022. It is now read-only.

Auto hide the bottom edge hint #332

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions src/app/webbrowser/Browser.qml
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,11 @@ Common.BrowserView {
}
visible: bottomEdgeHandle.enabled && !internal.hasMouse
opacity: recentView.visible ? 0 : 1

function show() {
opacity = Qt.binding(function(){return recentView.visible ? 0 : 1})
}

Behavior on opacity {
UbuntuNumberAnimation {}
}
Expand All @@ -999,6 +1004,31 @@ Common.BrowserView {
// TRANSLATORS: %1 refers to the current number of tabs opened
text: i18n.tr("(%1)").arg(tabsModel ? tabsModel.count : 0)
}

Timer {
id: autohideTimer
interval: 2000
onTriggered: {
bottomEdgeHint.opacity = 0
}
}

Connections {
target: currentWebview ? currentWebview : null
onScrollPositionChanged: {
bottomEdgeHint.show()
autohideTimer.restart()
}
}

Connections {
target: browser

onCurrentWebviewChanged: {
autohideTimer.stop()
bottomEdgeHint.show()
}
}
}

MouseArea {
Expand Down