added ui for show_breaks

This commit is contained in:
Kima
2024-02-08 20:23:16 +01:00
parent 23b6e1b8c7
commit 8c654beb05
3 changed files with 48 additions and 1 deletions

View File

@@ -96,6 +96,7 @@ extension SettingsLocalization on String {
"current_paint": "Current Paint",
"rename_subjects": "Rename Subjects",
"rename_teachers": "Rename Teachers",
"show_breaks": "Show Breaks",
},
"hu_hu": {
"personal_details": "Személyes információk",
@@ -190,6 +191,7 @@ extension SettingsLocalization on String {
"current_paint": "Jelenlegi téma",
"rename_subjects": "Tantárgyak átnevezése",
"rename_teachers": "Tanárok átnevezése",
"show_breaks": "Szünetek megjelenítése",
},
"de_de": {
"personal_details": "Persönliche Angaben",
@@ -284,6 +286,7 @@ extension SettingsLocalization on String {
"current_paint": "Aktuelles Thema",
"rename_subjects": "Fächer umbenennen",
"rename_teachers": "Lehrer umbenennen",
"show_breaks": "Pausen anzeigen",
},
};

View File

@@ -285,6 +285,44 @@ class GeneralSettingsScreenState extends State<GeneralSettingsScreen> {
),
],
),
SplittedPanel(
padding: const EdgeInsets.only(top: 9.0),
cardPadding: const EdgeInsets.all(4.0),
isSeparated: true,
children: [
PanelButton(
padding: const EdgeInsets.only(left: 14.0, right: 6.0),
onPressed: () {
settingsProvider.update(
showBreaks: !settingsProvider.showBreaks);
setState(() {});
},
title: Text(
"show_breaks".i18n,
style: TextStyle(
color: AppColors.of(context).text.withOpacity(
settingsProvider.showBreaks ? .95 : .25),
),
),
leading: Icon(
FeatherIcons.eye,
size: 22.0,
color: AppColors.of(context)
.text
.withOpacity(settingsProvider.showBreaks ? .95 : .25),
),
trailing: Switch(
onChanged: (v) => settingsProvider.update(showBreaks: v),
value: settingsProvider.showBreaks,
activeColor: Theme.of(context).colorScheme.secondary,
),
borderRadius: const BorderRadius.vertical(
top: Radius.circular(12.0),
bottom: Radius.circular(12.0),
),
),
],
),
],
),
),