From fe54a71d3355e7ca342e9054585ab57ded89eba3 Mon Sep 17 00:00:00 2001 From: ggurdin Date: Mon, 17 Jun 2024 12:42:48 -0400 Subject: [PATCH] small fixes for UI issues --- lib/pages/chat/events/audio_player.dart | 49 ++++++++++++++----------- lib/pages/chat/recording_dialog.dart | 5 ++- lib/widgets/layouts/login_scaffold.dart | 13 +++++++ 3 files changed, 44 insertions(+), 23 deletions(-) diff --git a/lib/pages/chat/events/audio_player.dart b/lib/pages/chat/events/audio_player.dart index 147d87f4c..82a06ba79 100644 --- a/lib/pages/chat/events/audio_player.dart +++ b/lib/pages/chat/events/audio_player.dart @@ -357,7 +357,10 @@ class AudioPlayerState extends State { color: widget.color, borderRadius: BorderRadius.circular(2), ), - width: 2, + // #Pangea + // width: 2, + width: 1, + // Pangea# height: 32 * (waveform[i] / 1024), ), ), @@ -376,27 +379,29 @@ class AudioPlayerState extends State { ), ), ), - const SizedBox(width: 8), - Badge( - isLabelVisible: audioPlayer != null, - label: audioPlayer == null - ? null - : Text( - '${audioPlayer.speed.toString()}x', - ), - backgroundColor: Theme.of(context).colorScheme.secondary, - textColor: Theme.of(context).colorScheme.onSecondary, - child: InkWell( - splashColor: widget.color.withAlpha(128), - borderRadius: BorderRadius.circular(64), - onTap: audioPlayer == null ? null : _toggleSpeed, - child: Icon( - Icons.mic_none_outlined, - color: widget.color, - ), - ), - ), - const SizedBox(width: 8), + // #Pangea + // const SizedBox(width: 8), + // Badge( + // isLabelVisible: audioPlayer != null, + // label: audioPlayer == null + // ? null + // : Text( + // '${audioPlayer.speed.toString()}x', + // ), + // backgroundColor: Theme.of(context).colorScheme.secondary, + // textColor: Theme.of(context).colorScheme.onSecondary, + // child: InkWell( + // splashColor: widget.color.withAlpha(128), + // borderRadius: BorderRadius.circular(64), + // onTap: audioPlayer == null ? null : _toggleSpeed, + // child: Icon( + // Icons.mic_none_outlined, + // color: widget.color, + // ), + // ), + // ), + // const SizedBox(width: 8), + // Pangea# ], ), ); diff --git a/lib/pages/chat/recording_dialog.dart b/lib/pages/chat/recording_dialog.dart index 5e358f291..caf5aef60 100644 --- a/lib/pages/chat/recording_dialog.dart +++ b/lib/pages/chat/recording_dialog.dart @@ -32,7 +32,10 @@ class RecordingDialogState extends State { final List amplitudeTimeline = []; static const int bitRate = 64000; - static const int samplingRate = 44100; + // #Pangea + // static const int samplingRate = 44100; + static const int samplingRate = 22050; + // Pangea# Future startRecording() async { try { diff --git a/lib/widgets/layouts/login_scaffold.dart b/lib/widgets/layouts/login_scaffold.dart index 46b1a9c08..e5662417c 100644 --- a/lib/widgets/layouts/login_scaffold.dart +++ b/lib/widgets/layouts/login_scaffold.dart @@ -43,6 +43,19 @@ class LoginScaffold extends StatelessWidget { // #Pangea extendBodyBehindAppBar: true, // body: body, + body: Container( + decoration: const BoxDecoration( + image: DecorationImage( + fit: BoxFit.cover, + image: AssetImage('assets/login_wallpaper.png'), + ), + ), + alignment: Alignment.center, + child: ConstrainedBox( + constraints: const BoxConstraints(maxWidth: 480), + child: body, + ), + ), // backgroundColor: isMobileMode // ? null // : Theme.of(context).colorScheme.surface.withOpacity(0.8),