mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-08-03 03:36:23 -04:00
More UI Cleanup
This commit is contained in:
parent
3b1cb53b8a
commit
68e8d7fd39
17 changed files with 281 additions and 301 deletions
|
@ -13,7 +13,7 @@ class DefaultAppBar extends AppBar {
|
|||
Widget? leading,
|
||||
super.actions})
|
||||
: super(
|
||||
toolbarHeight: 40.scaled(context),
|
||||
toolbarHeight: 48.scaled(context),
|
||||
leadingWidth: 40.scaled(context),
|
||||
leading: leading ??
|
||||
Container(
|
||||
|
|
|
@ -31,9 +31,9 @@ class _HomeAccountReadyState extends State<HomeAccountReady> {
|
|||
return AspectRatio(
|
||||
aspectRatio: 1,
|
||||
child: IconButton(
|
||||
icon: const Icon(
|
||||
icon: Icon(
|
||||
size: 32.scaled(context),
|
||||
Icons.menu,
|
||||
applyTextScaling: true,
|
||||
),
|
||||
color: scaleConfig.preferBorders
|
||||
? scale.primaryScale.border
|
||||
|
@ -70,9 +70,9 @@ class _HomeAccountReadyState extends State<HomeAccountReady> {
|
|||
return AspectRatio(
|
||||
aspectRatio: 1,
|
||||
child: IconButton(
|
||||
icon: const Icon(
|
||||
icon: Icon(
|
||||
size: 32.scaled(context),
|
||||
Icons.contacts,
|
||||
applyTextScaling: true,
|
||||
),
|
||||
color: scaleConfig.preferBorders
|
||||
? scale.primaryScale.border
|
||||
|
|
|
@ -5,7 +5,6 @@ import 'package:flutter/gestures.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_translate/flutter_translate.dart';
|
||||
import 'package:flutter_zoom_drawer/flutter_zoom_drawer.dart';
|
||||
import 'package:keyboard_avoider/keyboard_avoider.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:transitioned_indexed_stack/transitioned_indexed_stack.dart';
|
||||
import 'package:url_launcher/url_launcher_string.dart';
|
||||
|
@ -207,36 +206,34 @@ class HomeScreenState extends State<HomeScreen>
|
|||
.indexWhere((x) => x.superIdentity.recordKey == activeLocalAccount);
|
||||
final canClose = activeIndex != -1;
|
||||
|
||||
final drawer = ZoomDrawer(
|
||||
controller: _zoomDrawerController,
|
||||
menuScreen: Builder(builder: (context) {
|
||||
final zoomDrawer = ZoomDrawer.of(context);
|
||||
zoomDrawer!.stateNotifier.addListener(() {
|
||||
if (zoomDrawer.isOpen()) {
|
||||
FocusManager.instance.primaryFocus?.unfocus();
|
||||
}
|
||||
});
|
||||
return const DrawerMenu();
|
||||
}),
|
||||
mainScreen: Provider<ZoomDrawerController>.value(
|
||||
value: _zoomDrawerController,
|
||||
child: Builder(builder: _buildAccountPageView)),
|
||||
borderRadius: 0,
|
||||
angle: 0,
|
||||
openCurve: Curves.fastEaseInToSlowEaseOut,
|
||||
closeCurve: Curves.fastEaseInToSlowEaseOut,
|
||||
menuScreenTapClose: canClose,
|
||||
mainScreenTapClose: canClose,
|
||||
disableDragGesture: !canClose,
|
||||
mainScreenScale: .25,
|
||||
slideWidth: min(360, MediaQuery.of(context).size.width * 0.9),
|
||||
);
|
||||
final drawer = Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
body: ZoomDrawer(
|
||||
controller: _zoomDrawerController,
|
||||
menuScreen: Builder(builder: (context) {
|
||||
final zoomDrawer = ZoomDrawer.of(context);
|
||||
zoomDrawer!.stateNotifier.addListener(() {
|
||||
if (zoomDrawer.isOpen()) {
|
||||
FocusManager.instance.primaryFocus?.unfocus();
|
||||
}
|
||||
});
|
||||
return const DrawerMenu();
|
||||
}),
|
||||
mainScreen: Provider<ZoomDrawerController>.value(
|
||||
value: _zoomDrawerController,
|
||||
child: Builder(builder: _buildAccountPageView)),
|
||||
borderRadius: 0,
|
||||
angle: 0,
|
||||
openCurve: Curves.fastEaseInToSlowEaseOut,
|
||||
closeCurve: Curves.fastEaseInToSlowEaseOut,
|
||||
menuScreenTapClose: canClose,
|
||||
mainScreenTapClose: canClose,
|
||||
disableDragGesture: !canClose,
|
||||
mainScreenScale: .25,
|
||||
slideWidth: min(360, MediaQuery.of(context).size.width * 0.9),
|
||||
));
|
||||
|
||||
final drawerWithAvoider =
|
||||
isWeb ? drawer : KeyboardAvoider(curve: Curves.ease, child: drawer);
|
||||
|
||||
return DefaultTextStyle(
|
||||
style: theme.textTheme.bodySmall!, child: drawerWithAvoider);
|
||||
return DefaultTextStyle(style: theme.textTheme.bodySmall!, child: drawer);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue