From 31326e96a86dc8f0d0953cdd447c2b0087666a50 Mon Sep 17 00:00:00 2001
From: Jonas Sander <29028262+Jonas-Sander@users.noreply.github.com>
Date: Thu, 25 Jul 2024 16:32:13 +0200
Subject: [PATCH] Use adaptive platform density for privacy policy. (#1691)
With 219bea1093928fa3192b99a215eb5c6e1f53fb7e we started to use
`VisualDensitySetting.standard()` on all platforms instead of
`VisualDensitySetting.adaptivePlatformDensity()`. Since the latter is
better for the privacy policy UI on desktops we override it on this
page.
| Before | After |
| - | - |
|
|
|
---------
Co-authored-by: Nils Reichardt
---
.../legal/privacy_policy/privacy_policy_page.dart | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/app/lib/legal/privacy_policy/privacy_policy_page.dart b/app/lib/legal/privacy_policy/privacy_policy_page.dart
index c965f509a..f71ea5455 100644
--- a/app/lib/legal/privacy_policy/privacy_policy_page.dart
+++ b/app/lib/legal/privacy_policy/privacy_policy_page.dart
@@ -52,8 +52,19 @@ class PrivacyPolicyPage extends StatelessWidget {
create: (context) {
final themeSettings =
Provider.of(context, listen: false);
- return _createPrivacyPolicyThemeSettings(
+ final newSettings = _createPrivacyPolicyThemeSettings(
context, themeSettings, config);
+ // As of this writing, we always use
+ // VisualDensitySetting.standard() instead of
+ // VisualDensitySetting.adaptivePlatformDensity() on all
+ // platforms. This may make sense for the general UI, but for
+ // the privacy policy page it is much better to use the adaptive
+ // spacing. This will make the TOC tiles more compact for
+ // desktop (since users will most likely be using a mouse there)
+ // and more spread out for touch users.
+ newSettings.visualDensitySetting =
+ VisualDensitySetting.adaptivePlatformDensity();
+ return newSettings;
},
),
Provider(