Fixed bugs in font changes
This commit is contained in:
parent
6c55a79d2d
commit
5bd556e691
|
|
@ -31,8 +31,8 @@ class GeneralSettings extends StatefulWidget {
|
|||
}
|
||||
|
||||
class _GeneralSettingsState extends State<GeneralSettings> {
|
||||
String get _fontScaleSuffix {
|
||||
final fontScale = DesignConfig.fontScale;
|
||||
String fontScaleSuffix(double fontSizeScale) {
|
||||
final fontScale = fontSizeScale;
|
||||
if (fontScale == 1) return 'متوسط';
|
||||
if (fontScale == 1.15) return 'بزرگ';
|
||||
return 'کوچک';
|
||||
|
|
@ -70,15 +70,14 @@ class _GeneralSettingsState extends State<GeneralSettings> {
|
|||
child: Column(
|
||||
children: [
|
||||
MenuOption(
|
||||
suffix: DesignConfig.fontFamily == 'Dana-FA'
|
||||
? 'دانا'
|
||||
: 'ایران سنس',
|
||||
suffix:
|
||||
state.fontFamily == 'Dana-FA' ? 'دانا' : 'ایران سنس',
|
||||
title: 'فونت برنامه',
|
||||
onTap: _showFontFamilyBottomSheet,
|
||||
),
|
||||
const DidvanDivider(),
|
||||
MenuOption(
|
||||
suffix: _fontScaleSuffix,
|
||||
suffix: fontScaleSuffix(state.fontSizeScale),
|
||||
title: 'اندازه متن',
|
||||
onTap: _showFontScaleBottomSheet,
|
||||
),
|
||||
|
|
|
|||
Loading…
Reference in New Issue