custom font improvements
This commit is contained in:
@@ -119,6 +119,8 @@ extension SettingsLocalization on String {
|
||||
// grade streak
|
||||
"grade_streak": "Grade 5 Streak",
|
||||
"grade_streak_subtitle": "So many 5s in a row?!",
|
||||
// other
|
||||
"only_ch_title_font": "Font Only for Titles",
|
||||
},
|
||||
"hu_hu": {
|
||||
"personal_details": "Személyes információk",
|
||||
@@ -236,6 +238,8 @@ extension SettingsLocalization on String {
|
||||
// grade streak
|
||||
"grade_streak": "5-ös sorozat",
|
||||
"grade_streak_subtitle": "Egymás után ennyi 5-ös?!",
|
||||
// other
|
||||
"only_ch_title_font": "Betűtípus csak címekre",
|
||||
},
|
||||
"de_de": {
|
||||
"personal_details": "Persönliche Angaben",
|
||||
@@ -353,6 +357,8 @@ extension SettingsLocalization on String {
|
||||
// grade streak
|
||||
"grade_streak": "5er-Streak",
|
||||
"grade_streak_subtitle": "So viele 5er in Folge?!",
|
||||
// other
|
||||
"only_ch_title_font": "Schriftart nur für Titel",
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -890,7 +890,7 @@ class PersonalizeSettingsScreenState extends State<PersonalizeSettingsScreen>
|
||||
title: Text('fonts'.i18n),
|
||||
padding: EdgeInsets.zero,
|
||||
cardPadding: const EdgeInsets.all(4.0),
|
||||
isSeparated: true,
|
||||
isSeparated: false,
|
||||
children: [
|
||||
PanelButton(
|
||||
onPressed: () {
|
||||
@@ -928,6 +928,63 @@ class PersonalizeSettingsScreenState extends State<PersonalizeSettingsScreen>
|
||||
),
|
||||
borderRadius: const BorderRadius.vertical(
|
||||
top: Radius.circular(12.0),
|
||||
bottom: Radius.circular(6.0),
|
||||
),
|
||||
),
|
||||
PanelButton(
|
||||
padding: const EdgeInsets.only(left: 14.0, right: 6.0),
|
||||
onPressed: () async {
|
||||
if (!Provider.of<PlusProvider>(context, listen: false)
|
||||
.hasScope(PremiumScopes.customFont)) {
|
||||
PlusLockedFeaturePopup.show(
|
||||
context: context,
|
||||
feature: PremiumFeature.fontChange);
|
||||
return;
|
||||
}
|
||||
|
||||
settingsProvider.update(
|
||||
titleOnlyFont: !settingsProvider.titleOnlyFont);
|
||||
Provider.of<ThemeModeObserver>(context, listen: false)
|
||||
.changeTheme(settingsProvider.theme,
|
||||
updateNavbarColor: false);
|
||||
setState(() {});
|
||||
},
|
||||
title: Text(
|
||||
"only_ch_title_font".i18n,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text.withOpacity(
|
||||
settingsProvider.titleOnlyFont ? .95 : .25),
|
||||
),
|
||||
),
|
||||
leading: Icon(
|
||||
Icons.text_increase_rounded,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(
|
||||
settingsProvider.titleOnlyFont ? .95 : .25),
|
||||
),
|
||||
trailing: Switch(
|
||||
onChanged: (v) async {
|
||||
if (!Provider.of<PlusProvider>(context,
|
||||
listen: false)
|
||||
.hasScope(PremiumScopes.customFont)) {
|
||||
PlusLockedFeaturePopup.show(
|
||||
context: context,
|
||||
feature: PremiumFeature.fontChange);
|
||||
return;
|
||||
}
|
||||
|
||||
settingsProvider.update(titleOnlyFont: v);
|
||||
Provider.of<ThemeModeObserver>(context,
|
||||
listen: false)
|
||||
.changeTheme(settingsProvider.theme,
|
||||
updateNavbarColor: false);
|
||||
setState(() {});
|
||||
},
|
||||
value: settingsProvider.titleOnlyFont,
|
||||
activeColor: Theme.of(context).colorScheme.secondary,
|
||||
),
|
||||
borderRadius: const BorderRadius.vertical(
|
||||
top: Radius.circular(4.0),
|
||||
bottom: Radius.circular(12.0),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user