mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: removed the parent padding and instead applied padding individually. (#3814)
* fix: Removed the parent padding and instead applied individual padding to each child to ensure it doesn't affect the sidebar divider. * chore: Addressed comments and made changes
This commit is contained in:
parent
e28e5a0649
commit
197da5f425
@ -87,6 +87,7 @@ class HomeSideBar extends StatelessWidget {
|
||||
List<ViewPB> views,
|
||||
List<ViewPB> favoriteViews,
|
||||
) {
|
||||
const menuHorizontalInset = EdgeInsets.symmetric(horizontal: 12);
|
||||
return DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.surfaceVariant,
|
||||
@ -94,19 +95,25 @@ class HomeSideBar extends StatelessWidget {
|
||||
right: BorderSide(color: Theme.of(context).dividerColor),
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
// top menu
|
||||
const SidebarTopMenu(),
|
||||
// user, setting
|
||||
SidebarUser(user: user, views: views),
|
||||
const VSpace(20),
|
||||
// scrollable document list
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
// top menu
|
||||
const Padding(
|
||||
padding: menuHorizontalInset,
|
||||
child: SidebarTopMenu(),
|
||||
),
|
||||
// user, setting
|
||||
Padding(
|
||||
padding: menuHorizontalInset,
|
||||
child: SidebarUser(user: user, views: views),
|
||||
),
|
||||
const VSpace(20),
|
||||
// scrollable document list
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: menuHorizontalInset,
|
||||
child: SingleChildScrollView(
|
||||
child: SidebarFolder(
|
||||
views: views,
|
||||
@ -114,17 +121,17 @@ class HomeSideBar extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
const VSpace(10),
|
||||
// trash
|
||||
const SidebarTrashButton(),
|
||||
const VSpace(10),
|
||||
// new page button
|
||||
const Padding(
|
||||
padding: EdgeInsets.only(left: 6.0),
|
||||
child: SidebarNewPageButton(),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const VSpace(10),
|
||||
// trash
|
||||
const Padding(
|
||||
padding: menuHorizontalInset,
|
||||
child: SidebarTrashButton(),
|
||||
),
|
||||
const VSpace(10),
|
||||
// new page button
|
||||
const SidebarNewPageButton(),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@ -48,7 +48,10 @@ class SidebarNewPageButton extends StatelessWidget {
|
||||
height: 60,
|
||||
child: TopBorder(
|
||||
color: Theme.of(context).dividerColor,
|
||||
child: child,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 18),
|
||||
child: child,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user