This commit is contained in:
Leon Bösche
2026-01-25 19:11:04 +01:00
parent b041cd5440
commit f353e634d2
2 changed files with 21 additions and 17 deletions

View File

@@ -316,6 +316,7 @@ class _PublicFileViewerState extends State<PublicFileViewer> {
child: ModernGlassButton(
onPressed: _downloadFile,
padding: EdgeInsets.zero,
showShadows: false,
child: SizedBox(
width: 104,
child: const Center(child: Icon(Icons.download, size: 26)),

View File

@@ -7,12 +7,14 @@ class ModernGlassButton extends StatefulWidget {
final Widget child;
final bool isLoading;
final EdgeInsets padding;
final bool showShadows;
const ModernGlassButton({
required this.onPressed,
required this.child,
this.isLoading = false,
this.padding = const EdgeInsets.symmetric(horizontal: 24, vertical: 8),
this.showShadows = true,
super.key,
});
@@ -63,24 +65,25 @@ class _ModernGlassButtonState extends State<ModernGlassButton>
child: Stack(
children: [
// Shadow layer
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
boxShadow: [
BoxShadow(
color: AppTheme.accentColor.withValues(alpha: 0.3),
blurRadius: _isHovered ? 24 : 12,
spreadRadius: _isHovered ? 2 : 0,
offset: const Offset(0, 8),
),
BoxShadow(
color: AppTheme.accentColor.withValues(alpha: 0.1),
blurRadius: 20,
spreadRadius: 5,
),
],
if (widget.showShadows)
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
boxShadow: [
BoxShadow(
color: AppTheme.accentColor.withValues(alpha: 0.3),
blurRadius: _isHovered ? 24 : 12,
spreadRadius: _isHovered ? 2 : 0,
offset: const Offset(0, 8),
),
BoxShadow(
color: AppTheme.accentColor.withValues(alpha: 0.1),
blurRadius: 20,
spreadRadius: 5,
),
],
),
),
),
// Glass button with gradient
ClipRRect(
borderRadius: BorderRadius.circular(12),