Maintain vertical keyline alignment

This commit is contained in:
Elias Bonnici 2024-08-09 10:21:08 +02:00
parent ea665b3299
commit 1f9bb4954a
No known key found for this signature in database
GPG Key ID: 5EAC28EA3F980CCF
7 changed files with 48 additions and 37 deletions

View File

@ -415,7 +415,7 @@ class _AppPageState extends ConsumerState<AppPage> {
alignment: Alignment.topLeft,
child: Padding(
padding: const EdgeInsets.only(
left: 16.0, right: 16.0, bottom: 24.0, top: 4.0),
left: 16.0, right: 8.0, bottom: 24.0, top: 4.0),
child: _buildTitle(context),
),
),
@ -468,7 +468,7 @@ class _AppPageState extends ConsumerState<AppPage> {
child: Padding(
key: _sliverTitleWrapperGlobalKey,
padding: const EdgeInsets.only(
left: 16.0, right: 16.0, bottom: 12.0, top: 4.0),
left: 16.0, right: 8.0, bottom: 12.0, top: 4.0),
child: _buildTitle(context),
),
),

View File

@ -332,7 +332,7 @@ class _FidoUnlockedPageState extends ConsumerState<_FidoUnlockedPage> {
}
},
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
padding: const EdgeInsets.symmetric(horizontal: 8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: fingerprints

View File

@ -385,7 +385,7 @@ class _FidoUnlockedPageState extends ConsumerState<_FidoUnlockedPage> {
final layout = ref.watch(passkeysLayoutProvider);
return Padding(
padding: const EdgeInsets.symmetric(
horizontal: 16.0, vertical: 8.0),
horizontal: 8.0, vertical: 8.0),
child: AppTextFormField(
key: searchField,
controller: searchController,
@ -532,7 +532,7 @@ class _FidoUnlockedPageState extends ConsumerState<_FidoUnlockedPage> {
builder: (context, ref, child) {
final layout = ref.watch(passkeysLayoutProvider);
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
padding: const EdgeInsets.symmetric(horizontal: 8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [

View File

@ -60,47 +60,57 @@ class AccountList extends ConsumerWidget {
return FocusTraversalGroup(
policy: WidgetOrderTraversalPolicy(),
child: Padding(
padding: const EdgeInsets.only(top: 8.0, left: 16, right: 16),
padding: const EdgeInsets.only(top: 8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (pinnedCreds.isNotEmpty) ...[
Text(l10n.s_pinned, style: labelStyle),
const SizedBox(height: 8),
FlexBox<OathPair>(
items: pinnedCreds.toList(),
itemBuilder: (value) => AccountView(
value.credential,
expanded: expanded,
selected: value.credential == selected,
large: pinnedLayout == FlexLayout.grid,
Padding(
padding: const EdgeInsets.only(left: 16, bottom: 8),
child: Text(l10n.s_pinned, style: labelStyle),
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 8.0),
child: FlexBox<OathPair>(
items: pinnedCreds.toList(),
itemBuilder: (value) => AccountView(
value.credential,
expanded: expanded,
selected: value.credential == selected,
large: pinnedLayout == FlexLayout.grid,
),
cellMinWidth: 250,
spacing: pinnedLayout == FlexLayout.grid ? 4.0 : 0.0,
runSpacing: pinnedLayout == FlexLayout.grid ? 4.0 : 0.0,
layout: pinnedLayout,
),
cellMinWidth: 250,
spacing: pinnedLayout == FlexLayout.grid ? 4.0 : 0.0,
runSpacing: pinnedLayout == FlexLayout.grid ? 4.0 : 0.0,
layout: pinnedLayout,
),
],
if (pinnedCreds.isNotEmpty && creds.isNotEmpty) ...[
const SizedBox(height: 24),
Text(
l10n.s_accounts,
style: labelStyle,
Padding(
padding: const EdgeInsets.only(left: 16, bottom: 8),
child: Text(
l10n.s_accounts,
style: labelStyle,
),
),
const SizedBox(height: 8),
],
FlexBox<OathPair>(
items: creds.toList(),
itemBuilder: (value) => AccountView(
value.credential,
expanded: expanded,
selected: value.credential == selected,
large: normalLayout == FlexLayout.grid,
Padding(
padding: const EdgeInsets.symmetric(horizontal: 8.0),
child: FlexBox<OathPair>(
items: creds.toList(),
itemBuilder: (value) => AccountView(
value.credential,
expanded: expanded,
selected: value.credential == selected,
large: normalLayout == FlexLayout.grid,
),
cellMinWidth: 250,
spacing: normalLayout == FlexLayout.grid ? 4.0 : 0.0,
runSpacing: normalLayout == FlexLayout.grid ? 4.0 : 0.0,
layout: normalLayout,
),
cellMinWidth: 250,
spacing: normalLayout == FlexLayout.grid ? 4.0 : 0.0,
runSpacing: normalLayout == FlexLayout.grid ? 4.0 : 0.0,
layout: normalLayout,
),
],
),

View File

@ -411,7 +411,7 @@ class _UnlockedViewState extends ConsumerState<_UnlockedView> {
return Padding(
padding: const EdgeInsets.symmetric(
horizontal: 16.0, vertical: 8.0),
horizontal: 8.0, vertical: 8.0),
child: AppTextFormField(
key: searchField,
controller: searchController,

View File

@ -181,7 +181,8 @@ class _OtpScreenState extends ConsumerState<OtpScreen> {
}),
},
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
padding:
const EdgeInsets.symmetric(horizontal: 8.0),
child: Column(children: [
...otpState.slots.map((e) => _SlotListItem(
e,

View File

@ -201,7 +201,7 @@ class _PivScreenState extends ConsumerState<PivScreen> {
}),
},
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
padding: const EdgeInsets.symmetric(horizontal: 8.0),
child: Column(
children: [
...normalSlots.map(