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: [
Expanded(child: PlayerTrackDetails(albumArt: albumArt)),
// controls
Expanded(
Flexible(
flex: 3,
child: PlayerControls(),
),

View File

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

View File

@ -42,7 +42,13 @@ class Settings extends HookConsumerWidget {
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),
child: Column(
children: [
@ -161,7 +167,8 @@ class Settings extends HookConsumerWidget {
.toList(),
onChanged: (value) {
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.alignment = Alignment.center;
appWindow.maximize();
appWindow.title = "Spotube";
appWindow.show();
});
}

View File

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