Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

fix: scaling of text in code, etc

Prateek Sunal1bcf2c92b44a
diff --git a/auth/lib/onboarding/view/common/tag_chip.dart b/auth/lib/onboarding/view/common/tag_chip.dart
index 7f71e68b84..613b463493 100644
--- a/auth/lib/onboarding/view/common/tag_chip.dart
+++ b/auth/lib/onboarding/view/common/tag_chip.dart
@@ -47,13 +47,19 @@ class TagChip extends StatelessWidget {
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
- Text(
- label,
- style: TextStyle(
- color: state == TagChipState.selected ||
- Theme.of(context).brightness == Brightness.dark
- ? Colors.white
- : colorScheme.tagTextUnselectedColor,
+ MediaQuery(
+ data: MediaQuery.of(context).copyWith(
+ textScaler: const TextScaler.linear(1),
+ ),
+ child: Text(
+ label,
+ style: TextStyle(
+ color: state == TagChipState.selected ||
+ Theme.of(context).brightness == Brightness.dark
+ ? Colors.white
+ : colorScheme.tagTextUnselectedColor,
+ fontSize: 14,
+ ),
),
),
if (state == TagChipState.selected &&
diff --git a/auth/lib/ui/code_widget.dart b/auth/lib/ui/code_widget.dart
index cb8b274cad..a085c29db3 100644
--- a/auth/lib/ui/code_widget.dart
+++ b/auth/lib/ui/code_widget.dart
@@ -2,6 +2,7 @@ import 'dart:async';
import 'dart:io';
import 'dart:ui' as ui;
+import 'package:auto_size_text/auto_size_text.dart';
import 'package:clipboard/clipboard.dart';
import 'package:ente_auth/core/configuration.dart';
import 'package:ente_auth/ente_theme_data.dart';
@@ -113,7 +114,7 @@ class _CodeWidgetState extends State<CodeWidget> {
CodeTimerProgress(
period: widget.code.period,
),
- const SizedBox(height: 16),
+ const SizedBox(height: 16 + 12),
Row(
children: [
_shouldShowLargeIcon ? _getIcon() : const SizedBox.shrink(),
@@ -129,7 +130,7 @@ class _CodeWidgetState extends State<CodeWidget> {
],
),
const SizedBox(
- height: 20,
+ height: 20 + 12,
),
],
),
@@ -148,7 +149,6 @@ class _CodeWidgetState extends State<CodeWidget> {
Widget clippedCard(AppLocalizations l10n) {
return Container(
- height: 132,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
color: Theme.of(context).colorScheme.codeCardBackgroundColor,
@@ -331,14 +331,16 @@ class _CodeWidgetState extends State<CodeWidget> {
builder: (context, value, child) {
return Material(
type: MaterialType.transparency,
- child: Text(
+ child: AutoSizeText(
_getFormattedCode(value),
style: const TextStyle(fontSize: 24),
+ maxLines: 1,
),
);
},
),
),
+ const SizedBox(width: 8),
widget.code.type.isTOTPCompatible
? GestureDetector(
onTap: () {
@@ -395,26 +397,28 @@ class _CodeWidgetState extends State<CodeWidget> {
return Padding(
padding: const EdgeInsets.only(left: 16, right: 16),
child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
- Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Text(
- safeDecode(widget.code.issuer).trim(),
- style: Theme.of(context).textTheme.titleLarge,
- ),
- const SizedBox(height: 2),
- Text(
- safeDecode(widget.code.account).trim(),
- style: Theme.of(context).textTheme.bodySmall?.copyWith(
- fontSize: 12,
- color: Colors.grey,
- ),
- ),
- ],
+ Expanded(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(
+ safeDecode(widget.code.issuer).trim(),
+ style: Theme.of(context).textTheme.titleLarge,
+ ),
+ const SizedBox(height: 2),
+ Text(
+ safeDecode(widget.code.account).trim(),
+ style: Theme.of(context).textTheme.bodySmall?.copyWith(
+ fontSize: 12,
+ color: Colors.grey,
+ ),
+ ),
+ ],
+ ),
),
+ const SizedBox(width: 8),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
diff --git a/auth/lib/ui/home/speed_dial_label_widget.dart b/auth/lib/ui/home/speed_dial_label_widget.dart
index 4889ffb6a9..78bcfb154f 100644
--- a/auth/lib/ui/home/speed_dial_label_widget.dart
+++ b/auth/lib/ui/home/speed_dial_label_widget.dart
@@ -11,17 +11,22 @@ class SpeedDialLabelWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
- return Container(
- margin: const EdgeInsets.all(4),
- padding: const EdgeInsets.all(12),
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(8),
- color: Theme.of(context).colorScheme.fabBackgroundColor,
+ return MediaQuery(
+ data: const MediaQueryData(
+ textScaler: TextScaler.linear(1),
),
- child: Text(
- label,
- style: TextStyle(
- color: Theme.of(context).colorScheme.fabForegroundColor,
+ child: Container(
+ margin: const EdgeInsets.all(4),
+ padding: const EdgeInsets.all(12),
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(8),
+ color: Theme.of(context).colorScheme.fabBackgroundColor,
+ ),
+ child: Text(
+ label,
+ style: TextStyle(
+ color: Theme.of(context).colorScheme.fabForegroundColor,
+ ),
),
),
);
diff --git a/auth/pubspec.lock b/auth/pubspec.lock
index 5e425ae12f..914d5281a5 100644
--- a/auth/pubspec.lock
+++ b/auth/pubspec.lock
@@ -65,6 +65,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.11.0"
+ auto_size_text:
+ dependency: "direct main"
+ description:
+ name: auto_size_text
+ sha256: "3f5261cd3fb5f2a9ab4e2fc3fba84fd9fcaac8821f20a1d4e71f557521b22599"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.0.0"
base32:
dependency: "direct main"
description:
@@ -1707,10 +1715,10 @@ packages:
dependency: transitive
description:
name: vm_service
- sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc
+ sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
url: "https://pub.dev"
source: hosted
- version: "14.2.4"
+ version: "14.2.5"
watcher:
dependency: transitive
description:
diff --git a/auth/pubspec.yaml b/auth/pubspec.yaml
index 8c7e28b873..5ec1a00636 100644
--- a/auth/pubspec.yaml
+++ b/auth/pubspec.yaml
@@ -10,6 +10,7 @@ dependencies:
adaptive_theme: ^3.1.0 # done
app_links: ^3.5.0
archive: ^3.3.7
+ auto_size_text: ^3.0.0
base32: ^2.1.3
bip39: ^1.0.6 #done
bloc: ^8.1.2
diff --git a/mobile/plugins/clip_ggml b/mobile/plugins/clip_ggml
new file mode 160000
index 0000000000..16c7daea5d
--- /dev/null
+++ b/mobile/plugins/clip_ggml
@@ -0,0 +1 @@
+Subproject commit 16c7daea5d6b80235ac473f1a823b0ff44f5305e