From 299a755ec15bac0103c268c0083ebd8f0741c5d2 Mon Sep 17 00:00:00 2001 From: stuebinm Date: Fri, 29 Mar 2024 02:27:08 +0100 Subject: flora/element-web: correct patch for left side bar without this, there's lots of extra space since the in-javascript layout script thinks boxes take up more space than they actually do (i think there was this nice idea, once, about separating the UI from the rest of the application? ah well) --- pkgs/overlay.nix | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/pkgs/overlay.nix b/pkgs/overlay.nix index 93de992..c8e91a3 100644 --- a/pkgs/overlay.nix +++ b/pkgs/overlay.nix @@ -118,14 +118,12 @@ in element-web-unwrapped = super.element-web-unwrapped.overrideAttrs { patches = [ ./patches/element-css.patch ]; + # the below patches the javascript's assumptions about box height + # in the left side bar so that hiding overflow will work correctly + # should be .mx_RoomTile's height + 12px preBuild = '' - substituteInPlace node_modules/matrix-react-sdk/lib/components/views/rooms/RoomSublist.js \ - --replace "HEADER_HEIGHT = 32" "HEADER_HEIGHT = 10" \ - --replace "SHOW_N_BUTTON_HEIGHT = 28" "SHOW_N_BUTTON_HEIGHT = 16" - substituteInPlace node_modules/matrix-react-sdk/lib/src/components/views/rooms/RoomSublist.d.ts \ - --replace "HEADER_HEIGHT = 32" "HEADER_HEIGHT = 10" - substituteInPlace node_modules/matrix-react-sdk/lib/stores/room-list/ListLayout.js \ - --replace "TILE_HEIGHT_PX = 44" "TILE_HEIGHT = 22" + substituteInPlace node_modules/matrix-react-sdk/src/stores/room-list/ListLayout.ts \ + --replace "TILE_HEIGHT_PX = 44" "TILE_HEIGHT_PX = 32" ''; }; -- cgit v1.2.3