Skip to content

Commit

Permalink
chore: allow plain text lyrics to open in fullscreen
Browse files Browse the repository at this point in the history
ref #175
  • Loading branch information
MSOB7YY committed Apr 27, 2024
1 parent 409d464 commit 2010c46
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 43 deletions.
1 change: 1 addition & 0 deletions lib/packages/lyrics_lrc_parsed_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ class LyricsLRCParsedViewState extends State<LyricsLRCParsedView> {
children: [
Expanded(
child: Stack(
fit: StackFit.expand,
children: [
Listener(
onPointerMove: (event) {
Expand Down
52 changes: 9 additions & 43 deletions lib/packages/miniplayer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -645,49 +645,15 @@ class _AnimatingTrackImage extends StatelessWidget {
),
Obx(
() => AnimatedSwitcher(
duration: const Duration(milliseconds: 300),
child: !settings.enableLyrics.value
? const IgnorePointer(key: Key('empty_lrc'), child: SizedBox())
: Lyrics.inst.currentLyricsLRC.value != null
? LyricsLRCParsedView(
key: Lyrics.inst.lrcViewKey,
cp: cp,
lrc: Lyrics.inst.currentLyricsLRC.value,
videoOrImage: const SizedBox(),
)
: Lyrics.inst.currentLyricsText.value != ''
? Opacity(
opacity: cp,
child: Container(
clipBehavior: Clip.antiAlias,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16.0.multipliedRadius),
color: context.theme.scaffoldBackgroundColor.withAlpha(110),
),
width: double.infinity,
height: double.infinity,
alignment: Alignment.center,
padding: const EdgeInsets.symmetric(horizontal: 12.0),
child: NamidaBgBlur(
blur: 12.0,
enabled: true,
child: ShaderFadingWidget(
child: SingleChildScrollView(
controller: Lyrics.inst.textScrollController,
child: Column(
children: [
const SizedBox(height: 48.0),
Text(Lyrics.inst.currentLyricsText.value, style: context.textTheme.displayMedium),
const SizedBox(height: 48.0),
],
),
),
),
),
),
)
: const IgnorePointer(key: Key('empty_lrc_2'), child: SizedBox()),
),
duration: const Duration(milliseconds: 300),
child: !settings.enableLyrics.value
? const IgnorePointer(key: Key('empty_lrc'), child: SizedBox())
: LyricsLRCParsedView(
key: Lyrics.inst.lrcViewKey,
cp: cp,
lrc: Lyrics.inst.currentLyricsLRC.value,
videoOrImage: const SizedBox(),
)),
),
],
),
Expand Down

0 comments on commit 2010c46

Please sign in to comment.