From b3467c0ff2de1c0342895bfcd1b2240bf65a84a1 Mon Sep 17 00:00:00 2001 From: "mr. m" <91018726+mr-cheffy@users.noreply.github.com> Date: Mon, 21 Sep 2026 01:43:48 +0200 Subject: [PATCH] gh-15494: Fixed library media tab freezing (gh-15495) --- src/zen/common/zenThemeModifier.js | 2 +- src/zen/library/ZenLibraryFileTypes.sys.mjs | 6 +++++- src/zen/spaces/ZenSpaceManager.mjs | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/zen/common/zenThemeModifier.js b/src/zen/common/zenThemeModifier.js index c7e01aaaa..605997b92 100644 --- a/src/zen/common/zenThemeModifier.js +++ b/src/zen/common/zenThemeModifier.js @@ -110,7 +110,7 @@ const targetRadius = window.matchMedia("(-moz-mac-tahoe-theme)") .matches ? 11 - : 10; + : 9; document.documentElement.style.setProperty( "--zen-border-radius", targetRadius + "px" diff --git a/src/zen/library/ZenLibraryFileTypes.sys.mjs b/src/zen/library/ZenLibraryFileTypes.sys.mjs index 0ee7d9eb7..49b0bf15c 100644 --- a/src/zen/library/ZenLibraryFileTypes.sys.mjs +++ b/src/zen/library/ZenLibraryFileTypes.sys.mjs @@ -70,7 +70,11 @@ export function contentTypeOf(fileName) { if (!extension) { return ""; } - return lazy.mimeService.getTypeFromExtension(extension); + try { + return lazy.mimeService.getTypeFromExtension(extension); + } catch { + return ""; + } } /** diff --git a/src/zen/spaces/ZenSpaceManager.mjs b/src/zen/spaces/ZenSpaceManager.mjs index 5a77f7254..889947301 100644 --- a/src/zen/spaces/ZenSpaceManager.mjs +++ b/src/zen/spaces/ZenSpaceManager.mjs @@ -3314,7 +3314,7 @@ class nsZenWorkspaces { parent.removeAttribute("icons-overflow"); return; } - const maxButtonSize = 32; // IMPORTANT: This should match the CSS size of the icons + const maxButtonSize = AppConstants.platform == "macosx" ? 34 : 32; // IMPORTANT: This should match the CSS size of the icons const minButtonSize = maxButtonSize / 2; // Minimum size for icons when space is limited const separation = 3; // Space between icons