Skip to content

Commit

Permalink
wip switch size
Browse files Browse the repository at this point in the history
Signed-off-by: Zixuan James Li <[email protected]>
  • Loading branch information
PIG208 committed Jan 22, 2025
1 parent da14640 commit c94352a
Showing 1 changed file with 25 additions and 9 deletions.
34 changes: 25 additions & 9 deletions lib/widgets/settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,31 @@ class SettingsPage extends StatelessWidget {
child: SafeArea(
minimum: const EdgeInsets.only(bottom: 8),
child: Column(children: [
SwitchListTile(
title: Text(zulipLocalizations.settingsUseExternal),
value: globalStore.globalSettings.effectiveBrowserPreference == BrowserPreference.external,
onChanged: (useExternal) {
globalStore.updateGlobalSettings(GlobalSettingsCompanion(
browserPreference: Value(
useExternal ? BrowserPreference.external
: BrowserPreference.embedded)));
}),
ListTileTheme(
data: const ListTileThemeData(
contentPadding: EdgeInsets.symmetric(horizontal: 16),
dense: true,
minVerticalPadding: 0,
minTileHeight: 38,

horizontalTitleGap: 0,
minLeadingWidth: 38,
),
child: SwitchListTile(
title: Text(zulipLocalizations.settingsUseExternal,
style: const TextStyle(
fontSize: 17,
height: 26 / 17,
),
),
value: globalStore.globalSettings.effectiveBrowserPreference == BrowserPreference.external,
onChanged: (useExternal) {
globalStore.updateGlobalSettings(GlobalSettingsCompanion(
browserPreference: Value(
useExternal ? BrowserPreference.external
: BrowserPreference.embedded)));
}),
),
Theme(
data: themeData.copyWith(splashColor: Colors.transparent),
child: _ThemeSetting(initialValue: globalStore.globalSettings.themeSetting)),
Expand Down

0 comments on commit c94352a

Please sign in to comment.