Removed modal style

This commit is contained in:
JHubi1 2024-08-22 23:07:27 +02:00
parent a69622250b
commit a9fed3e36d
No known key found for this signature in database
GPG Key ID: 7BF82570CBBBD050
5 changed files with 327 additions and 343 deletions

View File

@ -536,12 +536,6 @@ class _MainAppState extends State<MainApp> {
}
showModalBottomSheet(
context: context,
barrierColor: (Theme.of(context)
.brightness ==
Brightness.dark)
? Colors.grey
.withOpacity(0.2)
: null,
builder: (context) {
return Container(
padding:
@ -1266,11 +1260,6 @@ class _MainAppState extends State<MainApp> {
}
showModalBottomSheet(
context: context,
barrierColor:
(Theme.of(context).brightness ==
Brightness.dark)
? Colors.grey.withOpacity(0.2)
: null,
builder: (context) {
return Container(
width: double.infinity,

View File

@ -54,10 +54,7 @@ Widget toggle(BuildContext context, String text, bool value,
Padding(
padding: EdgeInsets.only(
left: (icon == null) ? 16 : 32, right: 16, top: 12),
child: Divider(
color: (Theme.of(context).brightness == Brightness.light)
? Colors.grey[300]
: Colors.grey[900])),
child: Divider(color: Theme.of(context).dividerColor)),
Row(mainAxisSize: MainAxisSize.max, children: [
(icon != null)
? Padding(
@ -366,7 +363,9 @@ class _ScreenSettingsState extends State<ScreenSettings> {
child: SizedBox(height: 200, child: MoveWindow()))
]),
actions: desktopControlsActions(context)),
body: Padding(
body: Center(
child: Container(
constraints: const BoxConstraints(maxWidth: 1200),
padding: const EdgeInsets.only(left: 16, right: 16),
child: LayoutBuilder(builder: (context, constraints) {
var column1 =
@ -386,8 +385,8 @@ class _ScreenSettingsState extends State<ScreenSettings> {
checkHost();
},
decoration: InputDecoration(
labelText:
AppLocalizations.of(context)!.settingsHost,
labelText: AppLocalizations.of(context)!
.settingsHost,
hintText: "http://localhost:11434",
prefixIcon: IconButton(
tooltip: AppLocalizations.of(context)!
@ -437,8 +436,8 @@ class _ScreenSettingsState extends State<ScreenSettings> {
selectionHaptic();
checkHost();
},
icon:
const Icon(Icons.save_rounded),
icon: const Icon(
Icons.save_rounded),
)),
border: const OutlineInputBorder(),
error: (hostInvalidHost || hostInvalidUrl)
@ -492,11 +491,13 @@ class _ScreenSettingsState extends State<ScreenSettings> {
color: Colors.grey),
const SizedBox(width: 8),
Text(
AppLocalizations.of(context)!
AppLocalizations.of(
context)!
.settingsHostChecking,
style: const TextStyle(
color: Colors.grey,
fontFamily: "monospace"))
fontFamily:
"monospace"))
],
)
: Row(
@ -509,22 +510,26 @@ class _ScreenSettingsState extends State<ScreenSettings> {
.primary)),
const SizedBox(width: 8),
Text(
AppLocalizations.of(context)!
AppLocalizations.of(
context)!
.settingsHostValid,
style: TextStyle(
color: Colors.green
.harmonizeWith(
Theme.of(context)
Theme.of(
context)
.colorScheme
.primary),
fontFamily: "monospace"))
fontFamily:
"monospace"))
],
))))
]);
var column2 =
Column(mainAxisSize: MainAxisSize.min, children: [
button(
AppLocalizations.of(context)!.settingsTitleBehavior,
AppLocalizations.of(context)!
.settingsTitleBehavior,
Icons.psychology_rounded, () {
selectionHaptic();
Navigator.push(
@ -581,7 +586,8 @@ class _ScreenSettingsState extends State<ScreenSettings> {
context: context,
description:
"\n${AppLocalizations.of(context)!.settingsDescriptionExport}"),
button(AppLocalizations.of(context)!.settingsTitleAbout,
button(
AppLocalizations.of(context)!.settingsTitleAbout,
Icons.help_rounded, () {
selectionHaptic();
Navigator.push(
@ -605,7 +611,8 @@ class _ScreenSettingsState extends State<ScreenSettings> {
children: [
Expanded(
child: Column(
mainAxisSize: MainAxisSize.max,
mainAxisSize:
MainAxisSize.max,
children: [
column1,
Expanded(
@ -616,7 +623,8 @@ class _ScreenSettingsState extends State<ScreenSettings> {
highlightColor:
Colors.transparent,
enableFeedback: false,
hoverColor: Colors.transparent,
hoverColor:
Colors.transparent,
onTap: () async {
if (iconSize != 1) return;
heavyHaptic();
@ -661,7 +669,8 @@ class _ScreenSettingsState extends State<ScreenSettings> {
.primary)),
)
])),
verticalTitleDivider(context: context),
verticalTitleDivider(
context: context),
Expanded(child: column2)
])
: ListView(children: [
@ -688,6 +697,7 @@ class _ScreenSettingsState extends State<ScreenSettings> {
color: Colors.grey.harmonizeWith(
Theme.of(context).colorScheme.primary))
]);
})))));
})),
))));
}
}

View File

@ -345,10 +345,6 @@ class _ScreenSettingsInterfaceState extends State<ScreenSettingsInterface> {
selectionHaptic();
showModalBottomSheet(
context: context,
barrierColor: (Theme.of(context).brightness ==
Brightness.dark)
? Colors.grey.withOpacity(0.2)
: null,
builder: (context) {
return StatefulBuilder(
builder: (context, setState) {

View File

@ -180,10 +180,6 @@ class _ScreenSettingsVoiceState extends State<ScreenSettingsVoice> {
showModalBottomSheet(
context: context,
barrierColor:
(Theme.of(context).brightness == Brightness.dark)
? Colors.grey.withOpacity(0.2)
: null,
builder:
(context) => StatefulBuilder(
builder: (context, setLocalState) {

View File

@ -290,11 +290,7 @@ void setModel(BuildContext context, Function setState) {
});
} else {
showModalBottomSheet(
context: context,
barrierColor: (Theme.of(context).brightness == Brightness.dark)
? Colors.grey.withOpacity(0.2)
: null,
builder: (context) => Container(child: content));
context: context, builder: (context) => Container(child: content));
}
}
@ -506,9 +502,6 @@ Future<String> prompt(BuildContext context,
String? error;
await showModalBottomSheet(
context: context,
barrierColor: (Theme.of(context).brightness == Brightness.dark)
? Colors.grey.withOpacity(0.2)
: null,
isScrollControlled: true,
builder: (context) {
return StatefulBuilder(builder: (context, setLocalState) {