fix sizing
This commit is contained in:
parent
e2caa421b8
commit
074f9c3c82
|
@ -15,12 +15,14 @@ class FullPostView extends StatefulWidget {
|
|||
this.hidden = true,
|
||||
this.ancestors,
|
||||
this.descendants,
|
||||
this.forceSensitive = false,
|
||||
});
|
||||
final PostModel originPostModel;
|
||||
final Map<String, PostModel>? identities;
|
||||
final bool hidden;
|
||||
final List<PostModel>? ancestors;
|
||||
final List<PostModel>? descendants;
|
||||
final bool forceSensitive;
|
||||
|
||||
@override
|
||||
State<FullPostView> createState() => _FullPostViewState();
|
||||
|
@ -152,7 +154,7 @@ class _FullPostViewState extends State<FullPostView> {
|
|||
},
|
||||
),
|
||||
),
|
||||
if (sensitive)
|
||||
if (sensitive || widget.forceSensitive)
|
||||
ElevatedButton.icon(
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
|
@ -165,6 +167,7 @@ class _FullPostViewState extends State<FullPostView> {
|
|||
identities: identities,
|
||||
ancestors: ancestors,
|
||||
descendants: descendants,
|
||||
forceSensitive: true,
|
||||
),
|
||||
);
|
||||
});
|
||||
|
@ -179,7 +182,7 @@ class _FullPostViewState extends State<FullPostView> {
|
|||
),
|
||||
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(
|
||||
|
|
|
@ -206,7 +206,7 @@ class _ProfileViewState extends State<ProfileView> {
|
|||
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,
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -84,7 +84,10 @@ class _ThreadState extends State<Thread> {
|
|||
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<Thread> {
|
|||
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(
|
||||
|
|
|
@ -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),
|
||||
);
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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),
|
||||
);
|
|
@ -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),
|
||||
);
|
||||
|
|
|
@ -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),
|
||||
);
|
||||
|
|
|
@ -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),
|
||||
);
|
|
@ -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),
|
||||
);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue