refactor: Remove bubble size slider
This commit is contained in:
parent
d6b48091c4
commit
6bd518fa36
7 changed files with 18 additions and 46 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue