mirror of
https://github.com/zen-browser/desktop.git
synced 2026-02-22 03:16:40 +00:00
feat: Correctly calculate size of folder search popup, b=no-bug, c=flatpak, folders, workspaces
This commit is contained in:
@@ -25,6 +25,7 @@ finish-args:
|
||||
- --filesystem=xdg-run/speech-dispatcher:ro
|
||||
- --device=all
|
||||
- --talk-name=org.freedesktop.FileManager1
|
||||
- --talk-name=org.freedesktop.Notifications
|
||||
- --system-talk-name=org.freedesktop.NetworkManager
|
||||
- --talk-name=org.a11y.Bus
|
||||
- --talk-name=org.gtk.vfs.*
|
||||
|
||||
@@ -730,7 +730,7 @@ class nsZenFolders extends nsZenDOMOperatedFeature {
|
||||
get #searchPopupOptions() {
|
||||
const isRightSide = gZenVerticalTabsManager._prefsRightSide;
|
||||
const position = isRightSide ? "start_before" : "start_before";
|
||||
let size = this.#popup.querySelector("#zen-folder-tabs-list").children.length + 1;
|
||||
let size = Math.min(this.#popup.querySelector("#zen-folder-tabs-list").children.length, 6) + 1;
|
||||
size *= 48;
|
||||
return {
|
||||
position,
|
||||
|
||||
@@ -815,13 +815,12 @@ class nsZenWindowSync {
|
||||
});
|
||||
|
||||
let promise = this.#createPseudoImageForBrowser(otherBrowser, mySrc);
|
||||
|
||||
await Promise.all([promiseToWait, promise]);
|
||||
aOurTab.ownerGlobal.requestAnimationFrame(() => {
|
||||
otherBrowser.setAttribute("zen-pseudo-hidden", "true");
|
||||
ourBrowser.removeAttribute("zen-pseudo-hidden");
|
||||
this.#maybeRemovePseudoImageForBrowser(ourBrowser);
|
||||
});
|
||||
callback();
|
||||
otherBrowser.setAttribute("zen-pseudo-hidden", "true");
|
||||
ourBrowser.removeAttribute("zen-pseudo-hidden");
|
||||
this.#maybeRemovePseudoImageForBrowser(ourBrowser);
|
||||
} else {
|
||||
ourBrowser.removeAttribute("zen-pseudo-hidden");
|
||||
this.#maybeRemovePseudoImageForBrowser(ourBrowser);
|
||||
|
||||
@@ -159,7 +159,7 @@ class nsZenWorkspaces {
|
||||
}
|
||||
}
|
||||
|
||||
async #afterLoadInit() {
|
||||
#afterLoadInit() {
|
||||
const onResize = (...args) => {
|
||||
requestAnimationFrame(() => {
|
||||
this.onPinnedTabsResize(...args);
|
||||
@@ -918,7 +918,7 @@ class nsZenWorkspaces {
|
||||
this.#initializeEmptyTab();
|
||||
return (async () => {
|
||||
await this.#waitForPromises();
|
||||
await this.#afterLoadInit();
|
||||
this.#afterLoadInit();
|
||||
await this.workspaceBookmarks();
|
||||
await this.changeWorkspace(activeWorkspace, { onInit: true });
|
||||
this.#fixTabPositions();
|
||||
|
||||
Reference in New Issue
Block a user