Merge pull request from thisisamank/main

This commit is contained in:
Nathan.fooo 2022-07-30 11:49:30 +08:00 committed by GitHub
commit fde2538466
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 30 additions and 3 deletions
frontend/app_flowy
.gitignore
lib/workspace/presentation/plugins/grid/src

View File

@ -64,4 +64,5 @@ windows/flutter/dart_ffi/
**/**/*.dll
**/**/*.so
**/**/Brewfile.lock.json
**/.sandbox
**/.sandbox
**/.vscode/

View File

@ -1,9 +1,11 @@
import 'package:app_flowy/startup/startup.dart';
import 'package:app_flowy/workspace/application/grid/grid_bloc.dart';
import 'package:app_flowy/workspace/application/grid/row/row_service.dart';
import 'package:flowy_infra/theme.dart';
import 'package:flowy_infra_ui/style_widget/scrolling/styled_list.dart';
import 'package:flowy_infra_ui/style_widget/scrolling/styled_scroll_bar.dart';
import 'package:flowy_infra_ui/style_widget/scrolling/styled_scrollview.dart';
import 'package:flowy_infra_ui/style_widget/text.dart';
import 'package:flowy_infra_ui/widget/error_page.dart';
import 'package:flowy_sdk/protobuf/flowy-folder/view.pb.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
@ -250,6 +252,8 @@ class _GridFooter extends StatelessWidget {
@override
Widget build(BuildContext context) {
final rowCount = context.watch<GridBloc>().state.rowInfos.length;
final theme = context.watch<AppTheme>();
return SliverPadding(
padding: const EdgeInsets.only(bottom: 200),
sliver: SliverToBoxAdapter(
@ -260,7 +264,14 @@ class _GridFooter extends StatelessWidget {
child: Row(
children: [
SizedBox(width: GridSize.leadingHeaderPadding),
const SizedBox(width: 120, child: GridAddRowButton()),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const SizedBox(width: 120, child: GridAddRowButton()),
const SizedBox(height: 30),
_rowCountTextWidget(theme: theme,count: rowCount)
],
),
],
),
),
@ -268,4 +279,19 @@ class _GridFooter extends StatelessWidget {
),
);
}
Widget _rowCountTextWidget({required AppTheme theme, required int count}){
return Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
FlowyText.regular('Count : ',
fontSize: 13,
color: theme.shader3,
),
FlowyText.regular(count.toString(),
fontSize: 13,
),
],
);
}
}

View File

@ -5,7 +5,7 @@ class GridSize {
static double get scrollBarSize => 12 * scale;
static double get headerHeight => 40 * scale;
static double get footerHeight => 40 * scale;
static double get footerHeight => 100 * scale;
static double get leadingHeaderPadding => 50 * scale;
static double get trailHeaderPadding => 140 * scale;
static double get headerContainerPadding => 0 * scale;