mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-05-12 11:12:19 -04:00
theming work, revamp contact invitation
This commit is contained in:
parent
3c95c9d1a3
commit
ae841ec42a
26 changed files with 504 additions and 507 deletions
|
@ -84,8 +84,9 @@ class _DrawerMenuState extends State<DrawerMenu> {
|
|||
hoverBorder = border;
|
||||
activeBorder = border;
|
||||
} else {
|
||||
background =
|
||||
selected ? scale.activeElementBackground : scale.elementBackground;
|
||||
background = selected
|
||||
? scale.elementBackground
|
||||
: scale.elementBackground.withAlpha(128);
|
||||
hoverBackground = scale.hoverElementBackground;
|
||||
activeBackground = scale.activeElementBackground;
|
||||
border = loggedIn ? scale.border : scale.subtleBorder;
|
||||
|
@ -132,9 +133,16 @@ class _DrawerMenuState extends State<DrawerMenu> {
|
|||
callback: callback,
|
||||
footerButtonIcon: loggedIn ? Icons.edit_outlined : null,
|
||||
footerCallback: footerCallback,
|
||||
footerButtonIconColor: border,
|
||||
footerButtonIconHoverColor: hoverBackground,
|
||||
footerButtonIconFocusColor: activeBackground,
|
||||
footerButtonIconColor:
|
||||
scaleConfig.preferBorders ? scale.border : scale.borderText,
|
||||
footerButtonIconHoverColor:
|
||||
(scaleConfig.preferBorders || scaleConfig.useVisualIndicators)
|
||||
? null
|
||||
: hoverBorder,
|
||||
footerButtonIconFocusColor:
|
||||
(scaleConfig.preferBorders || scaleConfig.useVisualIndicators)
|
||||
? null
|
||||
: activeBorder,
|
||||
minHeight: 48,
|
||||
));
|
||||
}
|
||||
|
|
|
@ -39,6 +39,8 @@ class MenuItemWidget extends StatelessWidget {
|
|||
}
|
||||
return backgroundColor;
|
||||
}),
|
||||
overlayColor:
|
||||
WidgetStateProperty.resolveWith((states) => backgroundHoverColor),
|
||||
side: WidgetStateBorderSide.resolveWith((states) {
|
||||
if (states.contains(WidgetState.hovered)) {
|
||||
return borderColor != null
|
||||
|
|
|
@ -89,7 +89,11 @@ class _HomeAccountReadyState extends State<HomeAccountReady> {
|
|||
)),
|
||||
tooltip: translate('menu.contacts_tooltip'),
|
||||
onPressed: () async {
|
||||
await ContactsDialog.show(context);
|
||||
await Navigator.of(context).push(
|
||||
MaterialPageRoute<void>(
|
||||
builder: (_) => const ContactsPage(),
|
||||
),
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -139,10 +143,7 @@ class _HomeAccountReadyState extends State<HomeAccountReady> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final isLarge = responsiveVisibility(
|
||||
context: context,
|
||||
phone: false,
|
||||
);
|
||||
final isSmallScreen = isMobileSize(context);
|
||||
|
||||
final theme = Theme.of(context);
|
||||
final scaleScheme = theme.extension<ScaleScheme>()!;
|
||||
|
@ -159,14 +160,7 @@ class _HomeAccountReadyState extends State<HomeAccountReady> {
|
|||
late final bool visibleRight;
|
||||
late final double leftWidth;
|
||||
late final double rightWidth;
|
||||
if (isLarge) {
|
||||
visibleLeft = true;
|
||||
visibleRight = true;
|
||||
leftWidth = leftColumnSize;
|
||||
rightWidth = constraints.maxWidth -
|
||||
leftColumnSize -
|
||||
(scaleConfig.useVisualIndicators ? 2 : 0);
|
||||
} else {
|
||||
if (isSmallScreen) {
|
||||
if (hasActiveChat) {
|
||||
visibleLeft = false;
|
||||
visibleRight = true;
|
||||
|
@ -178,6 +172,13 @@ class _HomeAccountReadyState extends State<HomeAccountReady> {
|
|||
leftWidth = constraints.maxWidth;
|
||||
rightWidth = 400; // whatever
|
||||
}
|
||||
} else {
|
||||
visibleLeft = true;
|
||||
visibleRight = true;
|
||||
leftWidth = leftColumnSize;
|
||||
rightWidth = constraints.maxWidth -
|
||||
leftColumnSize -
|
||||
(scaleConfig.useVisualIndicators ? 2 : 0);
|
||||
}
|
||||
|
||||
return Row(crossAxisAlignment: CrossAxisAlignment.stretch, children: [
|
||||
|
|
|
@ -136,15 +136,11 @@ class HomeScreenState extends State<HomeScreen>
|
|||
}
|
||||
|
||||
// Re-export all ready blocs to the account display subtree
|
||||
return perAccountCollectionState.provide(
|
||||
child: Navigator(
|
||||
onPopPage: (route, result) {
|
||||
if (!route.didPop(result)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
pages: const [MaterialPage(child: HomeAccountReady())]));
|
||||
final pages = <MaterialPage<void>>[
|
||||
const MaterialPage<void>(child: HomeAccountReady())
|
||||
];
|
||||
return perAccountCollectionState.provideReady(
|
||||
child: Navigator(onDidRemovePage: pages.remove, pages: pages));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue