Skip to content

Commit

Permalink
UI tweaks and 480
Browse files Browse the repository at this point in the history
  • Loading branch information
bdlukaa committed Jul 8, 2023
1 parent 0cd0c9e commit 97c0879
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 17 deletions.
2 changes: 1 addition & 1 deletion lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -227,5 +227,5 @@
"defaultResolution": "Default resolution",
"p1080": "1080p",
"p720": "720p",
"p420": "420p"
"p480": "480p"
}
2 changes: 1 addition & 1 deletion lib/utils/extensions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ extension UnityVideoQualityExtension on UnityVideoQuality {
return {
UnityVideoQuality.p1080: loc.p1080,
UnityVideoQuality.p720: loc.p720,
UnityVideoQuality.p420: loc.p420,
UnityVideoQuality.p480: loc.p480,
}[this]!;
}
}
Expand Down
30 changes: 18 additions & 12 deletions lib/widgets/device_grid/desktop/desktop_device_grid.dart
Original file line number Diff line number Diff line change
Expand Up @@ -672,23 +672,29 @@ Future<void> showResolutionDialog(
children: [
if (quality.isHD)
WidgetSpan(
child: Tooltip(
message: loc.hd,
child: const Icon(
Icons.hd,
size: 18.0,
color: Colors.yellow,
child: Padding(
padding: const EdgeInsets.only(left: 8.0),
child: Tooltip(
message: loc.hd,
child: const Icon(
Icons.hd,
size: 18.0,
color: Colors.yellow,
),
),
),
),
if (SettingsProvider.instance.videoQuality == quality)
WidgetSpan(
child: Tooltip(
message: loc.defaultResolution,
child: const Icon(
Icons.verified,
color: Colors.blue,
size: 18.0,
child: Padding(
padding: const EdgeInsets.only(left: 8.0),
child: Tooltip(
message: loc.defaultResolution,
child: const Icon(
Icons.verified,
color: Colors.blue,
size: 18.0,
),
),
),
)
Expand Down
14 changes: 13 additions & 1 deletion lib/widgets/settings/settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,19 @@ class _SettingsState extends State<Settings> {
text: quality.str(context),
children: [
if (quality.isHD)
const WidgetSpan(child: Icon(Icons.hd)),
WidgetSpan(
child: Padding(
padding: const EdgeInsets.only(left: 8.0),
child: Tooltip(
message: loc.hd,
child: const Icon(
Icons.hd,
size: 18.0,
color: Colors.yellow,
),
),
),
),
],
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ const p1080Resolution = Size(1920, 1080);
const p720Resolution = Size(1280, 720);

/// The size of a view with 480p resolution
const p480Resolution = Size(640, 480);
const p480Resolution = Size(852, 480);

enum UnityVideoQuality {
p1080._(resolution: p1080Resolution, isHD: true),
p720._(resolution: p720Resolution),
p420._(resolution: p480Resolution);
p480._(resolution: p480Resolution);

final Size resolution;
final bool isHD;
Expand Down

0 comments on commit 97c0879

Please sign in to comment.