mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 16:05:18 +00:00
bug #2344: Bottom Overflow in Browse
- Added a width adjustment (`w`) for desktop screens - Limited the number of lines for the genre name to 1 (`maxLines: 1`) to prevent overflow This commit only fixes the issue in Browse. The overflow in Local Library is not addressed here. Partially fixes #2344
This commit is contained in:
parent
edc9636940
commit
227909787d
@ -8,6 +8,7 @@ import 'package:spotube/components/image/universal_image.dart';
|
|||||||
import 'package:spotube/extensions/image.dart';
|
import 'package:spotube/extensions/image.dart';
|
||||||
import 'package:spotube/extensions/string.dart';
|
import 'package:spotube/extensions/string.dart';
|
||||||
import 'package:spotube/provider/spotify/spotify.dart';
|
import 'package:spotube/provider/spotify/spotify.dart';
|
||||||
|
import 'package:spotube/utils/platform.dart';
|
||||||
import 'package:stroke_text/stroke_text.dart';
|
import 'package:stroke_text/stroke_text.dart';
|
||||||
|
|
||||||
class GenreSectionCardPlaylistCard extends HookConsumerWidget {
|
class GenreSectionCardPlaylistCard extends HookConsumerWidget {
|
||||||
@ -21,8 +22,10 @@ class GenreSectionCardPlaylistCard extends HookConsumerWidget {
|
|||||||
Widget build(BuildContext context, ref) {
|
Widget build(BuildContext context, ref) {
|
||||||
final theme = Theme.of(context);
|
final theme = Theme.of(context);
|
||||||
|
|
||||||
|
final w = kIsDesktop ? 20 : 0;
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
width: 115 * theme.scaling,
|
width: (115 + w) * theme.scaling,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: theme.colorScheme.background.withAlpha(75),
|
color: theme.colorScheme.background.withAlpha(75),
|
||||||
borderRadius: theme.borderRadiusMd,
|
borderRadius: theme.borderRadiusMd,
|
||||||
@ -65,7 +68,7 @@ class GenreSectionCardPlaylistCard extends HookConsumerWidget {
|
|||||||
ref.watch(playlistImageProvider(playlist.id!));
|
ref.watch(playlistImageProvider(playlist.id!));
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
height: 100 * theme.scaling,
|
height: 100 * theme.scaling,
|
||||||
width: 100 * theme.scaling,
|
width: (100 + w) * theme.scaling,
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
Positioned.fill(
|
Positioned.fill(
|
||||||
@ -107,14 +110,14 @@ class GenreSectionCardPlaylistCard extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
height: 100 * theme.scaling,
|
height: 100 * theme.scaling,
|
||||||
width: 100 * theme.scaling,
|
width: (100 + w) * theme.scaling,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
playlist.name!,
|
playlist.name!,
|
||||||
maxLines: 2,
|
maxLines: 1,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
).semiBold().small(),
|
).xSmall().bold(),
|
||||||
if (playlist.description != null)
|
if (playlist.description != null)
|
||||||
Text(
|
Text(
|
||||||
playlist.description?.unescapeHtml().cleanHtml() ?? "",
|
playlist.description?.unescapeHtml().cleanHtml() ?? "",
|
||||||
|
Loading…
Reference in New Issue
Block a user