Settings & PlayerControls adjusted for ultrawide/4k screens

This commit is contained in:
Kingkor Roy Tirtho 2022-04-05 19:07:14 +06:00
parent a7b3073539
commit d2b4a81029
5 changed files with 249 additions and 236 deletions

View File

@ -131,7 +131,7 @@ class Player extends HookConsumerWidget {
children: [ children: [
Expanded(child: PlayerTrackDetails(albumArt: albumArt)), Expanded(child: PlayerTrackDetails(albumArt: albumArt)),
// controls // controls
Expanded( Flexible(
flex: 3, flex: 3,
child: PlayerControls(), child: PlayerControls(),
), ),

View File

@ -43,7 +43,7 @@ class PlayerControls extends HookConsumerWidget {
final duration = _duration.value ?? Duration.zero; final duration = _duration.value ?? Duration.zero;
return Container( return Container(
constraints: const BoxConstraints(maxWidth: 700), constraints: const BoxConstraints(maxWidth: 600),
child: Column( child: Column(
children: [ children: [
StreamBuilder<Duration>( StreamBuilder<Duration>(

View File

@ -42,7 +42,13 @@ class Settings extends HookConsumerWidget {
style: Theme.of(context).textTheme.headline5, style: Theme.of(context).textTheme.headline5,
), ),
), ),
body: Padding( body: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Flexible(
child: Container(
constraints: const BoxConstraints(maxWidth: 1366),
child: Padding(
padding: const EdgeInsets.all(16.0), padding: const EdgeInsets.all(16.0),
child: Column( child: Column(
children: [ children: [
@ -161,7 +167,8 @@ class Settings extends HookConsumerWidget {
.toList(), .toList(),
onChanged: (value) { onChanged: (value) {
if (value == null) return; if (value == null) return;
preferences.setRecommendationMarket(value as String); preferences
.setRecommendationMarket(value as String);
}, },
), ),
], ],
@ -283,6 +290,10 @@ class Settings extends HookConsumerWidget {
), ),
), ),
), ),
),
],
),
),
); );
} }
} }

View File

@ -29,6 +29,7 @@ void main() async {
appWindow.size = const Size(900, 700); appWindow.size = const Size(900, 700);
appWindow.alignment = Alignment.center; appWindow.alignment = Alignment.center;
appWindow.maximize(); appWindow.maximize();
appWindow.title = "Spotube";
appWindow.show(); appWindow.show();
}); });
} }

View File

@ -118,6 +118,7 @@ class UserPreferences extends ChangeNotifier {
void setRecommendationMarket(String country) { void setRecommendationMarket(String country) {
recommendationMarket = country; recommendationMarket = country;
localStorage?.setString(LocalStorageKeys.recommendationMarket, country); localStorage?.setString(LocalStorageKeys.recommendationMarket, country);
notifyListeners();
} }
void setGeniusAccessToken(String token) { void setGeniusAccessToken(String token) {