Skip to content

Commit

Permalink
style: removing settings that dont work for now (on desktops)
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanYuuki committed Nov 29, 2024
1 parent 66fd0f1 commit 7d78692
Show file tree
Hide file tree
Showing 3 changed files with 123 additions and 113 deletions.
108 changes: 56 additions & 52 deletions lib/pages/Android/user/settings/settings_layout.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'dart:io';

import 'package:aurora/components/android/common/custom_tile.dart';
import 'package:aurora/components/android/common/switch_tile_stateless.dart';
import 'package:aurora/pages/Android/user/settings/layout_subs/resize_tabbar.dart';
Expand Down Expand Up @@ -80,58 +82,60 @@ class _LayoutPageState extends State<LayoutPage> {
fontSize: 12,
color: Theme.of(context).colorScheme.primary)),
),
SwitchTileStateless(
icon: Iconsax.card5,
title: 'Compact Card',
description: 'Change carousel card${"'s"} looks',
onTap: () {},
value: compactCard,
onChanged: (value) {
setState(() {
compactCard = !compactCard;
Hive.box('app-data').put('usingCompactCards', compactCard);
});
},
),
SwitchTileStateless(
icon: Iconsax.card_add5,
title: 'Saikou Like Cards',
description: 'You Like small cards like saikou? Turn this on!',
onTap: () {},
value: saikouCards,
onChanged: (value) {
setState(() {
saikouCards = !saikouCards;
Hive.box('app-data').put('usingSaikouCards', saikouCards);
});
},
),
CustomTile(
icon: Iconsax.arrow,
title: 'Resize TabBar',
description: 'Change the TabBar Size.',
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const ResizeTabbar()));
},
),
TileWithSlider(
sliderValue: cardRoundness,
onChanged: (newValue) {
setState(() {
cardRoundness = newValue;
});
Hive.box('app-data').put('cardRoundness', newValue);
},
title: 'Card Roundness',
description: 'Changes the card roundness',
icon: Icons.rounded_corner_rounded,
max: 50.0,
min: 0.0,
divisions: 10,
),
if (Platform.isAndroid) ...[
SwitchTileStateless(
icon: Iconsax.card5,
title: 'Compact Card',
description: 'Change carousel card${"'s"} looks',
onTap: () {},
value: compactCard,
onChanged: (value) {
setState(() {
compactCard = !compactCard;
Hive.box('app-data').put('usingCompactCards', compactCard);
});
},
),
SwitchTileStateless(
icon: Iconsax.card_add5,
title: 'Saikou Like Cards',
description: 'You Like small cards like saikou? Turn this on!',
onTap: () {},
value: saikouCards,
onChanged: (value) {
setState(() {
saikouCards = !saikouCards;
Hive.box('app-data').put('usingSaikouCards', saikouCards);
});
},
),
CustomTile(
icon: Iconsax.arrow,
title: 'Resize TabBar',
description: 'Change the TabBar Size.',
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const ResizeTabbar()));
},
),
TileWithSlider(
sliderValue: cardRoundness,
onChanged: (newValue) {
setState(() {
cardRoundness = newValue;
});
Hive.box('app-data').put('cardRoundness', newValue);
},
title: 'Card Roundness',
description: 'Changes the card roundness',
icon: Icons.rounded_corner_rounded,
max: 50.0,
min: 0.0,
divisions: 10,
),
],
TileWithSlider(
sliderValue: tabBarRoundness,
onChanged: (newValue) {
Expand Down
128 changes: 67 additions & 61 deletions lib/pages/Android/user/settings/settings_player.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'dart:developer';
import 'dart:io';

import 'package:aurora/pages/Android/user/settings/modals/tile_with_slider.dart';
import 'package:flutter/material.dart';
Expand Down Expand Up @@ -248,50 +249,52 @@ class _VideoPlayerSettingsState extends State<VideoPlayerSettings> {
onTap: _showPlaybackSpeedDialog,
),
// Resize Mode
ListTile(
leading: Icon(Icons.aspect_ratio,
color: Theme.of(context).colorScheme.primary),
title: const Text(
'Resize Mode',
style: TextStyle(fontWeight: FontWeight.bold),
),
subtitle: Text(resizeMode,
style: TextStyle(
fontFamily: 'Poppins-SemiBold',
color: Theme.of(context).colorScheme.primary)),
onTap: () {
showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
title: Text(
'Select Resize Mode',
style: TextStyle(
color: Theme.of(context).colorScheme.primary,
fontFamily: 'Poppins-SemiBold',
fontSize: 20),
),
content: Column(
mainAxisSize: MainAxisSize.min,
children: resizeModes
.map((mode) => RadioListTile<String>(
title: Text(mode),
value: mode,
groupValue: resizeMode,
onChanged: (value) {
setState(() {
resizeMode = value!;
});
Navigator.pop(context);
},
))
.toList(),
),
);
},
);
},
),
if (Platform.isAndroid) ...[
ListTile(
leading: Icon(Icons.aspect_ratio,
color: Theme.of(context).colorScheme.primary),
title: const Text(
'Resize Mode',
style: TextStyle(fontWeight: FontWeight.bold),
),
subtitle: Text(resizeMode,
style: TextStyle(
fontFamily: 'Poppins-SemiBold',
color: Theme.of(context).colorScheme.primary)),
onTap: () {
showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
title: Text(
'Select Resize Mode',
style: TextStyle(
color: Theme.of(context).colorScheme.primary,
fontFamily: 'Poppins-SemiBold',
fontSize: 20),
),
content: Column(
mainAxisSize: MainAxisSize.min,
children: resizeModes
.map((mode) => RadioListTile<String>(
title: Text(mode),
value: mode,
groupValue: resizeMode,
onChanged: (value) {
setState(() {
resizeMode = value!;
});
Navigator.pop(context);
},
))
.toList(),
),
);
},
);
},
)
],
TileWithSlider(
sliderValue: skipDuration.toDouble(),
min: 5,
Expand Down Expand Up @@ -350,24 +353,27 @@ class _VideoPlayerSettingsState extends State<VideoPlayerSettings> {
},
),
// Subtitle Outline Color
ListTile(
leading: Icon(Icons.palette,
color: Theme.of(context).colorScheme.primary),
title: const Text(
'Subtitle Outline Color',
style: TextStyle(fontWeight: FontWeight.bold),
),
onTap: () {
_showColorSelectionDialog(
'Select Subtitle Outline Color', subtitleOutlineColor,
(color) {
setState(() {
subtitleOutlineColor = colorOptions[color]!;
if (Platform.isAndroid) ...[
ListTile(
leading: Icon(Icons.palette,
color: Theme.of(context).colorScheme.primary),
title: const Text(
'Subtitle Outline Color',
style: TextStyle(fontWeight: FontWeight.bold),
),
onTap: () {
_showColorSelectionDialog(
'Select Subtitle Outline Color', subtitleOutlineColor,
(color) {
setState(() {
subtitleOutlineColor = colorOptions[color]!;
});
Hive.box('app-data').put('subtitleOutlineColor', color);
});
Hive.box('app-data').put('subtitleOutlineColor', color);
});
},
),
},
)
],

// Subtitle Background Color
ListTile(
leading: Icon(Icons.palette,
Expand Down
Empty file.

0 comments on commit 7d78692

Please sign in to comment.