From b5a1f0a19a75672f87d4a34b068576f48f19c733 Mon Sep 17 00:00:00 2001 From: dan63047 Date: Sat, 7 Dec 2024 17:31:37 +0300 Subject: [PATCH] and another one --- lib/views/destination_calculator.dart | 14 +++++++++----- lib/views/destination_home.dart | 12 ++++++------ lib/views/destination_leaderboards.dart | 2 +- lib/views/destination_saved_data.dart | 9 +-------- res/i18n/strings.i18n.json | 5 ++--- 5 files changed, 19 insertions(+), 23 deletions(-) diff --git a/lib/views/destination_calculator.dart b/lib/views/destination_calculator.dart index 5064820..37b1a6f 100644 --- a/lib/views/destination_calculator.dart +++ b/lib/views/destination_calculator.dart @@ -482,11 +482,15 @@ class _DestinationCalculatorState extends State { mainAxisSize: MainAxisSize.min, children: [ Card( - child: TabBar(tabs: [ - Tab(text: t.calcDestination.actions), - if (widget.constraints.maxWidth <= 768.0) Tab(text: t.calcDestination.results), - Tab(text: t.calcDestination.rules), - ]), + child: TabBar( + labelStyle: Theme.of(context).textTheme.titleMedium!.copyWith(fontSize: 28), + labelColor: Theme.of(context).colorScheme.primary, + tabs: [ + Tab(text: t.calcDestination.actions), + if (widget.constraints.maxWidth <= 768.0) Tab(text: t.calcDestination.results), + Tab(text: t.calcDestination.rules), + ] + ), ), SizedBox( height: widget.constraints.maxHeight - 164, diff --git a/lib/views/destination_home.dart b/lib/views/destination_home.dart index e3ac929..ad7394c 100644 --- a/lib/views/destination_home.dart +++ b/lib/views/destination_home.dart @@ -742,7 +742,7 @@ class _DestinationHomeState extends State with SingleTickerProv mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.center, children: [ - Text(t.homeNavigation.overview, style: TextStyle(fontFamily: "Eurostile Round Extended", fontSize: 42)), + Text(t.homeNavigation.overview, style: TextStyle(fontFamily: "Eurostile Round Extended", fontSize: 42), textAlign: TextAlign.center), ], ), ), @@ -755,7 +755,7 @@ class _DestinationHomeState extends State with SingleTickerProv child: Column( crossAxisAlignment: CrossAxisAlignment.center, children: [ - Text(t.gamemodes['40l']!, style: Theme.of(context).textTheme.titleSmall), + Text(t.gamemodes['40l']!, style: Theme.of(context).textTheme.titleSmall, textAlign: TextAlign.center), const Divider(), RecordSummary(record: summaries.sprint, betterThanClosestAverage: sprintBetterThanClosestAverage, betterThanRankAverage: sprintBetterThanRankAverage, closestAverage: closestAverageSprint, rank: summaries.league.percentileRank), const Divider(), @@ -770,7 +770,7 @@ class _DestinationHomeState extends State with SingleTickerProv child: Column( crossAxisAlignment: CrossAxisAlignment.center, children: [ - Text(t.gamemodes['blitz']!, style: Theme.of(context).textTheme.titleSmall), + Text(t.gamemodes['blitz']!, style: Theme.of(context).textTheme.titleSmall, textAlign: TextAlign.center), const Divider(), RecordSummary(record: summaries.blitz, betterThanClosestAverage: blitzBetterThanClosestAverage, betterThanRankAverage: blitzBetterThanRankAverage, closestAverage: closestAverageBlitz, rank: summaries.league.percentileRank), const Divider(), @@ -785,7 +785,7 @@ class _DestinationHomeState extends State with SingleTickerProv child: Column( crossAxisAlignment: CrossAxisAlignment.center, children: [ - Text(t.gamemodes['zenith']!, style: Theme.of(context).textTheme.titleSmall), + Text(t.gamemodes['zenith']!, style: Theme.of(context).textTheme.titleSmall, textAlign: TextAlign.center), const Divider(), RecordSummary(record: summaries.zenith != null ? summaries.zenith : summaries.zenithCareerBest, hideRank: true, old: summaries.zenith == null), const Divider(), @@ -800,7 +800,7 @@ class _DestinationHomeState extends State with SingleTickerProv child: Column( crossAxisAlignment: CrossAxisAlignment.center, children: [ - Text(t.gamemodes['zenithex']!, style: Theme.of(context).textTheme.titleSmall), + Text(t.gamemodes['zenithex']!, style: Theme.of(context).textTheme.titleSmall, textAlign: TextAlign.center), const Divider(), RecordSummary(record: summaries.zenithEx != null ? summaries.zenithEx : summaries.zenithExCareerBest, hideRank: true, old: summaries.zenith == null), const Divider(), @@ -815,7 +815,7 @@ class _DestinationHomeState extends State with SingleTickerProv child: Column( crossAxisAlignment: CrossAxisAlignment.center, children: [ - Center(child: Text(t.gamemodes['zen']!, style: Theme.of(context).textTheme.titleSmall)), + Center(child: Text(t.gamemodes['zen']!, style: Theme.of(context).textTheme.titleSmall, textAlign: TextAlign.center)), Text("${t.stats.level.full} ${intf.format(summaries.zen.level)}", style: const TextStyle(fontFamily: "Eurostile Round", fontSize: 36, fontWeight: FontWeight.w500, color: Colors.white)), Text("${t.stats.score} ${intf.format(summaries.zen.score)}"), Text(t.stats.levelUpRequirement(p: intf.format(summaries.zen.scoreRequirement)), style: const TextStyle(color: Colors.grey)) diff --git a/lib/views/destination_leaderboards.dart b/lib/views/destination_leaderboards.dart index 2b4780e..0196993 100644 --- a/lib/views/destination_leaderboards.dart +++ b/lib/views/destination_leaderboards.dart @@ -354,7 +354,7 @@ class _DestinationLeaderboardsState extends State { child: ListTile( title: Text(leaderboards.values.elementAt(index)), trailing: Icon(Icons.arrow_right, color: _currentLb.index == index ? Colors.white : Colors.grey), - subtitle: index == 1 ? Text(t.leaderboardsDestination.fullTLnote, style: TextStyle(color: Colors.grey, fontSize: 12)) : null, + subtitle: index == 1 ? Text(t.TLfullLBnote, style: TextStyle(color: Colors.grey, fontSize: 12)) : null, onTap: () { if (widget.constraints.maxWidth <= transformThreshold) Navigator.push( context, diff --git a/lib/views/destination_saved_data.dart b/lib/views/destination_saved_data.dart index 2832b1d..845cb54 100644 --- a/lib/views/destination_saved_data.dart +++ b/lib/views/destination_saved_data.dart @@ -141,14 +141,7 @@ class _DestinationSavedData extends State { child: Column( children: [ Card( - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - Spacer(), - Text(t.savedDataDestination.title, style: Theme.of(context).textTheme.headlineMedium), - Spacer() - ], - ), + child: Center(child: Text(t.savedDataDestination.title, style: Theme.of(context).textTheme.headlineMedium, textAlign: TextAlign.center)), ), for (String id in snapshot.data!.keys) Card( child: ListTile( diff --git a/res/i18n/strings.i18n.json b/res/i18n/strings.i18n.json index 4a0dce1..8b560d8 100644 --- a/res/i18n/strings.i18n.json +++ b/res/i18n/strings.i18n.json @@ -37,7 +37,7 @@ "nanow": "Not avaliable for now...", "seasonEnds": "Season ends in ${countdown}", "seasonEnded": "Season has ended", - "overallPB": "Overall PB: $pb", + "overallPB": "Overall PB: $pb m", "gamesUntilRanked": "${left} games until being ranked", "numOfVictories": "~${wins} victories", "promotionOnNextWin": "Promotion on next win", @@ -273,8 +273,7 @@ "title": "Leaderboards", "tl": "Tetra League (Current Season)", "fullTL": "Tetra League (Current Season, full one)", - "ar": "Acievement Points", - "fullTLnote": "Heavy, but allows you to sort players by their stats and filter them by ranks" + "ar": "Acievement Points" }, "savedDataDestination": { "title": "Saved Data",