Improve new UI
This commit is contained in:
parent
25e64f67e0
commit
fa8f72c376
@ -17,7 +17,7 @@ extension DurationExt on Duration {
|
||||
}
|
||||
}
|
||||
|
||||
const double playlistWidth = 300;
|
||||
const smartphoneSize = 700;
|
||||
|
||||
class MusicPlayer extends StatefulWidget {
|
||||
final MusicsList musicsList;
|
||||
@ -291,7 +291,10 @@ class _MusicPlayerState extends State<MusicPlayer> {
|
||||
),
|
||||
);
|
||||
|
||||
Widget _buildSmallPlayerWidget(double width) => fluent.Container(
|
||||
Widget _buildSmallPlayerWidget(double width) {
|
||||
var partSize = width > smartphoneSize ? width / 3 : width / 2.5;
|
||||
|
||||
return fluent.Container(
|
||||
color: Colors.black,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
@ -300,11 +303,8 @@ class _MusicPlayerState extends State<MusicPlayer> {
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
fluent.ClipRect(
|
||||
child: Flexible(
|
||||
flex: 1,
|
||||
child: ConstrainedBox(
|
||||
constraints:
|
||||
BoxConstraints(maxWidth: min(350, width * (1 / 2))),
|
||||
child: SizedBox(
|
||||
width: partSize,
|
||||
child: Row(
|
||||
children: [
|
||||
RoundedImage(
|
||||
@ -340,12 +340,8 @@ class _MusicPlayerState extends State<MusicPlayer> {
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
Flexible(
|
||||
child: ConstrainedBox(
|
||||
constraints:
|
||||
BoxConstraints(maxWidth: min(500, width * (1 / 4))),
|
||||
SizedBox(
|
||||
width: partSize,
|
||||
child: Column(
|
||||
children: [
|
||||
fluent.Row(
|
||||
@ -361,13 +357,13 @@ class _MusicPlayerState extends State<MusicPlayer> {
|
||||
_buildPlayersIcons(25),
|
||||
],
|
||||
)),
|
||||
),
|
||||
const Spacer(),
|
||||
_buildToggleListButton()
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildPlayersIcons([double? size]) => fluent.Row(
|
||||
children: [
|
||||
|
Loading…
Reference in New Issue
Block a user