Merge pull request #454 from DenserMeerkat/resolve-issue-mobile

Fix UI inconsistencies in mobile
This commit is contained in:
Ashita Prasad
2024-08-25 21:30:06 +05:30
committed by GitHub
5 changed files with 42 additions and 39 deletions

View File

@ -29,7 +29,6 @@ class NavbarButton extends ConsumerWidget {
final mobileScaffoldKeyNotifier =
ref.watch(mobileScaffoldKeyStateProvider.notifier);
final bool isSelected = railIdx == buttonIdx;
final Size size = isCompact ? const Size(56, 32) : const Size(65, 32);
var onPress = isSelected
? null
: () {
@ -49,15 +48,14 @@ class NavbarButton extends ConsumerWidget {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
TextButton(
style: isSelected
? TextButton.styleFrom(
fixedSize: size,
backgroundColor:
Theme.of(context).colorScheme.secondaryContainer,
)
: TextButton.styleFrom(
fixedSize: size,
SizedBox(
height: isCompact ? 36 : 36,
child: TextButton(
style: TextButton.styleFrom(
padding: EdgeInsets.zero,
backgroundColor: isSelected
? Theme.of(context).colorScheme.secondaryContainer
: null,
),
onPressed: onPress,
child: Icon(
@ -65,6 +63,7 @@ class NavbarButton extends ConsumerWidget {
color: Theme.of(context).colorScheme.onSurfaceVariant,
),
),
),
showLabel ? const SizedBox(height: 4) : const SizedBox.shrink(),
showLabel
? Text(

View File

@ -106,6 +106,9 @@ class EnvironmentTriggerFieldState extends State<EnvironmentTriggerField> {
onChanged: widget.onChanged,
onSubmitted: widget.onFieldSubmitted,
specialTextSpanBuilder: EnvRegExpSpanBuilder(),
onTapOutside: (event) {
focusNode.unfocus();
},
);
},
);

View File

@ -129,14 +129,9 @@ class Grabber extends StatelessWidget {
@override
Widget build(BuildContext context) {
if (!isOnDesktopAndWeb) {
return const SizedBox.shrink();
}
final ColorScheme colorScheme = Theme.of(context).colorScheme;
return GestureDetector(
onVerticalDragUpdate: onVerticalDragUpdate,
child: Container(
final handle = Container(
width: double.infinity,
decoration: BoxDecoration(
color: colorScheme.surfaceContainerLow,
@ -155,7 +150,13 @@ class Grabber extends StatelessWidget {
),
),
),
),
);
if (!isOnDesktopAndWeb) {
return handle;
}
return GestureDetector(
onVerticalDragUpdate: onVerticalDragUpdate,
child: handle,
);
}
}

View File

@ -21,7 +21,7 @@ class HistoryURLCard extends StatelessWidget {
return LayoutBuilder(builder: (context, constraints) {
final isCompact = constraints.maxWidth <= kMinWindowSize.width;
final isExpanded = constraints.maxWidth >= kMediumWindowWidth;
final isExpanded = constraints.maxWidth >= kMediumWindowWidth - 8;
return Card(
color: kColorTransparent,
surfaceTintColor: kColorTransparent,

View File

@ -37,7 +37,7 @@ class FilledButtonGroup extends StatelessWidget {
}
}
return ClipRRect(
borderRadius: kBorderRadius20,
borderRadius: BorderRadius.circular(88),
child: Row(
mainAxisSize: MainAxisSize.min,
children: buttonsWithSpacers,