Move the CROP band, not the picture
Library CROP now resizes the band in photo fractions, the way FREE always did, instead of panning a re-scaled photo under a screen-sized rectangle: what the band encloses is the export, with no zoom transform left to undo and no aspect that only holds on a square photo. The band is laid out below the top strip, whose height TopBar now reports, so it can never peek under the header. The grain hashes a cell of width/1080 instead of the raw pixel grid, so a 4000px export is no longer ~4x finer than the preview that tuned it.
This commit is contained in:
@@ -21,6 +21,9 @@ interface TopBarProps {
|
||||
// drawn: the icon turns amber while there is a step to go back to.
|
||||
onUndo: () => void;
|
||||
undoDepth: number;
|
||||
// Height of the floating top strip (its own onLayout): App keeps the library
|
||||
// photo — and with it the ratio band — out from under it.
|
||||
onHeight?: (height: number) => void;
|
||||
}
|
||||
|
||||
export default function TopBar({
|
||||
@@ -32,6 +35,7 @@ export default function TopBar({
|
||||
onExportShare,
|
||||
onUndo,
|
||||
undoDepth,
|
||||
onHeight,
|
||||
}: TopBarProps) {
|
||||
const insets = useSafeAreaInsets();
|
||||
const [modalVisible, setModalVisible] = useState(false);
|
||||
@@ -74,6 +78,7 @@ export default function TopBar({
|
||||
<>
|
||||
<View
|
||||
style={{ paddingTop: insets.top + 6 }}
|
||||
onLayout={(e) => onHeight?.(e.nativeEvent.layout.height)}
|
||||
className="absolute top-0 left-0 right-0 z-20 flex-row items-start justify-between px-4"
|
||||
>
|
||||
<View className="max-w-[62%] rounded-xl border border-zinc-800/80 bg-black/45 px-3 py-2">
|
||||
|
||||
Reference in New Issue
Block a user