From 4aa770c118f328f2e3073bcd2f364a115b8e37ed Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 5 Dec 2024 00:57:07 +0100 Subject: [PATCH] UPDATE: Makes 'File' button the same as 'Help', makes manu consistent --- webapp/src/AppComponents/FileMenu.tsx | 32 +++++++++++++++++++-------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/webapp/src/AppComponents/FileMenu.tsx b/webapp/src/AppComponents/FileMenu.tsx index 4d1d233..af7b20c 100644 --- a/webapp/src/AppComponents/FileMenu.tsx +++ b/webapp/src/AppComponents/FileMenu.tsx @@ -41,7 +41,7 @@ export function FileMenu(props: { > {models[uuid]} - , + ); } @@ -57,9 +57,19 @@ export function FileMenu(props: { open={isMenuOpen} onClose={(): void => setMenuOpen(false)} anchorEl={anchorElement.current} + sx={{ + "& .MuiPaper-root": { borderRadius: "8px", padding: "4px 0px" }, + "& .MuiList-root": { padding: "0" }, + }} + // anchorOrigin={properties.anchorOrigin} > - + { + props.newModel(); + setMenuOpen(false); + }} + > New @@ -157,11 +167,11 @@ const StyledCheck = styled(Check)` `; const MenuDivider = styled("div")` - width: 80%; + width: 100%; margin: auto; - margin-top: 8px; - margin-bottom: 8px; - border-top: 1px solid #e0e0e0; + margin-top: 4px; + margin-bottom: 4px; + border-top: 1px solid #eeeeee; `; const MenuItemText = styled("div")` @@ -173,7 +183,12 @@ const MenuItemWrapper = styled(MenuItem)` display: flex; justify-content: flex-start; font-size: 14px; - width: 100%; + width: calc(100% - 8px); + min-width: 172px; + margin: 0px 4px; + border-radius: 4px; + padding: 8px; + height: 32px; `; const FileMenuWrapper = styled("div")` @@ -181,8 +196,7 @@ const FileMenuWrapper = styled("div")` align-items: center; font-size: 12px; font-family: Inter; - padding: 10px; - height: 20px; + padding: 8px; border-radius: 4px; cursor: pointer; &:hover {