Skip to content

armgit / ente

Public Imported from GitHub
0

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

Fix extra spacing below header in offline mode when GetStartedBanner is dismissed

ashilkn12f9191ac39e
diff --git a/mobile/apps/photos/lib/ui/components/banners/get_started_banner.dart b/mobile/apps/photos/lib/ui/components/banners/get_started_banner.dart
index 6d01e29960..dbc94e6e40 100644
--- a/mobile/apps/photos/lib/ui/components/banners/get_started_banner.dart
+++ b/mobile/apps/photos/lib/ui/components/banners/get_started_banner.dart
@@ -37,92 +37,95 @@ class _GetStartedBannerState extends State<GetStartedBanner> {
color: Colors.white,
);
- return GestureDetector(
- onTap: _onGetStarted,
- child: Container(
- height: 180,
- clipBehavior: Clip.hardEdge,
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(16),
- color: colorScheme.greenBase,
- ),
- child: Stack(
- children: [
- Padding(
- padding: const EdgeInsets.all(16),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Row(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Expanded(
- child: ConstrainedBox(
- constraints: const BoxConstraints(maxWidth: 235),
- child: Text(
- l10n.moreThanJustAGallery,
- style: titleStyle,
- maxLines: 1,
- softWrap: false,
- overflow: TextOverflow.ellipsis,
+ return Padding(
+ padding: const EdgeInsets.symmetric(horizontal: 2, vertical: 8),
+ child: GestureDetector(
+ onTap: _onGetStarted,
+ child: Container(
+ height: 180,
+ clipBehavior: Clip.hardEdge,
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(16),
+ color: colorScheme.greenBase,
+ ),
+ child: Stack(
+ children: [
+ Padding(
+ padding: const EdgeInsets.all(16),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Row(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Expanded(
+ child: ConstrainedBox(
+ constraints: const BoxConstraints(maxWidth: 235),
+ child: Text(
+ l10n.moreThanJustAGallery,
+ style: titleStyle,
+ maxLines: 1,
+ softWrap: false,
+ overflow: TextOverflow.ellipsis,
+ ),
),
),
- ),
- GestureDetector(
- onTap: _onDismiss,
- behavior: HitTestBehavior.opaque,
- child: Container(
- decoration: const BoxDecoration(
- shape: BoxShape.circle,
- color: greenDark,
- ),
- child: const Padding(
- padding: EdgeInsets.all(4),
- child: HugeIcon(
- icon: HugeIcons.strokeRoundedCancel01,
- color: contentDark,
- size: 18,
- strokeWidth: 2.5,
+ GestureDetector(
+ onTap: _onDismiss,
+ behavior: HitTestBehavior.opaque,
+ child: Container(
+ decoration: const BoxDecoration(
+ shape: BoxShape.circle,
+ color: greenDark,
+ ),
+ child: const Padding(
+ padding: EdgeInsets.all(4),
+ child: HugeIcon(
+ icon: HugeIcons.strokeRoundedCancel01,
+ color: contentDark,
+ size: 18,
+ strokeWidth: 2.5,
+ ),
),
),
),
- ),
- ],
- ),
- const SizedBox(height: 4),
- ConstrainedBox(
- constraints: const BoxConstraints(maxWidth: 235),
- child: Text(
- l10n.encryptedBackupDescription,
- style: textTheme.smallMuted.copyWith(
- color: Colors.white.withValues(alpha: 0.9),
+ ],
+ ),
+ const SizedBox(height: 4),
+ ConstrainedBox(
+ constraints: const BoxConstraints(maxWidth: 235),
+ child: Text(
+ l10n.encryptedBackupDescription,
+ style: textTheme.smallMuted.copyWith(
+ color: Colors.white.withValues(alpha: 0.9),
+ ),
),
),
- ),
- ],
+ ],
+ ),
),
- ),
- Positioned(
- left: 16,
- bottom: 16,
- child: BannerActionButton(
- label: l10n.getStarted,
- onTap: _onGetStarted,
- variant: BannerActionButtonVariant.neutral,
+ Positioned(
+ left: 16,
+ bottom: 16,
+ child: BannerActionButton(
+ label: l10n.getStarted,
+ onTap: _onGetStarted,
+ variant: BannerActionButtonVariant.neutral,
+ ),
),
- ),
- Positioned(
- right: 16,
- bottom: 12,
- child: IgnorePointer(
- child: Image.asset(
- "assets/ducky_get_started.png",
- height: 120,
- fit: BoxFit.contain,
+ Positioned(
+ right: 16,
+ bottom: 12,
+ child: IgnorePointer(
+ child: Image.asset(
+ "assets/ducky_get_started.png",
+ height: 120,
+ fit: BoxFit.contain,
+ ),
),
),
- ),
- ],
+ ],
+ ),
),
),
);
diff --git a/mobile/apps/photos/lib/ui/home/header_widget.dart b/mobile/apps/photos/lib/ui/home/header_widget.dart
index ff4a391510..d420bc7779 100644
--- a/mobile/apps/photos/lib/ui/home/header_widget.dart
+++ b/mobile/apps/photos/lib/ui/home/header_widget.dart
@@ -66,11 +66,7 @@ class _HeaderWidgetState extends State<HeaderWidget> {
isOfflineMode && !Configuration.instance.hasConfiguredAccount();
final List<Widget> children = <Widget>[
const StatusBarWidget(),
- if (showGetStartedBanner)
- const Padding(
- padding: EdgeInsets.symmetric(horizontal: 2, vertical: 8),
- child: GetStartedBanner(),
- ),
+ if (showGetStartedBanner) const GetStartedBanner(),
const MemoriesWidget(),
];
if (showWrappedBanner) {