minor fixes
This commit is contained in:
parent
fabb2904f9
commit
16e735bdb8
5 changed files with 22 additions and 17 deletions
|
@ -65,13 +65,13 @@ class BlurredOval extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return enabled
|
||||
? ClipOval(
|
||||
child: BackdropFilter(
|
||||
return ClipOval(
|
||||
child: enabled
|
||||
? BackdropFilter(
|
||||
filter: _filter,
|
||||
child: child,
|
||||
),
|
||||
)
|
||||
: child;
|
||||
)
|
||||
: child,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -152,11 +152,12 @@ class MapOverlayButton extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final blurred = settings.enableOverlayBlurEffect;
|
||||
return BlurredOval(
|
||||
enabled: settings.enableOverlayBlurEffect,
|
||||
enabled: blurred,
|
||||
child: Material(
|
||||
type: MaterialType.circle,
|
||||
color: kOverlayBackgroundColor,
|
||||
color: overlayBackgroundColor(blurred: blurred),
|
||||
child: Ink(
|
||||
decoration: BoxDecoration(
|
||||
border: AvesBorder.border,
|
||||
|
|
|
@ -77,8 +77,9 @@ class _ViewerBottomOverlayState extends State<ViewerBottomOverlay> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final hasEdgeContent = settings.showOverlayInfo || multiPageController != null;
|
||||
final blurred = settings.enableOverlayBlurEffect;
|
||||
return BlurredRect(
|
||||
enabled: hasEdgeContent && settings.enableOverlayBlurEffect,
|
||||
enabled: hasEdgeContent && blurred,
|
||||
child: Selector<MediaQueryData, Tuple3<double, EdgeInsets, EdgeInsets>>(
|
||||
selector: (c, mq) => Tuple3(mq.size.width, mq.viewInsets, mq.viewPadding),
|
||||
builder: (c, mq, child) {
|
||||
|
@ -91,7 +92,7 @@ class _ViewerBottomOverlayState extends State<ViewerBottomOverlay> {
|
|||
final availableWidth = mqWidth - viewPadding.horizontal;
|
||||
|
||||
return Container(
|
||||
color: hasEdgeContent ? kOverlayBackgroundColor : Colors.transparent,
|
||||
color: hasEdgeContent ? overlayBackgroundColor(blurred: blurred) : Colors.transparent,
|
||||
padding: EdgeInsets.only(
|
||||
left: max(viewInsets.left, viewPadding.left),
|
||||
top: 0,
|
||||
|
|
|
@ -114,10 +114,11 @@ class _VideoControlOverlayState extends State<VideoControlOverlay> with SingleTi
|
|||
|
||||
Widget _buildProgressBar() {
|
||||
const progressBarBorderRadius = 123.0;
|
||||
final blurred = settings.enableOverlayBlurEffect;
|
||||
return SizeTransition(
|
||||
sizeFactor: scale,
|
||||
child: BlurredRRect(
|
||||
enabled: settings.enableOverlayBlurEffect,
|
||||
enabled: blurred,
|
||||
borderRadius: progressBarBorderRadius,
|
||||
child: GestureDetector(
|
||||
onTapDown: (details) {
|
||||
|
@ -136,7 +137,7 @@ class _VideoControlOverlayState extends State<VideoControlOverlay> with SingleTi
|
|||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(vertical: 4, horizontal: 16) + const EdgeInsets.only(bottom: 16),
|
||||
decoration: BoxDecoration(
|
||||
color: kOverlayBackgroundColor,
|
||||
color: overlayBackgroundColor(blurred: blurred),
|
||||
border: AvesBorder.border,
|
||||
borderRadius: const BorderRadius.all(Radius.circular(progressBarBorderRadius)),
|
||||
),
|
||||
|
|
|
@ -3,7 +3,7 @@ import 'package:aves/widgets/common/fx/blurred.dart';
|
|||
import 'package:aves/widgets/common/fx/borders.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
const kOverlayBackgroundColor = Colors.black26;
|
||||
Color overlayBackgroundColor({required bool blurred}) => blurred ? Colors.black26 : Colors.black38;
|
||||
|
||||
class OverlayButton extends StatelessWidget {
|
||||
final Animation<double> scale;
|
||||
|
@ -17,13 +17,14 @@ class OverlayButton extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final blurred = settings.enableOverlayBlurEffect;
|
||||
return ScaleTransition(
|
||||
scale: scale,
|
||||
child: BlurredOval(
|
||||
enabled: settings.enableOverlayBlurEffect,
|
||||
enabled: blurred,
|
||||
child: Material(
|
||||
type: MaterialType.circle,
|
||||
color: kOverlayBackgroundColor,
|
||||
color: overlayBackgroundColor(blurred: blurred),
|
||||
child: Ink(
|
||||
decoration: BoxDecoration(
|
||||
border: AvesBorder.border,
|
||||
|
@ -57,15 +58,16 @@ class OverlayTextButton extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final blurred = settings.enableOverlayBlurEffect;
|
||||
return SizeTransition(
|
||||
sizeFactor: scale,
|
||||
child: BlurredRRect(
|
||||
enabled: settings.enableOverlayBlurEffect,
|
||||
enabled: blurred,
|
||||
borderRadius: _borderRadius,
|
||||
child: OutlinedButton(
|
||||
onPressed: onPressed,
|
||||
style: ButtonStyle(
|
||||
backgroundColor: MaterialStateProperty.all<Color>(kOverlayBackgroundColor),
|
||||
backgroundColor: MaterialStateProperty.all<Color>(overlayBackgroundColor(blurred: blurred)),
|
||||
foregroundColor: MaterialStateProperty.all<Color>(Colors.white),
|
||||
overlayColor: MaterialStateProperty.all<Color>(Colors.white.withOpacity(0.12)),
|
||||
minimumSize: _minSize,
|
||||
|
|
Loading…
Reference in a new issue