diff --git a/lib/dialogues/full_post_view.dart b/lib/dialogues/full_post_view.dart index a108a92..51a4baf 100644 --- a/lib/dialogues/full_post_view.dart +++ b/lib/dialogues/full_post_view.dart @@ -15,12 +15,14 @@ class FullPostView extends StatefulWidget { this.hidden = true, this.ancestors, this.descendants, + this.forceSensitive = false, }); final PostModel originPostModel; final Map? identities; final bool hidden; final List? ancestors; final List? descendants; + final bool forceSensitive; @override State createState() => _FullPostViewState(); @@ -152,7 +154,7 @@ class _FullPostViewState extends State { }, ), ), - if (sensitive) + if (sensitive || widget.forceSensitive) ElevatedButton.icon( onPressed: () { setState(() { @@ -165,6 +167,7 @@ class _FullPostViewState extends State { identities: identities, ancestors: ancestors, descendants: descendants, + forceSensitive: true, ), ); }); @@ -179,7 +182,7 @@ class _FullPostViewState extends State { ), Container( constraints: BoxConstraints( - maxHeight: MediaQuery.of(context).size.height * 0.9, + maxHeight: MediaQuery.of(context).size.height * 2 / 3, maxWidth: global.getConstraints(context).maxWidth), width: global.getWidth(context), child: SingleChildScrollView( diff --git a/lib/dialogues/profile_view.dart b/lib/dialogues/profile_view.dart index 0e6b622..ec439e9 100644 --- a/lib/dialogues/profile_view.dart +++ b/lib/dialogues/profile_view.dart @@ -206,7 +206,7 @@ class _ProfileViewState extends State { constraints: global.getConstraints(context), width: global.getWidth(context) + MediaQuery.of(context).size.width * 0.2, - height: MediaQuery.of(context).size.height * 0.9, + height: MediaQuery.of(context).size.height * 2 / 3, child: ListView.builder( controller: _scrollController, itemCount: threads.length + 2, diff --git a/lib/pages/notifications/single_notif.dart b/lib/pages/notifications/single_notif.dart index 7299578..c307fec 100644 --- a/lib/pages/notifications/single_notif.dart +++ b/lib/pages/notifications/single_notif.dart @@ -27,7 +27,10 @@ class SingleNotif extends StatelessWidget { padding: const EdgeInsets.all(24), decoration: BoxDecoration( color: Theme.of(context).colorScheme.surface, - border: Border.all(color: Theme.of(context).colorScheme.secondary), + border: Border.all( + color: Theme.of(context).colorScheme.secondary, + width: 2, + ), borderRadius: BorderRadius.circular(8), ), child: Material( diff --git a/lib/pages/settings/settings.dart b/lib/pages/settings/settings.dart index 96e8969..ba45a3f 100644 --- a/lib/pages/settings/settings.dart +++ b/lib/pages/settings/settings.dart @@ -46,7 +46,10 @@ class SettingsPanel extends StatelessWidget { child: Container( decoration: BoxDecoration( color: Theme.of(context).colorScheme.surface, - border: Border.all(color: Theme.of(context).colorScheme.secondary), + border: Border.all( + color: Theme.of(context).colorScheme.secondary, + width: 2, + ), borderRadius: BorderRadius.circular(8), ), padding: const EdgeInsets.all(24), diff --git a/lib/partials/thread.dart b/lib/partials/thread.dart index 76de666..f10ae5c 100644 --- a/lib/partials/thread.dart +++ b/lib/partials/thread.dart @@ -84,7 +84,10 @@ class _ThreadState extends State { padding: const EdgeInsets.all(24), decoration: BoxDecoration( color: Theme.of(context).colorScheme.surface, - border: Border.all(color: Theme.of(context).colorScheme.secondary), + border: Border.all( + color: Theme.of(context).colorScheme.secondary, + width: 2, + ), borderRadius: BorderRadius.circular(8), ), child: Column( @@ -107,8 +110,8 @@ class _ThreadState extends State { constraints: global.getConstraints(context), decoration: BoxDecoration( color: Theme.of(context).colorScheme.surface, - border: - Border.all(color: Theme.of(context).colorScheme.secondary), + border: Border.all( + color: Theme.of(context).colorScheme.secondary, width: 2), borderRadius: BorderRadius.circular(8), ), child: Material( diff --git a/lib/themes/adwaita.dart b/lib/themes/adwaita.dart index 7109eb5..07d891d 100644 --- a/lib/themes/adwaita.dart +++ b/lib/themes/adwaita.dart @@ -2,35 +2,39 @@ import 'package:flutter/material.dart'; import 'themes.dart' as themes; themes.CustomColors themeDark = themes.CustomColors( - "adwaita dark", - const Color.fromARGB(255, 26, 95, 180), - const ColorScheme( - brightness: Brightness.dark, - primary: Color.fromARGB(255, 255, 190, 111), - onPrimary: Color.fromARGB(255, 61, 56, 70), - secondary: Color.fromARGB(255, 143, 240, 164), - onSecondary: Color.fromARGB(255, 61, 56, 70), - error: Color.fromARGB(255, 255, 85, 85), - onError: Color.fromARGB(255, 61, 56, 70), - background: Color.fromARGB(255, 36, 31, 49), - onBackground: Color.fromARGB(255, 246, 245, 244), - surface: Color.fromARGB(255, 61, 56, 70), - onSurface: Color.fromARGB(255, 246, 245, 244), - )); + "adwaita dark", + const Color.fromARGB(255, 26, 95, 180), + const ColorScheme( + brightness: Brightness.dark, + primary: Color.fromARGB(255, 255, 190, 111), + onPrimary: Color.fromARGB(255, 61, 56, 70), + secondary: Color.fromARGB(255, 143, 240, 164), + onSecondary: Color.fromARGB(255, 61, 56, 70), + error: Color.fromARGB(255, 255, 85, 85), + onError: Color.fromARGB(255, 61, 56, 70), + background: Color.fromARGB(255, 36, 31, 49), + onBackground: Color.fromARGB(255, 246, 245, 244), + surface: Color.fromARGB(255, 61, 56, 70), + onSurface: Color.fromARGB(255, 246, 245, 244), + ), + const Color.fromARGB(255, 36, 31, 49), +); themes.CustomColors themeLight = themes.CustomColors( - "adwaita light", - const Color.fromARGB(255, 153, 193, 241), - const ColorScheme( - brightness: Brightness.dark, - primary: Color.fromARGB(255, 198, 70, 0), - onPrimary: Color.fromARGB(255, 246, 245, 244), - secondary: Color.fromARGB(255, 38, 162, 105), - onSecondary: Color.fromARGB(255, 246, 245, 244), - error: Color.fromARGB(255, 165, 29, 45), - onError: Color.fromARGB(255, 246, 245, 244), - background: Color.fromARGB(255, 222, 221, 218), - onBackground: Color.fromARGB(255, 36, 31, 49), - surface: Color.fromARGB(255, 246, 245, 244), - onSurface: Color.fromARGB(255, 36, 31, 49), - )); + "adwaita light", + const Color.fromARGB(255, 153, 193, 241), + const ColorScheme( + brightness: Brightness.dark, + primary: Color.fromARGB(255, 198, 70, 0), + onPrimary: Color.fromARGB(255, 246, 245, 244), + secondary: Color.fromARGB(255, 38, 162, 105), + onSecondary: Color.fromARGB(255, 246, 245, 244), + error: Color.fromARGB(255, 165, 29, 45), + onError: Color.fromARGB(255, 246, 245, 244), + background: Color.fromARGB(255, 222, 221, 218), + onBackground: Color.fromARGB(255, 36, 31, 49), + surface: Color.fromARGB(255, 246, 245, 244), + onSurface: Color.fromARGB(255, 36, 31, 49), + ), + const Color.fromARGB(255, 222, 221, 218), +); diff --git a/lib/themes/dracula.dart b/lib/themes/dracula.dart index 47daba3..4714f7a 100644 --- a/lib/themes/dracula.dart +++ b/lib/themes/dracula.dart @@ -21,4 +21,5 @@ themes.CustomColors theme = themes.CustomColors( onBackground: Color.fromARGB(255, 248, 248, 242), surface: Color.fromARGB(255, 40, 42, 54), onSurface: Color.fromARGB(255, 248, 248, 242), - )); + ), + const Color.fromARGB(255, 68, 71, 90)); diff --git a/lib/themes/first.dart b/lib/themes/first.dart new file mode 100644 index 0000000..4fc8f3b --- /dev/null +++ b/lib/themes/first.dart @@ -0,0 +1,21 @@ +import 'package:flutter/material.dart'; +import 'themes.dart' as themes; + +themes.CustomColors theme = themes.CustomColors( + "website #1", + const Color.fromARGB(255, 89, 89, 89), + const ColorScheme( + brightness: Brightness.light, + primary: Color.fromARGB(255, 0, 25, 53), + onPrimary: Color.fromARGB(255, 255, 255, 255), + secondary: Color.fromARGB(255, 0, 184, 255), + onSecondary: Color.fromARGB(255, 255, 255, 255), + error: Color.fromARGB(255, 245, 248, 250), + onError: Color.fromARGB(255, 20, 23, 26), + background: Color.fromARGB(255, 0, 25, 53), + onBackground: Color.fromARGB(255, 20, 23, 26), + surface: Color.fromARGB(255, 255, 255, 255), + onSurface: Color.fromARGB(255, 0, 0, 0), + ), + const Color.fromARGB(255, 188, 195, 202), +); diff --git a/lib/themes/fourth_website.dart b/lib/themes/fourth_website.dart index 420f4a3..5dcf940 100644 --- a/lib/themes/fourth_website.dart +++ b/lib/themes/fourth_website.dart @@ -2,23 +2,25 @@ import 'package:flutter/material.dart'; import 'themes.dart' as themes; themes.CustomColors theme = themes.CustomColors( - "website #4", - const Color.fromARGB( - 255, - 255, - 170, - 90, - ), - const ColorScheme( - brightness: Brightness.light, - primary: Color.fromARGB(255, 131, 37, 79), - onPrimary: Color.fromARGB(255, 255, 249, 242), - secondary: Color.fromARGB(255, 81, 17, 46), - onSecondary: Color.fromARGB(255, 255, 249, 242), - error: Color.fromARGB(255, 255, 85, 85), - onError: Color.fromARGB(255, 255, 249, 242), - background: Color.fromARGB(255, 255, 241, 223), - onBackground: Color.fromARGB(255, 248, 248, 242), - surface: Color.fromARGB(255, 255, 249, 242), - onSurface: Color.fromARGB(255, 25, 25, 25), - )); + "website #4", + const Color.fromARGB( + 255, + 255, + 170, + 90, + ), + const ColorScheme( + brightness: Brightness.light, + primary: Color.fromARGB(255, 131, 37, 79), + onPrimary: Color.fromARGB(255, 255, 249, 242), + secondary: Color.fromARGB(255, 81, 17, 46), + onSecondary: Color.fromARGB(255, 255, 249, 242), + error: Color.fromARGB(255, 255, 85, 85), + onError: Color.fromARGB(255, 255, 249, 242), + background: Color.fromARGB(255, 255, 241, 223), + onBackground: Color.fromARGB(255, 25, 25, 25), + surface: Color.fromARGB(255, 255, 249, 242), + onSurface: Color.fromARGB(255, 25, 25, 25), + ), + const Color.fromARGB(255, 255, 241, 223), +); diff --git a/lib/themes/gruvbox.dart b/lib/themes/gruvbox.dart index fd93fdf..0876856 100644 --- a/lib/themes/gruvbox.dart +++ b/lib/themes/gruvbox.dart @@ -2,35 +2,39 @@ import 'package:flutter/material.dart'; import 'themes.dart' as themes; themes.CustomColors themeDark = themes.CustomColors( - "gruvbox dark", - const Color.fromARGB(255, 175, 58, 3), - const ColorScheme( - brightness: Brightness.dark, - primary: Color.fromARGB(255, 211, 134, 155), - onPrimary: Color.fromARGB(255, 29, 32, 33), - secondary: Color.fromARGB(255, 184, 187, 38), - onSecondary: Color.fromARGB(255, 29, 32, 33), - error: Color.fromARGB(255, 251, 73, 52), - onError: Color.fromARGB(255, 29, 32, 33), - background: Color.fromARGB(255, 29, 32, 33), - onBackground: Color.fromARGB(255, 249, 245, 215), - surface: Color.fromARGB(255, 50, 48, 47), - onSurface: Color.fromARGB(255, 249, 245, 215), - )); + "gruvbox dark", + const Color.fromARGB(255, 175, 58, 3), + const ColorScheme( + brightness: Brightness.dark, + primary: Color.fromARGB(255, 211, 134, 155), + onPrimary: Color.fromARGB(255, 29, 32, 33), + secondary: Color.fromARGB(255, 184, 187, 38), + onSecondary: Color.fromARGB(255, 29, 32, 33), + error: Color.fromARGB(255, 251, 73, 52), + onError: Color.fromARGB(255, 29, 32, 33), + background: Color.fromARGB(255, 29, 32, 33), + onBackground: Color.fromARGB(255, 249, 245, 215), + surface: Color.fromARGB(255, 50, 48, 47), + onSurface: Color.fromARGB(255, 249, 245, 215), + ), + const Color.fromARGB(255, 29, 32, 33), +); themes.CustomColors themeLight = themes.CustomColors( - "gruvbox light", - const Color.fromARGB(255, 255, 190, 111), - const ColorScheme( - brightness: Brightness.light, - primary: Color.fromARGB(255, 175, 58, 3), - onPrimary: Color.fromARGB(255, 249, 245, 215), - secondary: Color.fromARGB(255, 121, 116, 14), - onSecondary: Color.fromARGB(255, 249, 245, 215), - error: Color.fromARGB(255, 255, 85, 85), - onError: Color.fromARGB(255, 249, 245, 215), - background: Color.fromARGB(255, 242, 229, 188), - onBackground: Color.fromARGB(255, 29, 32, 33), - surface: Color.fromARGB(255, 249, 245, 215), - onSurface: Color.fromARGB(255, 29, 32, 33), - )); + "gruvbox light", + const Color.fromARGB(255, 255, 190, 111), + const ColorScheme( + brightness: Brightness.light, + primary: Color.fromARGB(255, 175, 58, 3), + onPrimary: Color.fromARGB(255, 249, 245, 215), + secondary: Color.fromARGB(255, 121, 116, 14), + onSecondary: Color.fromARGB(255, 249, 245, 215), + error: Color.fromARGB(255, 255, 85, 85), + onError: Color.fromARGB(255, 249, 245, 215), + background: Color.fromARGB(255, 242, 229, 188), + onBackground: Color.fromARGB(255, 29, 32, 33), + surface: Color.fromARGB(255, 249, 245, 215), + onSurface: Color.fromARGB(255, 29, 32, 33), + ), + const Color.fromARGB(255, 242, 229, 188), +); diff --git a/lib/themes/second.dart b/lib/themes/second.dart new file mode 100644 index 0000000..0768fed --- /dev/null +++ b/lib/themes/second.dart @@ -0,0 +1,21 @@ +import 'package:flutter/material.dart'; +import 'themes.dart' as themes; + +themes.CustomColors theme = themes.CustomColors( + "website #2", + const Color.fromARGB(255, 170, 184, 194), + const ColorScheme( + brightness: Brightness.light, + primary: Color.fromARGB(255, 29, 161, 242), + onPrimary: Color.fromARGB(255, 245, 248, 250), + secondary: Color.fromARGB(255, 29, 161, 242), + onSecondary: Color.fromARGB(255, 245, 248, 250), + error: Color.fromARGB(255, 245, 248, 250), + onError: Color.fromARGB(255, 20, 23, 26), + background: Color.fromARGB(255, 245, 248, 250), + onBackground: Color.fromARGB(255, 20, 23, 26), + surface: Color.fromARGB(255, 245, 248, 250), + onSurface: Color.fromARGB(255, 20, 23, 26), + ), + const Color.fromARGB(255, 225, 232, 237), +); diff --git a/lib/themes/tess.dart b/lib/themes/tess.dart index 602c4eb..42fa4c0 100644 --- a/lib/themes/tess.dart +++ b/lib/themes/tess.dart @@ -2,23 +2,25 @@ import 'package:flutter/material.dart'; import 'themes.dart' as themes; themes.CustomColors theme = themes.CustomColors( - "tess 🐯", - const Color.fromARGB( - 255, - 6, - 34, - 42, - ), - const ColorScheme( - brightness: Brightness.dark, - primary: Color.fromARGB(255, 230, 62, 98), - onPrimary: Color.fromARGB(255, 3, 16, 20), - secondary: Color.fromARGB(255, 230, 62, 98), - onSecondary: Color.fromARGB(255, 3, 16, 20), - error: Color.fromARGB(255, 241, 108, 86), - onError: Color.fromARGB(255, 3, 16, 20), - background: Color.fromARGB(255, 3, 16, 20), - onBackground: Color.fromARGB(255, 238, 141, 239), - surface: Color.fromARGB(255, 3, 16, 20), - onSurface: Color.fromARGB(255, 238, 141, 239), - )); + "tess 🐯", + const Color.fromARGB( + 255, + 6, + 34, + 42, + ), + const ColorScheme( + brightness: Brightness.dark, + primary: Color.fromARGB(255, 230, 62, 98), + onPrimary: Color.fromARGB(255, 3, 16, 20), + secondary: Color.fromARGB(255, 230, 62, 98), + onSecondary: Color.fromARGB(255, 3, 16, 20), + error: Color.fromARGB(255, 241, 108, 86), + onError: Color.fromARGB(255, 3, 16, 20), + background: Color.fromARGB(255, 3, 16, 20), + onBackground: Color.fromARGB(255, 238, 141, 239), + surface: Color.fromARGB(255, 3, 16, 20), + onSurface: Color.fromARGB(255, 238, 141, 239), + ), + const Color.fromARGB(255, 3, 16, 20), +); diff --git a/lib/themes/themes.dart b/lib/themes/themes.dart index 43b28ba..35f554b 100644 --- a/lib/themes/themes.dart +++ b/lib/themes/themes.dart @@ -4,6 +4,8 @@ import 'tess.dart' as color_tess; import 'adwaita.dart' as color_adwaita; import 'gruvbox.dart' as color_gruvbox; import 'fourth_website.dart' as color_fourth; +import 'second.dart' as color_second; +import 'first.dart' as color_first; // color schemes to pick from can be added here // there is a class to create these @@ -14,6 +16,8 @@ final available = [ color_tess.theme, color_gruvbox.themeDark, color_gruvbox.themeLight, + color_first.theme, + color_second.theme, color_fourth.theme, ]; @@ -160,9 +164,9 @@ ThemeData getTheme(CustomColors colors) { textSelectionTheme: TextSelectionThemeData(selectionColor: colors.hintColor), primaryIconTheme: const IconThemeData(size: 24), - hoverColor: colors.colorScheme.background, + hoverColor: colors.hoverColor, shadowColor: colors.colorScheme.surface, - focusColor: colors.colorScheme.background, + focusColor: colors.hoverColor, indicatorColor: colors.hintColor, disabledColor: colors.hintColor, unselectedWidgetColor: colors.hintColor, @@ -196,6 +200,8 @@ ThemeData getTheme(CustomColors colors) { class CustomColors { late String name; late Color hintColor; + // must be set for twilight themes + late Color hoverColor; late ColorScheme colorScheme; - CustomColors(this.name, this.hintColor, this.colorScheme); + CustomColors(this.name, this.hintColor, this.colorScheme, this.hoverColor); }