From daffcf4b65e82b918dbc3d96e907e7b2342a1c32 Mon Sep 17 00:00:00 2001 From: Mati Date: Fri, 6 Oct 2023 17:40:18 -0300 Subject: [PATCH] feat(details widget): colors PE-4711 --- lib/components/details_panel.dart | 38 +++++++++++++++------ lib/pages/shared_file/shared_file_page.dart | 36 ++++++++++--------- 2 files changed, 48 insertions(+), 26 deletions(-) diff --git a/lib/components/details_panel.dart b/lib/components/details_panel.dart index 12e412d4af..c5342fe479 100644 --- a/lib/components/details_panel.dart +++ b/lib/components/details_panel.dart @@ -215,10 +215,15 @@ class _DetailsPanelState extends State { AppPlatform.isMobile || AppPlatform.isMobileWeb() ? 0 : null, - backgroundColor: ArDriveTheme.of(context) - .themeData - .tableTheme - .backgroundColor, + backgroundColor: mobileView + ? ArDriveTheme.of(context) + .themeData + .tableTheme + .backgroundColor + : ArDriveTheme.of(context) + .themeData + .colors + .themeBgSurface, contentPadding: widget.isSharePage ? const EdgeInsets.only() : const EdgeInsets.all(24), @@ -238,8 +243,9 @@ class _DetailsPanelState extends State { child: ArDriveCard( borderRadius: AppPlatform.isMobile || AppPlatform.isMobileWeb() ? 0 : null, - backgroundColor: - ArDriveTheme.of(context).themeData.tableTheme.backgroundColor, + backgroundColor: widget.isSharePage + ? ArDriveTheme.of(context).themeData.tableTheme.cellColor + : ArDriveTheme.of(context).themeData.tableTheme.backgroundColor, contentPadding: const EdgeInsets.all(24), content: Column( children: [ @@ -257,7 +263,7 @@ class _DetailsPanelState extends State { ), mobile: (context) => const SizedBox.shrink(), ), - if (mobileView && widget.isSharePage) + if (widget.isSharePage) SizedBox( height: 64, child: Column( @@ -275,7 +281,7 @@ class _DetailsPanelState extends State { ), ), if (previewState is FsEntryPreviewSuccess && - !(widget.isSharePage && mobileView)) + !(widget.isSharePage)) ArDriveCard( contentPadding: const EdgeInsets.all(24), backgroundColor: ArDriveTheme.of(context) @@ -305,7 +311,7 @@ class _DetailsPanelState extends State { size: 32, ), }, - if (widget.currentDrive != null && !widget.isSharePage) + if (widget.currentDrive != null) ScreenTypeLayout.builder( desktop: (context) => const SizedBox.shrink(), mobile: (context) => EntityActionsMenu( @@ -332,11 +338,23 @@ class _DetailsPanelState extends State { child: ArDriveTabView( key: Key(widget.item.id + tabs.length.toString()), tabs: tabs, + backgroundColor: ArDriveTheme.of(context) + .themeData + .colors + .themeBgSurface, + unselectedTabColor: ArDriveTheme.of(context) + .themeData + .colors + .themeBgSurface, + unselectedLabelColor: ArDriveTheme.of(context) + .themeData + .colors + .themeFgDefault, ), ), if (widget.isSharePage) SizedBox( - height: mobileView ? 138 : 138, + height: 138, child: Column( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ diff --git a/lib/pages/shared_file/shared_file_page.dart b/lib/pages/shared_file/shared_file_page.dart index 68846d7802..9ac8fb5617 100644 --- a/lib/pages/shared_file/shared_file_page.dart +++ b/lib/pages/shared_file/shared_file_page.dart @@ -196,22 +196,26 @@ class SharedFilePage extends StatelessWidget { } return ScreenTypeLayout.builder( - desktop: (context) => Padding( - padding: const EdgeInsets.all(24.0), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - if (state is SharedFileLoadSuccess) ...{ - Flexible( - flex: 1, - child: activityPanel(state), - ) - } else ...{ - const CircularProgressIndicator( - strokeWidth: 8, - ), - } - ], + desktop: (context) => Container( + color: + ArDriveTheme.of(context).themeData.tableTheme.backgroundColor, + child: Padding( + padding: const EdgeInsets.all(24.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + if (state is SharedFileLoadSuccess) ...{ + Flexible( + flex: 1, + child: activityPanel(state), + ) + } else ...{ + const CircularProgressIndicator( + strokeWidth: 8, + ), + } + ], + ), ), ), mobile: (context) => SingleChildScrollView(