This commit is contained in:
timonrieger
2026-01-25 14:50:09 +01:00
parent 85623cb11f
commit c15e00e44f

View File

@@ -162,58 +162,26 @@ class ProfilePictureCropPage extends HookConsumerWidget {
body: SafeArea( body: SafeArea(
child: LayoutBuilder( child: LayoutBuilder(
builder: (BuildContext context, BoxConstraints constraints) { builder: (BuildContext context, BoxConstraints constraints) {
return Column( return Center(
children: [ child: ConstrainedBox(
Container( constraints: BoxConstraints(maxHeight: context.height * 0.7, maxWidth: context.width * 0.9),
padding: const EdgeInsets.only(top: 20), child: Container(
width: constraints.maxWidth * 0.9, decoration: BoxDecoration(
height: constraints.maxHeight * 0.6, borderRadius: const BorderRadius.all(Radius.circular(7)),
child: CropImage(controller: cropController, image: image, gridColor: Colors.white), boxShadow: [
), BoxShadow(
Expanded( color: Colors.black.withValues(alpha: 0.2),
child: Container( spreadRadius: 2,
width: double.infinity, blurRadius: 10,
decoration: BoxDecoration( offset: const Offset(0, 3),
color: context.scaffoldBackgroundColor,
borderRadius: const BorderRadius.only(
topLeft: Radius.circular(20),
topRight: Radius.circular(20),
), ),
), ],
child: Center( ),
child: Column( child: ClipRRect(
mainAxisAlignment: MainAxisAlignment.center, child: CropImage(controller: cropController, image: image, gridColor: Colors.white),
children: [
Padding(
padding: const EdgeInsets.only(left: 20, right: 20, bottom: 10),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
ImmichIconButton(
icon: Icons.rotate_left,
variant: ImmichVariant.ghost,
color: ImmichColor.secondary,
onPressed: isLoading.value
? () {}
: () => cropController.rotateLeft(),
),
ImmichIconButton(
icon: Icons.rotate_right,
variant: ImmichVariant.ghost,
color: ImmichColor.secondary,
onPressed: isLoading.value
? () {}
: () => cropController.rotateRight(),
),
],
),
),
],
),
),
), ),
), ),
], ),
); );
}, },
), ),