Remove layout divider

This commit is contained in:
Elias Bonnici 2024-07-04 13:58:13 +02:00
parent e846b9c301
commit 75c167dea3
No known key found for this signature in database
GPG Key ID: 5EAC28EA3F980CCF
3 changed files with 7 additions and 38 deletions

View File

@ -428,23 +428,7 @@ class _FidoUnlockedPageState extends ConsumerState<_FidoUnlockedPage> {
), ),
if (searchController.text.isEmpty && if (searchController.text.isEmpty &&
!searchFocus.hasFocus && !searchFocus.hasFocus &&
showLayoutOptions) ...[ showLayoutOptions)
Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Padding(
// need this to maintain consistent distance
// between icons
padding: const EdgeInsets.only(left: 17.0),
child: Container(
color: Theme.of(context).colorScheme.surface,
width: 1,
height: 45,
),
),
],
),
...FlexLayout.values.map( ...FlexLayout.values.map(
(e) => MouseRegion( (e) => MouseRegion(
onEnter: (event) { onEnter: (event) {
@ -475,7 +459,6 @@ class _FidoUnlockedPageState extends ConsumerState<_FidoUnlockedPage> {
), ),
), ),
), ),
]
], ],
), ),
onChanged: (value) { onChanged: (value) {

View File

@ -454,23 +454,7 @@ class _UnlockedViewState extends ConsumerState<_UnlockedView> {
), ),
if (searchController.text.isEmpty && if (searchController.text.isEmpty &&
!searchFocus.hasFocus) ...[ !searchFocus.hasFocus) ...[
Row( if (width >= 450)
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Padding(
// need this to maintain consistent distance
// between icons
padding: const EdgeInsets.only(left: 17.0),
child: Container(
color: Theme.of(context).colorScheme.surface,
width: 1,
height: 45,
),
),
],
),
if (width >= 380)
...availableLayouts.map( ...availableLayouts.map(
(e) => MouseRegion( (e) => MouseRegion(
onEnter: (event) { onEnter: (event) {
@ -497,11 +481,12 @@ class _UnlockedViewState extends ConsumerState<_UnlockedView> {
color: e == oathLayout color: e == oathLayout
? Theme.of(context).colorScheme.primary ? Theme.of(context).colorScheme.primary
: null, : null,
fill: e == oathLayout ? 1 : 0,
), ),
), ),
), ),
), ),
if (width < 380) if (width < 450)
MouseRegion( MouseRegion(
onEnter: (event) { onEnter: (event) {
if (!searchFocus.hasFocus) { if (!searchFocus.hasFocus) {
@ -523,6 +508,7 @@ class _UnlockedViewState extends ConsumerState<_UnlockedView> {
icon: Icon( icon: Icon(
oathLayout._icon, oathLayout._icon,
color: Theme.of(context).colorScheme.primary, color: Theme.of(context).colorScheme.primary,
fill: 1,
), ),
itemBuilder: (context) => [ itemBuilder: (context) => [
...availableLayouts.map( ...availableLayouts.map(

View File

@ -3,8 +3,8 @@ import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:material_symbols_icons/symbols.dart'; import 'package:material_symbols_icons/symbols.dart';
enum FlexLayout { enum FlexLayout {
grid, list,
list; grid;
IconData get icon => switch (this) { IconData get icon => switch (this) {
FlexLayout.list => Symbols.list, FlexLayout.list => Symbols.list,