π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
chore: align caption measurement style and width with UI constraints
benny10benf288be136cfd
diff --git a/mobile/apps/photos/lib/ui/viewer/file/text_detection_overlay_button.dart b/mobile/apps/photos/lib/ui/viewer/file/text_detection_overlay_button.dartindex 81922cc80b..ca17fcbc08 100644--- a/mobile/apps/photos/lib/ui/viewer/file/text_detection_overlay_button.dart+++ b/mobile/apps/photos/lib/ui/viewer/file/text_detection_overlay_button.dart@@ -193,15 +193,15 @@ class _TextDetectionOverlayButtonStatefinal textPainter = TextPainter(text: TextSpan(text: caption.trim(),- style: getEnteTextTheme(context).small,+ style: getEnteTextTheme(context).mini,),textDirection: TextDirection.ltr,textScaler: MediaQuery.textScalerOf(context),maxLines: 3,);- // 2. Measure against the available screen width (assuming ~16px padding on each side)- final double maxWidth = MediaQuery.sizeOf(context).width - 32.0;+ // 2. Measure against the available screen width+ final double maxWidth = MediaQuery.sizeOf(context).width - 16.0;textPainter.layout(maxWidth: maxWidth);// 3. Add the exact calculated text height (capped at 3 lines) + 24px safe padding buffer