Add padding for progress bar in Preferences

Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
dab246
2025-07-03 11:06:38 +07:00
committed by Dat H. Pham
parent 718f1fe130
commit c1938ce31b
3 changed files with 23 additions and 6 deletions
@@ -124,6 +124,20 @@ class SettingsUtils {
}
}
static EdgeInsetsGeometry getSettingProgressBarPadding(
BuildContext context,
ResponsiveUtils responsiveUtils,
) {
if (responsiveUtils.isWebDesktop(context)) {
return const EdgeInsetsDirectional.only(end: 16, top: 16);
} else if (responsiveUtils.isTablet(context) ||
responsiveUtils.isTabletLarge(context)) {
return const EdgeInsetsDirectional.only(start: 32, end: 32, top: 16);
} else {
return const EdgeInsetsDirectional.only(start: 16, end: 16, top: 16);
}
}
static EdgeInsetsGeometry? getMarginSettingDetailsView(
BuildContext context,
ResponsiveUtils responsiveUtils,
@@ -21,9 +21,10 @@ class PreferencesView extends GetWidget<PreferencesController> with AppLoaderMix
return const SizedBox.shrink();
}
return Padding(
padding: controller.responsiveUtils.isTablet(context)
? const EdgeInsetsDirectional.only(start: 32, end: 32, top: 16)
: const EdgeInsetsDirectional.only(start: 16, end: 16, top: 16),
padding: SettingsUtils.getSettingProgressBarPadding(
context,
controller.responsiveUtils,
),
child: horizontalLoadingWidget,
);
}),
@@ -43,7 +44,9 @@ class PreferencesView extends GetWidget<PreferencesController> with AppLoaderMix
controller.responsiveUtils,
),
width: double.infinity,
padding: const EdgeInsets.symmetric(vertical: 30, horizontal: 22),
padding: controller.responsiveUtils.isDesktop(context)
? const EdgeInsets.symmetric(vertical: 30, horizontal: 22)
: null,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@@ -70,7 +73,7 @@ class PreferencesView extends GetWidget<PreferencesController> with AppLoaderMix
onTapSettingOptionAction: controller.updateStateSettingOption,
);
},
separatorBuilder: (_, __) => const SizedBox(height: 60),
separatorBuilder: (_, __) => const SizedBox(height: 49),
),
);
}),
@@ -42,7 +42,7 @@ class SettingOptionItem extends StatelessWidget {
),
),
Padding(
padding: const EdgeInsets.symmetric(vertical: 8),
padding: const EdgeInsets.symmetric(vertical: 12),
child: Text(
optionType.getExplanation(appLocalizations),
style: ThemeUtils.textStyleInter400.copyWith(