fix all the 3d effects by removing them
This commit is contained in:
parent
3101b19a49
commit
ad7aaa5c24
|
@ -292,6 +292,7 @@ class _MakePostState extends State<MakePost> {
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
c.addAll([
|
c.addAll([
|
||||||
|
// content warnings
|
||||||
TextFormField(
|
TextFormField(
|
||||||
style: Theme.of(context).textTheme.bodyMedium,
|
style: Theme.of(context).textTheme.bodyMedium,
|
||||||
initialValue: spoilerText,
|
initialValue: spoilerText,
|
||||||
|
@ -315,6 +316,7 @@ class _MakePostState extends State<MakePost> {
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: MediaQuery.of(context).size.height * 0.6,
|
height: MediaQuery.of(context).size.height * 0.6,
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
|
autofocus: true,
|
||||||
initialValue: replyAts,
|
initialValue: replyAts,
|
||||||
style: Theme.of(context).textTheme.bodyMedium,
|
style: Theme.of(context).textTheme.bodyMedium,
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
|
@ -394,12 +396,6 @@ class _MakePostState extends State<MakePost> {
|
||||||
contentPadding: const EdgeInsets.all(24),
|
contentPadding: const EdgeInsets.all(24),
|
||||||
title: Column(
|
title: Column(
|
||||||
children: [
|
children: [
|
||||||
SelectableText(
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
widget.inReplyTo == null
|
|
||||||
? "make-post".i18n()
|
|
||||||
: "make-reply".i18n(),
|
|
||||||
style: Theme.of(context).textTheme.displayMedium),
|
|
||||||
if (status != null) SelectableText(status!),
|
if (status != null) SelectableText(status!),
|
||||||
if (sending) const LinearProgressIndicator(),
|
if (sending) const LinearProgressIndicator(),
|
||||||
],
|
],
|
||||||
|
|
|
@ -71,7 +71,7 @@ class _SearchDialogueState extends State<SearchDialogue> {
|
||||||
})),
|
})),
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
prefixIcon: Icon(
|
prefixIcon: Icon(
|
||||||
color: Theme.of(context).colorScheme.secondary,
|
color: Theme.of(context).colorScheme.primary,
|
||||||
Icons.search,
|
Icons.search,
|
||||||
))),
|
))),
|
||||||
if (searched < global.settings!.identities.length &&
|
if (searched < global.settings!.identities.length &&
|
||||||
|
|
|
@ -7,6 +7,16 @@ import 'fourth_website.dart' as color_fourth;
|
||||||
import 'second.dart' as color_second;
|
import 'second.dart' as color_second;
|
||||||
import 'first.dart' as color_first;
|
import 'first.dart' as color_first;
|
||||||
|
|
||||||
|
bool checkActive(Set<MaterialState> states) {
|
||||||
|
return states.intersection({
|
||||||
|
MaterialState.focused,
|
||||||
|
MaterialState.hovered,
|
||||||
|
MaterialState.pressed
|
||||||
|
}).isNotEmpty;
|
||||||
|
}
|
||||||
|
|
||||||
|
const defaultRadius = Radius.circular(8);
|
||||||
|
|
||||||
// color schemes to pick from can be added here
|
// color schemes to pick from can be added here
|
||||||
// there is a class to create these
|
// there is a class to create these
|
||||||
final available = [
|
final available = [
|
||||||
|
@ -23,11 +33,12 @@ final available = [
|
||||||
|
|
||||||
ThemeData getTheme(CustomColors colors) {
|
ThemeData getTheme(CustomColors colors) {
|
||||||
return ThemeData(
|
return ThemeData(
|
||||||
|
applyElevationOverlayColor: false,
|
||||||
floatingActionButtonTheme: FloatingActionButtonThemeData(
|
floatingActionButtonTheme: FloatingActionButtonThemeData(
|
||||||
hoverColor: colors.colorScheme.onSurface,
|
hoverColor: colors.colorScheme.onSurface,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
enableFeedback: false,
|
enableFeedback: false,
|
||||||
hoverElevation: 24,
|
hoverElevation: 0,
|
||||||
),
|
),
|
||||||
fontFamily: 'Atkinson',
|
fontFamily: 'Atkinson',
|
||||||
textTheme: TextTheme(
|
textTheme: TextTheme(
|
||||||
|
@ -77,16 +88,32 @@ ThemeData getTheme(CustomColors colors) {
|
||||||
),
|
),
|
||||||
elevatedButtonTheme: ElevatedButtonThemeData(
|
elevatedButtonTheme: ElevatedButtonThemeData(
|
||||||
style: ButtonStyle(
|
style: ButtonStyle(
|
||||||
|
shadowColor: MaterialStateProperty.all(Colors.transparent),
|
||||||
|
shape: MaterialStateProperty.resolveWith((states) {
|
||||||
|
if (checkActive(states)) {
|
||||||
|
return RoundedRectangleBorder(
|
||||||
|
borderRadius: const BorderRadius.all(defaultRadius),
|
||||||
|
side: BorderSide(color: colors.colorScheme.primary),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return const RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.all(defaultRadius));
|
||||||
|
}),
|
||||||
|
elevation: MaterialStateProperty.all(0),
|
||||||
foregroundColor: MaterialStateProperty.resolveWith((states) {
|
foregroundColor: MaterialStateProperty.resolveWith((states) {
|
||||||
if (states.contains(MaterialState.disabled)) {
|
if (states.contains(MaterialState.disabled)) {
|
||||||
return colors.colorScheme.surface;
|
return colors.colorScheme.surface;
|
||||||
}
|
}
|
||||||
|
if (checkActive(states)) return colors.colorScheme.primary;
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}),
|
}),
|
||||||
backgroundColor: MaterialStateProperty.resolveWith((states) {
|
backgroundColor: MaterialStateProperty.resolveWith((states) {
|
||||||
if (states.contains(MaterialState.disabled)) return colors.hintColor;
|
if (states.contains(MaterialState.disabled)) return colors.hintColor;
|
||||||
|
if (checkActive(states)) return colors.colorScheme.onPrimary;
|
||||||
return null;
|
return null;
|
||||||
}),
|
}),
|
||||||
|
overlayColor: MaterialStateProperty.all(Colors.transparent),
|
||||||
textStyle: MaterialStateProperty.resolveWith((states) =>
|
textStyle: MaterialStateProperty.resolveWith((states) =>
|
||||||
const TextStyle(
|
const TextStyle(
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
|
@ -112,6 +139,18 @@ ThemeData getTheme(CustomColors colors) {
|
||||||
),
|
),
|
||||||
textButtonTheme: TextButtonThemeData(
|
textButtonTheme: TextButtonThemeData(
|
||||||
style: ButtonStyle(
|
style: ButtonStyle(
|
||||||
|
elevation: MaterialStateProperty.all(0),
|
||||||
|
shape: MaterialStateProperty.all(const RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.all(defaultRadius))),
|
||||||
|
shadowColor: MaterialStateProperty.all(Colors.transparent),
|
||||||
|
backgroundColor: MaterialStateProperty.resolveWith((states) {
|
||||||
|
if (checkActive(states)) return colors.colorScheme.primary;
|
||||||
|
return null;
|
||||||
|
}),
|
||||||
|
foregroundColor: MaterialStateProperty.resolveWith((states) {
|
||||||
|
if (checkActive(states)) return colors.colorScheme.onPrimary;
|
||||||
|
return null;
|
||||||
|
}),
|
||||||
textStyle: MaterialStateProperty.all(
|
textStyle: MaterialStateProperty.all(
|
||||||
const TextStyle(fontSize: 18),
|
const TextStyle(fontSize: 18),
|
||||||
),
|
),
|
||||||
|
@ -129,6 +168,7 @@ ThemeData getTheme(CustomColors colors) {
|
||||||
colorScheme: colors.colorScheme,
|
colorScheme: colors.colorScheme,
|
||||||
errorColor: colors.colorScheme.error,
|
errorColor: colors.colorScheme.error,
|
||||||
bottomAppBarTheme: BottomAppBarTheme(
|
bottomAppBarTheme: BottomAppBarTheme(
|
||||||
|
elevation: 0,
|
||||||
color: colors.colorScheme.surface,
|
color: colors.colorScheme.surface,
|
||||||
),
|
),
|
||||||
navigationBarTheme: NavigationBarThemeData(
|
navigationBarTheme: NavigationBarThemeData(
|
||||||
|
@ -162,12 +202,16 @@ ThemeData getTheme(CustomColors colors) {
|
||||||
fontWeight: FontWeight.w700,
|
fontWeight: FontWeight.w700,
|
||||||
),
|
),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(8)),
|
borderRadius: const BorderRadius.all(defaultRadius),
|
||||||
color: colors.colorScheme.primary,
|
color: colors.colorScheme.primary,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
canvasColor: colors.colorScheme.surface,
|
canvasColor: colors.colorScheme.surface,
|
||||||
dialogBackgroundColor: colors.colorScheme.surface,
|
dialogTheme: DialogTheme(
|
||||||
|
elevation: 0,
|
||||||
|
backgroundColor: colors.colorScheme.surface,
|
||||||
|
shape: const RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.all(defaultRadius))),
|
||||||
selectedRowColor: colors.colorScheme.background,
|
selectedRowColor: colors.colorScheme.background,
|
||||||
textSelectionTheme:
|
textSelectionTheme:
|
||||||
TextSelectionThemeData(selectionColor: colors.hintColor),
|
TextSelectionThemeData(selectionColor: colors.hintColor),
|
||||||
|
|
Loading…
Reference in New Issue