refactor: Remove bubble size slider

This commit is contained in:
Krille 2023-08-11 13:33:16 +02:00
commit 6bd518fa36
No known key found for this signature in database
7 changed files with 18 additions and 46 deletions

View file

@ -79,14 +79,6 @@ class SettingsStyleController extends State<SettingsStyle> {
);
}
void changeBubbleSizeFactor(double d) {
setState(() => AppConfig.bubbleSizeFactor = d);
Matrix.of(context).store.setItem(
SettingKeys.bubbleSizeFactor,
AppConfig.bubbleSizeFactor.toString(),
);
}
@override
Widget build(BuildContext context) => SettingsStyleView(this);
}

View file

@ -149,9 +149,9 @@ class SettingsStyleView extends StatelessWidget {
color: Theme.of(context).colorScheme.primaryContainer,
borderRadius: BorderRadius.circular(AppConfig.borderRadius),
child: Padding(
padding: EdgeInsets.symmetric(
horizontal: 16 * AppConfig.bubbleSizeFactor,
vertical: 8 * AppConfig.bubbleSizeFactor,
padding: const EdgeInsets.symmetric(
horizontal: 16,
vertical: 8,
),
child: Text(
'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor',
@ -176,18 +176,6 @@ class SettingsStyleView extends StatelessWidget {
semanticFormatterCallback: (d) => d.toString(),
onChanged: controller.changeFontSizeFactor,
),
ListTile(
title: Text(L10n.of(context)!.bubbleSize),
trailing: Text('× ${AppConfig.bubbleSizeFactor}'),
),
Slider.adaptive(
min: 0.5,
max: 1.5,
divisions: 4,
value: AppConfig.bubbleSizeFactor,
semanticFormatterCallback: (d) => d.toString(),
onChanged: controller.changeBubbleSizeFactor,
),
],
),
),