fix(@desktop/browser): [base_bc] add a bookmark ui is broken

Browser header is now correctly placed when trying to add a bookmark.

Fixes #4548
This commit is contained in:
Noelia 2022-01-28 13:02:48 +01:00 committed by Sale Djenic
parent c702928e1e
commit 2a1e7b3a2d
1 changed files with 6 additions and 4 deletions

View File

@ -239,13 +239,15 @@ Rectangle {
onReload: _internal.currentWebView.reload() onReload: _internal.currentWebView.reload()
onStopLoading: _internal.currentWebView.stop() onStopLoading: _internal.currentWebView.stop()
onAddNewFavoritelClicked: { onAddNewFavoritelClicked: {
Global.openPopup(addFavoriteModal, { Global.openPopup(addFavoriteModal,
x = xPos - 30, {
y = browserHeader.y + browserHeader.height + 4, x: xPos - 30,
y: browserHeader.y + browserHeader.height + 4,
modifiyModal: browserHeader.currentFavorite, modifiyModal: browserHeader.currentFavorite,
toolbarMode: true, toolbarMode: true,
ogUrl: browserHeader.currentFavorite ? browserHeader.currentFavorite.url : _internal.currentWebView.url, ogUrl: browserHeader.currentFavorite ? browserHeader.currentFavorite.url : _internal.currentWebView.url,
ogName: browserHeader.currentFavorite ? browserHeader.currentFavorite.name : _internal.currentWebView.title}) ogName: browserHeader.currentFavorite ? browserHeader.currentFavorite.name : _internal.currentWebView.title
})
} }
onLaunchInBrowser: { onLaunchInBrowser: {
// TODO: disable browsing local files? file:// // TODO: disable browsing local files? file://