fix: account for safe area for floating buttons on mobile (#5420)

This commit is contained in:
David Luzar 2022-07-19 15:44:14 +02:00 committed by GitHub
parent 792f238d16
commit a7937681e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 18 deletions

View File

@ -227,18 +227,20 @@ export const MobileMenu = ({
) : null} ) : null}
<footer className="App-toolbar"> <footer className="App-toolbar">
{renderAppToolbar()} {renderAppToolbar()}
{appState.scrolledOutside && !appState.openMenu && ( {appState.scrolledOutside &&
<button !appState.openMenu &&
className="scroll-back-to-content" !appState.isLibraryOpen && (
onClick={() => { <button
setAppState({ className="scroll-back-to-content"
...calculateScrollCenter(elements, appState, canvas), onClick={() => {
}); setAppState({
}} ...calculateScrollCenter(elements, appState, canvas),
> });
{t("buttons.scrollBackToContent")} }}
</button> >
)} {t("buttons.scrollBackToContent")}
</button>
)}
</footer> </footer>
</Island> </Island>
</div> </div>

View File

@ -212,16 +212,14 @@
} }
} }
.ToolIcon.ToolIcon__library { .ToolIcon.ToolIcon__library {
top: 100px; top: calc(var(--sat) + 100px);
} }
.ToolIcon.ToolIcon__lock { .ToolIcon.ToolIcon__lock {
margin-inline-end: 0; top: calc(var(--sat) + 60px);
top: 60px;
} }
.ToolIcon.ToolIcon__penMode { .ToolIcon.ToolIcon__penMode {
margin-inline-end: 0; top: calc(var(--sat) + 140px);
top: 140px;
} }
} }

View File

@ -32,7 +32,6 @@
} }
.ToolIcon.ToolIcon__lock { .ToolIcon.ToolIcon__lock {
margin-inline-end: var(--space-factor);
&.ToolIcon_type_floating { &.ToolIcon_type_floating {
margin-left: 0.1rem; margin-left: 0.1rem;
} }