mobile actions

This commit is contained in:
Ryan Di
2025-09-19 13:52:54 +10:00
parent e064bc236f
commit ddb5dc313c
5 changed files with 662 additions and 362 deletions

View File

@@ -110,8 +110,8 @@
--default-button-size: 2rem;
.compact-action-button {
width: 2rem;
height: 2rem;
width: 1.625rem;
height: 1.625rem;
border: none;
border-radius: var(--border-radius-lg);
background: transparent;
@@ -167,6 +167,11 @@
}
}
}
.ToolIcon__icon {
width: 1.625rem;
height: 1.625rem;
}
}
.compact-shape-actions-island {
@@ -199,6 +204,17 @@
}
}
.mobile-shape-actions {
z-index: 999;
display: flex;
flex-direction: row;
justify-content: space-between;
width: 100%;
background: transparent;
border-radius: var(--border-radius-lg);
box-shadow: none;
}
.shape-actions-theme-scope {
--button-border: transparent;
--button-bg: var(--color-surface-mid);

File diff suppressed because it is too large Load Diff

View File

@@ -106,6 +106,7 @@ export const FontPicker = React.memo(
<FontPickerTrigger
selectedFontFamily={selectedFontFamily}
isOpened={isOpened}
compactMode={compactMode}
/>
{isOpened && (
<FontPickerList

View File

@@ -338,11 +338,13 @@ export const FontPickerList = React.memo(
onKeyDown={onKeyDown}
preventAutoFocusOnTouch={!!app.state.editingTextElement}
>
<QuickSearch
ref={inputRef}
placeholder={t("quickSearch.placeholder")}
onChange={debounce(setSearchTerm, 20)}
/>
{app.state.stylesPanelMode === "full" && (
<QuickSearch
ref={inputRef}
placeholder={t("quickSearch.placeholder")}
onChange={debounce(setSearchTerm, 20)}
/>
)}
<ScrollableList
className="dropdown-menu fonts manual-hover"
placeholder={t("fontList.empty")}

View File

@@ -11,11 +11,13 @@ import { useExcalidrawSetAppState } from "../App";
interface FontPickerTriggerProps {
selectedFontFamily: FontFamilyValues | null;
isOpened?: boolean;
compactMode?: boolean;
}
export const FontPickerTrigger = ({
selectedFontFamily,
isOpened = false,
compactMode = false,
}: FontPickerTriggerProps) => {
const setAppState = useExcalidrawSetAppState();
@@ -37,6 +39,8 @@ export const FontPickerTrigger = ({
}}
style={{
border: "none",
width: compactMode ? "1.625rem" : undefined,
height: compactMode ? "1.625rem" : undefined,
}}
/>
</div>