Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix themes #197

Merged
merged 7 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 94 additions & 4 deletions lib/src/core/resources/themes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,62 @@ class Themes {
),
textTheme: const TextTheme(
bodyLarge: TextStyle(color: Colors.white),
bodyMedium: TextStyle(color: Color.fromARGB(255, 75, 75, 75)),
bodyMedium: TextStyle(color: Colors.white),
),
primaryIconTheme: const IconThemeData(color: Colors.white),
inputDecorationTheme: InputDecorationTheme(
border: OutlineInputBorder(
borderSide: BorderSide(color: Colors.grey[600]!),
),
hintStyle: const TextStyle(
color: Color.fromARGB(255, 75, 75, 75),
fontSize: 16,
),
helperStyle: const TextStyle(
color: Colors.white,
),
labelStyle: TextStyle(
color: Colors.deepPurpleAccent[200],
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.grey[600]!),
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.deepPurpleAccent[200]!),
),
),
tabBarTheme: TabBarTheme(
labelColor: Colors.deepPurpleAccent[200],
unselectedLabelColor: Colors.white,
dividerColor: Colors.transparent,
),
appBarTheme: const AppBarTheme(
titleTextStyle: TextStyle(
color: Colors.white,
fontSize: 18,
),
iconTheme: IconThemeData(
color: Colors.white,
),
),
dividerTheme: const DividerThemeData(
thickness: 2,
indent: 0,
endIndent: 0,
color: Color(0xFF18181b),
),
textButtonTheme: const TextButtonThemeData(
style: ButtonStyle(
textStyle: WidgetStatePropertyAll(
TextStyle(
fontSize: 12,
),
),
foregroundColor: WidgetStatePropertyAll(
Colors.white
),
),
),
switchTheme: SwitchThemeData(
thumbColor: WidgetStateProperty.resolveWith(
(Set<WidgetState> states) {
Expand Down Expand Up @@ -74,13 +116,61 @@ class Themes {
),
textTheme: const TextTheme(
bodyLarge: TextStyle(color: Colors.black),
bodyMedium: TextStyle(color: Color.fromARGB(255, 75, 75, 75)),
bodyMedium: TextStyle(color: Colors.black),
),
primaryIconTheme: const IconThemeData(color: Colors.black),
inputDecorationTheme: const InputDecorationTheme(
border: OutlineInputBorder(
inputDecorationTheme: InputDecorationTheme(
border: const OutlineInputBorder(
borderSide: BorderSide(color: Colors.black),
),
helperStyle: const TextStyle(
color: Color.fromARGB(255, 28, 25, 25),
),
hintStyle: const TextStyle(
color: Color.fromARGB(255, 75, 75, 75),
fontSize: 16,
),
labelStyle: TextStyle(
color: Colors.deepPurpleAccent[200],
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.grey[600]!),
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.deepPurpleAccent[200]!),
),
),
tabBarTheme: TabBarTheme(
labelColor: Colors.deepPurpleAccent[200],
unselectedLabelColor: Colors.black,
dividerColor: Colors.transparent,
),
appBarTheme: const AppBarTheme(
titleTextStyle: TextStyle(
color: Colors.black,
fontSize: 18,
),
iconTheme: IconThemeData(
color: Colors.black,
),
),
dividerTheme: const DividerThemeData(
thickness: 2,
indent: 0,
endIndent: 0,
color: Color(0xFFefeff1),
),
textButtonTheme: const TextButtonThemeData(
style: ButtonStyle(
textStyle: WidgetStatePropertyAll(
TextStyle(
fontSize: 12,
),
),
foregroundColor: WidgetStatePropertyAll(
Colors.white
),
),
),
switchTheme: SwitchThemeData(
thumbColor: WidgetStateProperty.resolveWith(
Expand Down
23 changes: 6 additions & 17 deletions lib/src/presentation/views/home_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ class HomeView extends GetView<HomeViewController> {
child: SplitView(
controller: controller.splitViewController,
gripColor: context.theme.colorScheme.secondary,
gripColorActive:
context.theme.colorScheme.secondary,
gripColorActive: context.theme.colorScheme.secondary,
gripSize: 8,
viewMode: context.isPortrait
? SplitViewMode.Vertical
Expand Down Expand Up @@ -204,13 +203,10 @@ class HomeView extends GetView<HomeViewController> {
() => TabBar(
controller: controller.tabController,
isScrollable: true,
labelColor: Theme.of(context).colorScheme.tertiary,
unselectedLabelColor: Theme.of(context).textTheme.bodyLarge!.color,
indicatorColor: Theme.of(context).colorScheme.tertiary,
labelPadding: const EdgeInsets.symmetric(horizontal: 30),
indicatorSize: TabBarIndicatorSize.tab,
indicatorWeight: 2,
dividerColor: Colors.transparent,
onTap: (index) {
controller.tabIndex.value = index;
},
Expand Down Expand Up @@ -288,16 +284,9 @@ class HomeView extends GetView<HomeViewController> {
controller.isPickingEmote.value = false;
},
textInputAction: TextInputAction.send,
style: Theme.of(context).textTheme.bodyLarge,
maxLines: 1,
decoration: InputDecoration(
border: InputBorder.none,
hintStyle: TextStyle(
color: Theme.of(context)
.textTheme
.bodyLarge!
.backgroundColor,
fontSize: 16),
hintText: controller.settings.value.generalSettings!
.displayViewerCount
? '${Get.find<TwitchTabViewController>().twitchStreamInfos.value.viewerCount} viewers'
Expand Down Expand Up @@ -451,7 +440,7 @@ class HomeView extends GetView<HomeViewController> {
child: InkWell(
onTap: () async {
controller.displayDashboard.value =
!controller.displayDashboard.value;
!controller.displayDashboard.value;
},
child: Icon(
Icons.dashboard_rounded,
Expand Down Expand Up @@ -546,10 +535,10 @@ class HomeView extends GetView<HomeViewController> {
(int index) => Tab(
height: 30,
child: Text(
controller.channels[index].chatGroup.channels
.map((e) => e.channel)
.join(", "),
style: Theme.of(context).textTheme.bodyLarge),
controller.channels[index].chatGroup.channels
.map((e) => e.channel)
.join(", "),
),
),
),
);
Expand Down
1 change: 0 additions & 1 deletion lib/src/presentation/views/login_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ class LoginView extends GetView<LoginViewController> {
child: Obx(
() => Text(
controller.loadingMessage.value,
style: Theme.of(context).textTheme.bodyLarge,
),
),
),
Expand Down
66 changes: 17 additions & 49 deletions lib/src/presentation/views/settings_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ class SettingsView extends GetView<SettingsViewController> {
() => Scaffold(
appBar: AppBar(
leading: IconButton(
icon: Icon(
icon: const Icon(
Icons.arrow_back,
color: Theme.of(context).textTheme.bodyLarge!.color,
),
onPressed: () => Get.back(),
),
Expand All @@ -55,7 +54,6 @@ class SettingsView extends GetView<SettingsViewController> {
}
},
style: TextButton.styleFrom(
textStyle: const TextStyle(fontSize: 12),
backgroundColor:
controller.homeViewController.twitchData != null
? Colors.red
Expand All @@ -71,11 +69,8 @@ class SettingsView extends GetView<SettingsViewController> {
),
],
backgroundColor: Theme.of(context).colorScheme.secondary,
title: Text(
title: const Text(
"Settings",
style: TextStyle(
color: Theme.of(context).textTheme.bodyLarge!.color,
),
),
centerTitle: false,
),
Expand All @@ -88,12 +83,8 @@ class SettingsView extends GetView<SettingsViewController> {
const EdgeInsets.only(top: 8, left: 10, right: 10, bottom: 8),
children: [
Subscription(controller: controller),
Divider(
const Divider(
height: 20,
thickness: 2,
indent: 0,
endIndent: 0,
color: Theme.of(context).colorScheme.secondary,
),
chatSettings(context, width),
Divider(
Expand All @@ -104,20 +95,12 @@ class SettingsView extends GetView<SettingsViewController> {
color: Theme.of(context).colorScheme.secondary,
),
connectionsSettings(context, width),
Divider(
const Divider(
height: 20,
thickness: 2,
indent: 0,
endIndent: 0,
color: Theme.of(context).colorScheme.secondary,
),
generalSettings(context, width),
Divider(
const Divider(
height: 20,
thickness: 2,
indent: 0,
endIndent: 0,
color: Theme.of(context).colorScheme.secondary,
),
contactSettings(context, width),
Container(
Expand Down Expand Up @@ -162,10 +145,9 @@ class SettingsView extends GetView<SettingsViewController> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
const Text(
"FFZ, BTTV & 7TV emotes",
style: TextStyle(
color: Theme.of(context).textTheme.bodyLarge!.color,
fontSize: 18,
),
),
Expand All @@ -186,17 +168,13 @@ class SettingsView extends GetView<SettingsViewController> {
children: [
Text(
"text_size".tr,
style: TextStyle(
color: Theme.of(context).textTheme.bodyLarge!.color,
fontSize: 18),
style: const TextStyle(fontSize: 18),
),
Text(
controller.homeViewController.settings.value.textSize!
.ceil()
.toString(),
style: TextStyle(
color: Theme.of(context).textTheme.bodyLarge!.color,
fontSize: 18)),
style: const TextStyle(fontSize: 18)),
Slider(
onChanged: (value) {
controller.homeViewController.settings.value =
Expand All @@ -219,9 +197,7 @@ class SettingsView extends GetView<SettingsViewController> {
children: [
Text(
"show_timestamp".tr,
style: TextStyle(
color: Theme.of(context).textTheme.bodyLarge!.color,
fontSize: 18),
style: const TextStyle(fontSize: 18),
),
Switch(
onChanged: (value) {
Expand All @@ -238,11 +214,9 @@ class SettingsView extends GetView<SettingsViewController> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
const Text(
"Hide deleted messages",
style: TextStyle(
color: Theme.of(context).textTheme.bodyLarge!.color,
fontSize: 18),
style: TextStyle(fontSize: 18),
),
Switch(
onChanged: (value) {
Expand Down Expand Up @@ -346,8 +320,7 @@ class SettingsView extends GetView<SettingsViewController> {
children: [
Text(
"dark_mode".tr,
style: TextStyle(
color: Theme.of(context).textTheme.bodyLarge!.color,
style: const TextStyle(
fontSize: 18,
),
),
Expand Down Expand Up @@ -376,8 +349,7 @@ class SettingsView extends GetView<SettingsViewController> {
Expanded(
child: Text(
"prevent_speaker".tr,
style: TextStyle(
color: Theme.of(context).textTheme.bodyLarge!.color,
style: const TextStyle(
fontSize: 18,
),
),
Expand All @@ -401,11 +373,10 @@ class SettingsView extends GetView<SettingsViewController> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
const Expanded(
child: Text(
"Display viewer count",
style: TextStyle(
color: Theme.of(context).textTheme.bodyLarge!.color,
fontSize: 18,
),
),
Expand All @@ -431,8 +402,7 @@ class SettingsView extends GetView<SettingsViewController> {
children: [
Text(
"language".tr,
style: TextStyle(
color: Theme.of(context).textTheme.bodyLarge!.color,
style: const TextStyle(
fontSize: 18,
),
),
Expand Down Expand Up @@ -509,10 +479,9 @@ class SettingsView extends GetView<SettingsViewController> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
const Text(
"OBS",
style: TextStyle(
color: Theme.of(context).textTheme.bodyLarge!.color,
fontSize: 18,
),
),
Expand Down Expand Up @@ -682,8 +651,7 @@ class SettingsView extends GetView<SettingsViewController> {
padding: const EdgeInsets.only(left: 10),
child: Text(
title,
style: TextStyle(
color: Theme.of(context).textTheme.bodyLarge!.color,
style: const TextStyle(
fontSize: 18,
),
),
Expand Down
Loading
Loading