feat: Better wallpapers with blur and opacity sliders and improved styles page

This commit is contained in:
krille-chan 2024-11-01 10:49:18 +01:00
commit 9ee7551ad4
No known key found for this signature in database
7 changed files with 314 additions and 222 deletions

View file

@ -1,3 +1,5 @@
import 'dart:ui' as ui;
import 'package:flutter/material.dart';
import 'package:badges/badges.dart';
@ -262,14 +264,21 @@ class ChatView extends StatelessWidget {
children: <Widget>[
if (accountConfig.wallpaperUrl != null)
Opacity(
opacity: accountConfig.wallpaperOpacity ?? 1,
child: MxcImage(
uri: accountConfig.wallpaperUrl,
fit: BoxFit.cover,
isThumbnail: true,
width: FluffyThemes.columnWidth * 4,
height: FluffyThemes.columnWidth * 4,
placeholder: (_) => Container(),
opacity: accountConfig.wallpaperOpacity ?? 0.5,
child: ImageFiltered(
imageFilter: ui.ImageFilter.blur(
sigmaX: accountConfig.wallpaperBlur ?? 0.0,
sigmaY: accountConfig.wallpaperBlur ?? 0.0,
),
child: MxcImage(
cacheKey: accountConfig.wallpaperUrl.toString(),
uri: accountConfig.wallpaperUrl,
fit: BoxFit.cover,
height: MediaQuery.of(context).size.height,
width: MediaQuery.of(context).size.width,
isThumbnail: false,
placeholder: (_) => Container(),
),
),
),
SafeArea(

View file

@ -449,12 +449,6 @@ class Message extends StatelessWidget {
fontWeight: FontWeight.bold,
fontSize: 12 * AppConfig.fontSizeFactor,
color: theme.colorScheme.secondary,
shadows: [
Shadow(
color: theme.colorScheme.surface,
blurRadius: 3,
),
],
),
),
),
@ -495,12 +489,6 @@ class Message extends StatelessWidget {
fontWeight: FontWeight.bold,
fontSize: 12 * AppConfig.fontSizeFactor,
color: theme.colorScheme.secondary,
shadows: [
Shadow(
color: theme.colorScheme.surface,
blurRadius: 3,
),
],
),
),
),

View file

@ -12,8 +12,6 @@ class StateMessage extends StatelessWidget {
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 8.0),
child: Center(
@ -27,12 +25,6 @@ class StateMessage extends StatelessWidget {
style: TextStyle(
fontSize: 12 * AppConfig.fontSizeFactor,
decoration: event.redacted ? TextDecoration.lineThrough : null,
shadows: [
Shadow(
color: theme.colorScheme.surface,
blurRadius: 3,
),
],
),
),
),