diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2022-09-09 16:30:32 +0200 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2022-09-15 17:24:53 +0200 |
| commit | 6eca5c3834403293c4838c6f637d330dc8b74829 (patch) | |
| tree | 5ae44d6c90c527f836971a49a0333471f782d81d /gui/src | |
| parent | 5b0c56c4c703596bc604671387ccdbd10f13882e (diff) | |
| download | mullvadvpn-6eca5c3834403293c4838c6f637d330dc8b74829.tar.xz mullvadvpn-6eca5c3834403293c4838c6f637d330dc8b74829.zip | |
Fix notification cropping
Diffstat (limited to 'gui/src')
| -rw-r--r-- | gui/src/renderer/components/NotificationBanner.tsx | 4 | ||||
| -rw-r--r-- | gui/src/renderer/index.html | 7 |
2 files changed, 9 insertions, 2 deletions
diff --git a/gui/src/renderer/components/NotificationBanner.tsx b/gui/src/renderer/components/NotificationBanner.tsx index 82cf92e129..9f8c63e4b2 100644 --- a/gui/src/renderer/components/NotificationBanner.tsx +++ b/gui/src/renderer/components/NotificationBanner.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useLayoutEffect, useRef, useState } from 'react'; +import React, { useEffect, useRef, useState } from 'react'; import styled from 'styled-components'; import { colors } from '../../config.json'; @@ -138,7 +138,7 @@ export function NotificationBanner(props: INotificationBannerProps) { prevChildren.current = props.children ?? prevChildren.current; }, [props.children]); - useLayoutEffect(() => { + useEffect(() => { const newHeight = props.children !== undefined ? contentRef.current?.getBoundingClientRect().height ?? 0 : 0; if (newHeight !== contentHeight) { diff --git a/gui/src/renderer/index.html b/gui/src/renderer/index.html index 043955b3c5..e262187014 100644 --- a/gui/src/renderer/index.html +++ b/gui/src/renderer/index.html @@ -2,6 +2,13 @@ <html> <head> <title>Mullvad VPN</title> + <link rel="preload" href="../../assets/fonts/SourceSansPro-Bold.ttf" as="font" /> + <link rel="preload" href="../../assets/fonts/NotoSansMyanmar-Bold.ttf" as="font" /> + <link rel="preload" href="../../assets/fonts/NotoSansThai-Bold.ttf" as="font" /> + <link rel="preload" href="../../assets/fonts/SourceSansPro-SemiBold.ttf" as="font" /> + <link rel="preload" href="../../assets/fonts/OpenSans-Bold.ttf" as="font" /> + <link rel="preload" href="../../assets/fonts/OpenSans-Semibold.ttf" as="font" /> + <link rel="preload" href="../../assets/fonts/OpenSans-Regular.ttf" as="font" /> <link rel="stylesheet" href="../../assets/css/style.css" /> <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline'"> <meta charset="UTF-8"> |
