Skip to content

Commit 01b026f

Browse files
none23maria-rcks
andauthored
fix(mobile): scale compose buttons with text size (#26100)
Co-authored-by: maria-rcks <[email protected]>
1 parent e123ac6 commit 01b026f

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

‎apps/mobile/src/components/ScrollComposeButton.android.tsx‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@ import { Box, ExtendedFloatingActionButton, Icon, Text } from "@expo/ui/jetpack-
33
import {
44
defaultMinSize,
55
fillMaxWidth,
6-
graphicsLayer,
76
height,
87
onSizeChanged,
98
size,
109
} from "@expo/ui/jetpack-compose/modifiers";
1110
import { useState } from "react";
12-
import { Pressable, View, type StyleProp, type ViewStyle } from "react-native";
11+
import { I18nManager, Pressable, View, type StyleProp, type ViewStyle } from "react-native";
1312
import { useAndroidControlSizing } from "./ui/useAndroidControlSizing";
1413
import { useAppearancePreferences } from "../features/settings/appearance/AppearancePreferencesProvider";
1514
import { resolveScaledTextRole } from "../lib/appearancePreferences";
@@ -37,7 +36,14 @@ export function ScrollComposeButton(props: {
3736
className={props.className}
3837
style={[props.style, { left: 20, height: fabSize }]}
3938
>
40-
<View pointerEvents="none" importantForAccessibility="no-hide-descendants">
39+
<View
40+
pointerEvents="none"
41+
importantForAccessibility="no-hide-descendants"
42+
style={{
43+
transform: [{ scale }],
44+
transformOrigin: I18nManager.isRTL ? "top left" : "top right",
45+
}}
46+
>
4147
<NativeThemeHost
4248
matchContents={{ vertical: true }}
4349
ignoreSafeAreaKeyboardInsets
@@ -50,12 +56,6 @@ export function ScrollComposeButton(props: {
5056
modifiers={[
5157
defaultMinSize({ minWidth: nativeSize }),
5258
height(nativeSize),
53-
graphicsLayer({
54-
scaleX: scale,
55-
scaleY: scale,
56-
transformOriginX: 1,
57-
transformOriginY: 0,
58-
}),
5959
onSizeChanged(rememberWidth),
6060
]}
6161
>

0 commit comments

Comments
 (0)