From bd4796116eec3a81591093c273cd49b521ba2db4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20B=C3=B6sche?= Date: Sun, 25 Jan 2026 15:52:05 +0100 Subject: [PATCH] Refactor ModernGlassButton to accept customizable padding --- b0esche_cloud/lib/pages/public_file_viewer.dart | 1 + b0esche_cloud/lib/theme/modern_glass_button.dart | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/b0esche_cloud/lib/pages/public_file_viewer.dart b/b0esche_cloud/lib/pages/public_file_viewer.dart index 2e65917..05b0f45 100644 --- a/b0esche_cloud/lib/pages/public_file_viewer.dart +++ b/b0esche_cloud/lib/pages/public_file_viewer.dart @@ -336,6 +336,7 @@ class _PublicFileViewerState extends State { padding: const EdgeInsets.only(left: 16, top: 4), child: ModernGlassButton( onPressed: _downloadFile, + padding: EdgeInsets.zero, child: SizedBox( width: 80, child: const Center(child: Icon(Icons.download, size: 24)), diff --git a/b0esche_cloud/lib/theme/modern_glass_button.dart b/b0esche_cloud/lib/theme/modern_glass_button.dart index b906bf5..21eff13 100644 --- a/b0esche_cloud/lib/theme/modern_glass_button.dart +++ b/b0esche_cloud/lib/theme/modern_glass_button.dart @@ -6,11 +6,13 @@ class ModernGlassButton extends StatefulWidget { final VoidCallback onPressed; final Widget child; final bool isLoading; + final EdgeInsets padding; const ModernGlassButton({ required this.onPressed, required this.child, this.isLoading = false, + this.padding = const EdgeInsets.symmetric(horizontal: 24, vertical: 8), super.key, }); @@ -85,10 +87,7 @@ class _ModernGlassButtonState extends State child: BackdropFilter( filter: ImageFilter.blur(sigmaX: 15, sigmaY: 15), child: Container( - padding: const EdgeInsets.symmetric( - horizontal: 24, - vertical: 8, - ), + padding: widget.padding, decoration: BoxDecoration( borderRadius: BorderRadius.circular(12), gradient: LinearGradient(