mirror of
https://github.com/ImranR98/Obtainium.git
synced 2026-08-02 02:17:21 -04:00
Align settings page with add app page styling
- SettingsToggleRow contentPadding: 16 -> 20 (matches add app tileMode) - SettingsTile: borderRadius -> RoundedSuperellipseBorder shape (matches add app) - SettingsToggleRow: RoundedRectangleBorder -> RoundedSuperellipseBorder - Add app _FormSwitchRow: add haptic feedback via selectionClick() (respects tactileFeedbackEnabled pref, matches settings page)
This commit is contained in:
@@ -151,7 +151,15 @@ class _FormSwitchRow extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Switch(value: value, onChanged: item.disabled ? null : onChanged),
|
||||
Switch(
|
||||
value: value,
|
||||
onChanged: item.disabled
|
||||
? null
|
||||
: (v) {
|
||||
context.read<SettingsProvider>().selectionClick();
|
||||
onChanged?.call(v);
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ class SettingsTile extends StatelessWidget {
|
||||
borderRadius ?? BorderRadius.circular(connectedTileBigRadius);
|
||||
return Material(
|
||||
color: color ?? Theme.of(context).colorScheme.surfaceContainerLow,
|
||||
borderRadius: effectiveRadius,
|
||||
shape: RoundedSuperellipseBorder(borderRadius: effectiveRadius),
|
||||
clipBehavior: Clip.antiAlias,
|
||||
child: Padding(padding: padding, child: child),
|
||||
);
|
||||
@@ -107,13 +107,13 @@ class SettingsToggleRow extends StatelessWidget {
|
||||
onChanged!(v);
|
||||
};
|
||||
final tileShape = borderRadius != null
|
||||
? RoundedRectangleBorder(borderRadius: borderRadius!)
|
||||
? RoundedSuperellipseBorder(borderRadius: borderRadius!)
|
||||
: null;
|
||||
return SettingsTile(
|
||||
padding: EdgeInsets.zero,
|
||||
borderRadius: borderRadius,
|
||||
child: ListTile(
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: 20),
|
||||
shape: tileShape,
|
||||
title: Text(label),
|
||||
subtitle: subtitle,
|
||||
|
||||
Reference in New Issue
Block a user