feat: Improve dark mode in grid page (#2160)

* chore: Update the hover effect in  FieldCellButton and CreateFieldButton

* chore(grid): improve grid page UI

1. Update lightGreyHover in AFThemeExtension
2. Comment out dandelion and lavender temporary
3. Add text color in  AFThemeExtension
4. Update NavigatorAlertDialog title color

* chore: update the background color of auth page

* chore: update UI in Select option cell

* chore: update date cell UI

* chore: update checklist UI

* chore: comment out temporary

* chore: update multi select and URL UI

* chore: update scroll bar color

* chore: update sort and filter UI

* chore: rename default theme and put dandelion&lavender theme back

* chore: update new app svg file
This commit is contained in:
Yijing Huang 2023-04-03 23:51:26 -05:00 committed by GitHub
parent e2009c063b
commit 994332218e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
45 changed files with 243 additions and 132 deletions

View File

@ -1,5 +1,17 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <svg
<rect width="16" height="16" rx="8" fill="#00BCF0"/> width="16"
<rect x="7.5" y="4" width="1" height="8" rx="0.5" fill="white"/> height="16"
<rect x="12" y="7.5" width="1" height="8" rx="0.5" transform="rotate(90 12 7.5)" fill="white"/> viewBox="0 0 16 16"
fill="none"
version="1.1"
id="svg808"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs812" />
<path
id="path930"
style="fill:#00bcf0;fill-opacity:1"
transform="rotate(-90)"
d="M 0,7.9238281 A 8,8 0 0 0 -8.0585938,0 8,8 0 0 0 -16,8.0390625 8,8 0 0 0 -7.9804688,16 8,8 0 0 0 0,8 Z M -4,8 c 0,0.2769988 -0.2230012,0.5 -0.5,0.5 h -3 v 3 c 0,0.277 -0.2230012,0.5 -0.5,0.5 -0.2769988,0 -0.5,-0.223 -0.5,-0.5 v -3 h -3 C -11.777,8.5 -12,8.2769988 -12,8 c 0,-0.2769988 0.223,-0.5 0.5,-0.5 h 3 v -3 C -8.5,4.2230012 -8.2769988,4 -8,4 c 0.2769988,0 0.5,0.2230012 0.5,0.5 v 3 h 3 C -4.2230012,7.5 -4,7.7230012 -4,8 Z" />
</svg> </svg>

Before

Width:  |  Height:  |  Size: 317 B

After

Width:  |  Height:  |  Size: 766 B

View File

@ -1,5 +0,0 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="16" height="16" rx="8" fill="#00BCF0"/>
<rect x="7.5" y="4" width="1" height="8" rx="0.5" fill="#131720"/>
<rect x="12" y="7.5" width="1" height="8" rx="0.5" transform="rotate(90 12 7.5)" fill="#131720"/>
</svg>

Before

Width:  |  Height:  |  Size: 321 B

View File

@ -38,7 +38,10 @@ class ChoiceChipButton extends StatelessWidget {
child: FlowyButton( child: FlowyButton(
decoration: decoration, decoration: decoration,
useIntrinsicWidth: true, useIntrinsicWidth: true,
text: FlowyText(filterInfo.fieldInfo.name), text: FlowyText(
filterInfo.fieldInfo.name,
color: AFThemeExtension.of(context).textColor,
),
margin: const EdgeInsets.symmetric(horizontal: 8, vertical: 2), margin: const EdgeInsets.symmetric(horizontal: 8, vertical: 2),
radius: const BorderRadius.all(Radius.circular(14)), radius: const BorderRadius.all(Radius.circular(14)),
leftIcon: svgWidget( leftIcon: svgWidget(
@ -62,7 +65,8 @@ class _ChoicechipFilterDesc extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
final arrow = Transform.rotate( final arrow = Transform.rotate(
angle: -math.pi / 2, angle: -math.pi / 2,
child: svgWidget("home/arrow_left"), child: svgWidget("home/arrow_left",
color: AFThemeExtension.of(context).textColor),
); );
return Padding( return Padding(
padding: const EdgeInsets.symmetric(horizontal: 2), padding: const EdgeInsets.symmetric(horizontal: 2),

View File

@ -18,14 +18,19 @@ class ConditionButton extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
final arrow = Transform.rotate( final arrow = Transform.rotate(
angle: -math.pi / 2, angle: -math.pi / 2,
child: svgWidget("home/arrow_left"), child: svgWidget("home/arrow_left",
color: AFThemeExtension.of(context).textColor),
); );
return SizedBox( return SizedBox(
height: 20, height: 20,
child: FlowyButton( child: FlowyButton(
useIntrinsicWidth: true, useIntrinsicWidth: true,
text: FlowyText(conditionName, fontSize: 10), text: FlowyText(
conditionName,
fontSize: 10,
color: AFThemeExtension.of(context).textColor,
),
margin: const EdgeInsets.symmetric(horizontal: 4), margin: const EdgeInsets.symmetric(horizontal: 4),
radius: const BorderRadius.all(Radius.circular(2)), radius: const BorderRadius.all(Radius.circular(2)),
rightIcon: arrow, rightIcon: arrow,

View File

@ -3,6 +3,7 @@ import 'package:appflowy/plugins/database_view/grid/presentation/layout/sizes.da
import 'package:appflowy/plugins/database_view/grid/presentation/widgets/header/field_type_extension.dart'; import 'package:appflowy/plugins/database_view/grid/presentation/widgets/header/field_type_extension.dart';
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:flowy_infra/image.dart'; import 'package:flowy_infra/image.dart';
import 'package:flowy_infra/theme_extension.dart';
import 'package:flowy_infra_ui/style_widget/button.dart'; import 'package:flowy_infra_ui/style_widget/button.dart';
import 'package:flowy_infra_ui/style_widget/scrolling/styled_list.dart'; import 'package:flowy_infra_ui/style_widget/scrolling/styled_list.dart';
import 'package:flowy_infra_ui/style_widget/text.dart'; import 'package:flowy_infra_ui/style_widget/text.dart';
@ -117,19 +118,16 @@ class _FilterTextFieldDelegate extends SliverPersistentHeaderDelegate {
@override @override
Widget build( Widget build(
BuildContext context, double shrinkOffset, bool overlapsContent) { BuildContext context, double shrinkOffset, bool overlapsContent) {
return Padding( return Container(
padding: const EdgeInsets.only(top: 4), padding: const EdgeInsets.only(top: 4),
child: Container( height: fixHeight,
color: Theme.of(context).colorScheme.background, child: FlowyTextField(
height: fixHeight, hintText: LocaleKeys.grid_settings_filterBy.tr(),
child: FlowyTextField( onChanged: (text) {
hintText: LocaleKeys.grid_settings_filterBy.tr(), context
onChanged: (text) { .read<GridCreateFilterBloc>()
context .add(GridCreateFilterEvent.didReceiveFilterText(text));
.read<GridCreateFilterBloc>() },
.add(GridCreateFilterEvent.didReceiveFilterText(text));
},
),
), ),
); );
} }
@ -158,7 +156,11 @@ class _FilterPropertyCell extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return FlowyButton( return FlowyButton(
text: FlowyText.medium(fieldInfo.name), hoverColor: AFThemeExtension.of(context).lightGreyHover,
text: FlowyText.medium(
fieldInfo.name,
color: AFThemeExtension.of(context).textColor,
),
onTap: () => onTap(fieldInfo), onTap: () => onTap(fieldInfo),
leftIcon: svgWidget( leftIcon: svgWidget(
fieldInfo.fieldType.iconName(), fieldInfo.fieldType.iconName(),

View File

@ -3,6 +3,7 @@ import 'package:appflowy/workspace/presentation/widgets/pop_up_action.dart';
import 'package:appflowy_popover/appflowy_popover.dart'; import 'package:appflowy_popover/appflowy_popover.dart';
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:flowy_infra/image.dart'; import 'package:flowy_infra/image.dart';
import 'package:flowy_infra/theme_extension.dart';
import 'package:flowy_infra_ui/style_widget/icon_button.dart'; import 'package:flowy_infra_ui/style_widget/icon_button.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -31,6 +32,7 @@ class _DisclosureButtonState extends State<DisclosureButton> {
.toList(), .toList(),
buildChild: (controller) { buildChild: (controller) {
return FlowyIconButton( return FlowyIconButton(
hoverColor: AFThemeExtension.of(context).lightGreyHover,
width: 20, width: 20,
icon: svgWidget( icon: svgWidget(
"editor/details", "editor/details",

View File

@ -71,7 +71,10 @@ class _AddFilterButtonState extends State<AddFilterButton> {
SizedBox( SizedBox(
height: 28, height: 28,
child: FlowyButton( child: FlowyButton(
text: FlowyText(LocaleKeys.grid_settings_addFilter.tr()), text: FlowyText(
LocaleKeys.grid_settings_addFilter.tr(),
color: AFThemeExtension.of(context).textColor,
),
useIntrinsicWidth: true, useIntrinsicWidth: true,
hoverColor: AFThemeExtension.of(context).lightGreyHover, hoverColor: AFThemeExtension.of(context).lightGreyHover,
leftIcon: svgWidget( leftIcon: svgWidget(

View File

@ -14,12 +14,15 @@ class GridAddRowButton extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return FlowyButton( return FlowyButton(
text: FlowyText.medium(LocaleKeys.grid_row_newRow.tr()), text: FlowyText.medium(
LocaleKeys.grid_row_newRow.tr(),
color: Theme.of(context).colorScheme.tertiary,
),
hoverColor: AFThemeExtension.of(context).lightGreyHover, hoverColor: AFThemeExtension.of(context).lightGreyHover,
onTap: () => context.read<GridBloc>().add(const GridEvent.createRow()), onTap: () => context.read<GridBloc>().add(const GridEvent.createRow()),
leftIcon: svgWidget( leftIcon: svgWidget(
"home/add", "home/add",
color: Theme.of(context).iconTheme.color, color: Theme.of(context).colorScheme.tertiary,
), ),
); );
} }

View File

@ -164,11 +164,10 @@ class FieldCellButton extends StatelessWidget {
.replaceAll(Characters(''), Characters('\u{200B}')) .replaceAll(Characters(''), Characters('\u{200B}'))
.toString(); .toString();
return FlowyButton( return FlowyButton(
hoverColor: AFThemeExtension.of(context).lightGreyHover, hoverColor: AFThemeExtension.of(context).greyHover,
onTap: onTap, onTap: onTap,
leftIcon: svgWidget( leftIcon: FlowySvg(
field.fieldType.iconName(), name: field.fieldType.iconName(),
color: Theme.of(context).iconTheme.color,
), ),
radius: BorderRadius.zero, radius: BorderRadius.zero,
text: FlowyText.medium( text: FlowyText.medium(

View File

@ -5,6 +5,7 @@ import 'package:appflowy/startup/startup.dart';
import 'package:appflowy/workspace/presentation/widgets/dialogs.dart'; import 'package:appflowy/workspace/presentation/widgets/dialogs.dart';
import 'package:appflowy_popover/appflowy_popover.dart'; import 'package:appflowy_popover/appflowy_popover.dart';
import 'package:flowy_infra/image.dart'; import 'package:flowy_infra/image.dart';
import 'package:flowy_infra/theme_extension.dart';
import 'package:flowy_infra_ui/style_widget/button.dart'; import 'package:flowy_infra_ui/style_widget/button.dart';
import 'package:flowy_infra_ui/style_widget/text.dart'; import 'package:flowy_infra_ui/style_widget/text.dart';
import 'package:flowy_infra_ui/widget/spacing.dart'; import 'package:flowy_infra_ui/widget/spacing.dart';
@ -81,8 +82,10 @@ class _EditFieldButton extends StatelessWidget {
return SizedBox( return SizedBox(
height: GridSize.popoverItemHeight, height: GridSize.popoverItemHeight,
child: FlowyButton( child: FlowyButton(
hoverColor: AFThemeExtension.of(context).lightGreyHover,
text: FlowyText.medium( text: FlowyText.medium(
LocaleKeys.grid_field_editProperty.tr(), LocaleKeys.grid_field_editProperty.tr(),
color: AFThemeExtension.of(context).textColor,
), ),
onTap: onTap, onTap: onTap,
), ),
@ -148,9 +151,12 @@ class FieldActionCell extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return FlowyButton( return FlowyButton(
hoverColor: AFThemeExtension.of(context).lightGreyHover,
text: FlowyText.medium( text: FlowyText.medium(
action.title(), action.title(),
color: enable ? null : Theme.of(context).disabledColor, color: enable
? AFThemeExtension.of(context).textColor
: Theme.of(context).disabledColor,
), ),
onTap: () { onTap: () {
if (enable) { if (enable) {
@ -160,7 +166,7 @@ class FieldActionCell extends StatelessWidget {
leftIcon: svgWidget( leftIcon: svgWidget(
action.iconName(), action.iconName(),
color: enable color: enable
? Theme.of(context).colorScheme.onSurface ? AFThemeExtension.of(context).textColor
: Theme.of(context).disabledColor, : Theme.of(context).disabledColor,
), ),
); );

View File

@ -1,5 +1,6 @@
import 'package:appflowy_popover/appflowy_popover.dart'; import 'package:appflowy_popover/appflowy_popover.dart';
import 'package:flowy_infra/image.dart'; import 'package:flowy_infra/image.dart';
import 'package:flowy_infra/theme_extension.dart';
import 'package:flowy_infra_ui/flowy_infra_ui.dart'; import 'package:flowy_infra_ui/flowy_infra_ui.dart';
import 'package:appflowy_backend/protobuf/flowy-database/field_entities.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-database/field_entities.pb.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -57,7 +58,11 @@ class FieldTypeCell extends StatelessWidget {
return SizedBox( return SizedBox(
height: GridSize.popoverItemHeight, height: GridSize.popoverItemHeight,
child: FlowyButton( child: FlowyButton(
text: FlowyText.medium(fieldType.title()), hoverColor: AFThemeExtension.of(context).lightGreyHover,
text: FlowyText.medium(
fieldType.title(),
color: AFThemeExtension.of(context).textColor,
),
onTap: () => onSelectField(fieldType), onTap: () => onSelectField(fieldType),
leftIcon: svgWidget( leftIcon: svgWidget(
fieldType.iconName(), fieldType.iconName(),

View File

@ -4,6 +4,7 @@ import 'package:appflowy/plugins/database_view/application/field/type_option/typ
import 'package:appflowy_popover/appflowy_popover.dart'; import 'package:appflowy_popover/appflowy_popover.dart';
import 'package:dartz/dartz.dart' show Either; import 'package:dartz/dartz.dart' show Either;
import 'package:flowy_infra/image.dart'; import 'package:flowy_infra/image.dart';
import 'package:flowy_infra/theme_extension.dart';
import 'package:flowy_infra_ui/flowy_infra_ui.dart'; import 'package:flowy_infra_ui/flowy_infra_ui.dart';
import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart';
import 'package:appflowy_backend/protobuf/flowy-database/field_entities.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-database/field_entities.pb.dart';
@ -110,8 +111,10 @@ class _SwitchFieldButton extends StatelessWidget {
Widget _buildMoreButton(BuildContext context) { Widget _buildMoreButton(BuildContext context) {
final bloc = context.read<FieldTypeOptionEditBloc>(); final bloc = context.read<FieldTypeOptionEditBloc>();
return FlowyButton( return FlowyButton(
hoverColor: AFThemeExtension.of(context).lightGreyHover,
text: FlowyText.medium( text: FlowyText.medium(
bloc.state.field.fieldType.title(), bloc.state.field.fieldType.title(),
color: AFThemeExtension.of(context).textColor,
), ),
margin: GridSize.typeOptionContentInsets, margin: GridSize.typeOptionContentInsets,
leftIcon: svgWidget( leftIcon: svgWidget(

View File

@ -178,12 +178,9 @@ class CreateFieldButton extends StatelessWidget {
child: FlowyButton( child: FlowyButton(
radius: BorderRadius.zero, radius: BorderRadius.zero,
text: FlowyText.medium(LocaleKeys.grid_field_newColumn.tr()), text: FlowyText.medium(LocaleKeys.grid_field_newColumn.tr()),
hoverColor: AFThemeExtension.of(context).lightGreyHover, hoverColor: AFThemeExtension.of(context).greyHover,
onTap: () {}, onTap: () {},
leftIcon: svgWidget( leftIcon: const FlowySvg(name: 'home/add'),
"home/add",
color: Theme.of(context).iconTheme.color,
),
), ),
popupBuilder: (BuildContext popover) { popupBuilder: (BuildContext popover) {
return FieldEditor( return FieldEditor(

View File

@ -151,10 +151,7 @@ class DateFormatButton extends StatelessWidget {
margin: buttonMargins, margin: buttonMargins,
onTap: onTap, onTap: onTap,
onHover: onHover, onHover: onHover,
rightIcon: svgWidget( rightIcon: const FlowySvg(name: 'grid/more'),
"grid/more",
color: Theme.of(context).iconTheme.color,
),
), ),
); );
} }
@ -182,10 +179,7 @@ class TimeFormatButton extends StatelessWidget {
margin: buttonMargins, margin: buttonMargins,
onTap: onTap, onTap: onTap,
onHover: onHover, onHover: onHover,
rightIcon: svgWidget( rightIcon: const FlowySvg(name: 'grid/more'),
"grid/more",
color: Theme.of(context).iconTheme.color,
),
), ),
); );
} }

View File

@ -1,6 +1,7 @@
import 'package:appflowy/plugins/database_view/application/field/type_option/select_option_type_option_bloc.dart'; import 'package:appflowy/plugins/database_view/application/field/type_option/select_option_type_option_bloc.dart';
import 'package:appflowy_popover/appflowy_popover.dart'; import 'package:appflowy_popover/appflowy_popover.dart';
import 'package:flowy_infra/image.dart'; import 'package:flowy_infra/image.dart';
import 'package:flowy_infra/theme_extension.dart';
import 'package:flowy_infra_ui/flowy_infra_ui.dart'; import 'package:flowy_infra_ui/flowy_infra_ui.dart';
import 'package:appflowy_backend/protobuf/flowy-database/select_type_option.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-database/select_type_option.pb.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -243,7 +244,11 @@ class _AddOptionButton extends StatelessWidget {
child: SizedBox( child: SizedBox(
height: GridSize.popoverItemHeight, height: GridSize.popoverItemHeight,
child: FlowyButton( child: FlowyButton(
text: FlowyText.medium(LocaleKeys.grid_field_addSelectOption.tr()), hoverColor: AFThemeExtension.of(context).lightGreyHover,
text: FlowyText.medium(
LocaleKeys.grid_field_addSelectOption.tr(),
color: AFThemeExtension.of(context).textColor,
),
onTap: () { onTap: () {
context context
.read<SelectOptionTypeOptionBloc>() .read<SelectOptionTypeOptionBloc>()

View File

@ -1,6 +1,7 @@
import 'package:appflowy/plugins/database_view/application/field/type_option/edit_select_option_bloc.dart'; import 'package:appflowy/plugins/database_view/application/field/type_option/edit_select_option_bloc.dart';
import 'package:appflowy/plugins/database_view/widgets/row/cells/select_option_cell/extension.dart'; import 'package:appflowy/plugins/database_view/widgets/row/cells/select_option_cell/extension.dart';
import 'package:flowy_infra/image.dart'; import 'package:flowy_infra/image.dart';
import 'package:flowy_infra/theme_extension.dart';
import 'package:flowy_infra_ui/style_widget/button.dart'; import 'package:flowy_infra_ui/style_widget/button.dart';
import 'package:flowy_infra_ui/style_widget/scrolling/styled_list.dart'; import 'package:flowy_infra_ui/style_widget/scrolling/styled_list.dart';
import 'package:flowy_infra_ui/style_widget/text.dart'; import 'package:flowy_infra_ui/style_widget/text.dart';
@ -103,7 +104,11 @@ class _DeleteTag extends StatelessWidget {
return SizedBox( return SizedBox(
height: GridSize.popoverItemHeight, height: GridSize.popoverItemHeight,
child: FlowyButton( child: FlowyButton(
text: FlowyText.medium(LocaleKeys.grid_selectOption_deleteTag.tr()), hoverColor: AFThemeExtension.of(context).lightGreyHover,
text: FlowyText.medium(
LocaleKeys.grid_selectOption_deleteTag.tr(),
color: AFThemeExtension.of(context).textColor,
),
leftIcon: svgWidget( leftIcon: svgWidget(
"grid/delete", "grid/delete",
color: Theme.of(context).iconTheme.color, color: Theme.of(context).iconTheme.color,

View File

@ -3,6 +3,7 @@ import 'package:appflowy/plugins/database_view/grid/application/row/row_action_s
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:appflowy/generated/locale_keys.g.dart'; import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:flowy_infra/image.dart'; import 'package:flowy_infra/image.dart';
import 'package:flowy_infra/theme_extension.dart';
import 'package:flowy_infra_ui/style_widget/button.dart'; import 'package:flowy_infra_ui/style_widget/button.dart';
import 'package:flowy_infra_ui/style_widget/scrolling/styled_list.dart'; import 'package:flowy_infra_ui/style_widget/scrolling/styled_list.dart';
import 'package:flowy_infra_ui/style_widget/text.dart'; import 'package:flowy_infra_ui/style_widget/text.dart';
@ -56,9 +57,12 @@ class _ActionCell extends StatelessWidget {
return SizedBox( return SizedBox(
height: GridSize.popoverItemHeight, height: GridSize.popoverItemHeight,
child: FlowyButton( child: FlowyButton(
hoverColor: AFThemeExtension.of(context).lightGreyHover,
text: FlowyText.medium( text: FlowyText.medium(
action.title(), action.title(),
color: action.enable() ? null : Theme.of(context).disabledColor, color: action.enable()
? AFThemeExtension.of(context).textColor
: Theme.of(context).disabledColor,
), ),
onTap: () { onTap: () {
if (action.enable()) { if (action.enable()) {

View File

@ -5,6 +5,7 @@ import 'package:appflowy/plugins/database_view/grid/application/row/row_bloc.dar
import 'package:appflowy/plugins/database_view/widgets/row/cell_builder.dart'; import 'package:appflowy/plugins/database_view/widgets/row/cell_builder.dart';
import 'package:appflowy_popover/appflowy_popover.dart'; import 'package:appflowy_popover/appflowy_popover.dart';
import 'package:flowy_infra/image.dart'; import 'package:flowy_infra/image.dart';
import 'package:flowy_infra/theme_extension.dart';
import 'package:flowy_infra_ui/flowy_infra_ui.dart'; import 'package:flowy_infra_ui/flowy_infra_ui.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -152,11 +153,15 @@ class _InsertButton extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return FlowyIconButton( return FlowyIconButton(
tooltipText: LocaleKeys.tooltip_addNewRow.tr(), tooltipText: LocaleKeys.tooltip_addNewRow.tr(),
hoverColor: AFThemeExtension.of(context).lightGreyHover,
width: 20, width: 20,
height: 30, height: 30,
onPressed: () => context.read<RowBloc>().add(const RowEvent.createRow()), onPressed: () => context.read<RowBloc>().add(const RowEvent.createRow()),
iconPadding: const EdgeInsets.all(3), iconPadding: const EdgeInsets.all(3),
icon: svgWidget("home/add"), icon: svgWidget(
'home/add',
color: Theme.of(context).colorScheme.tertiary,
),
); );
} }
} }
@ -182,11 +187,15 @@ class _MenuButtonState extends State<_MenuButton> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return FlowyIconButton( return FlowyIconButton(
tooltipText: LocaleKeys.tooltip_openMenu.tr(), tooltipText: LocaleKeys.tooltip_openMenu.tr(),
hoverColor: AFThemeExtension.of(context).lightGreyHover,
width: 20, width: 20,
height: 30, height: 30,
onPressed: () => widget.openMenu(), onPressed: () => widget.openMenu(),
iconPadding: const EdgeInsets.all(3), iconPadding: const EdgeInsets.all(3),
icon: svgWidget("editor/details"), icon: svgWidget(
'editor/details',
color: Theme.of(context).colorScheme.tertiary,
),
); );
} }
} }

View File

@ -5,6 +5,7 @@ import 'package:appflowy/plugins/database_view/grid/presentation/layout/sizes.da
import 'package:appflowy/plugins/database_view/grid/presentation/widgets/header/field_type_extension.dart'; import 'package:appflowy/plugins/database_view/grid/presentation/widgets/header/field_type_extension.dart';
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:flowy_infra/image.dart'; import 'package:flowy_infra/image.dart';
import 'package:flowy_infra/theme_extension.dart';
import 'package:flowy_infra_ui/style_widget/button.dart'; import 'package:flowy_infra_ui/style_widget/button.dart';
import 'package:flowy_infra_ui/style_widget/scrolling/styled_list.dart'; import 'package:flowy_infra_ui/style_widget/scrolling/styled_list.dart';
import 'package:flowy_infra_ui/style_widget/text.dart'; import 'package:flowy_infra_ui/style_widget/text.dart';
@ -116,19 +117,16 @@ class _FilterTextFieldDelegate extends SliverPersistentHeaderDelegate {
@override @override
Widget build( Widget build(
BuildContext context, double shrinkOffset, bool overlapsContent) { BuildContext context, double shrinkOffset, bool overlapsContent) {
return Padding( return Container(
padding: const EdgeInsets.only(top: 4), padding: const EdgeInsets.only(top: 4),
child: Container( height: fixHeight,
color: Theme.of(context).colorScheme.background, child: FlowyTextField(
height: fixHeight, hintText: LocaleKeys.grid_settings_sortBy.tr(),
child: FlowyTextField( onChanged: (text) {
hintText: LocaleKeys.grid_settings_sortBy.tr(), context
onChanged: (text) { .read<CreateSortBloc>()
context .add(CreateSortEvent.didReceiveFilterText(text));
.read<CreateSortBloc>() },
.add(CreateSortEvent.didReceiveFilterText(text));
},
),
), ),
); );
} }
@ -157,7 +155,11 @@ class _SortPropertyCell extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return FlowyButton( return FlowyButton(
text: FlowyText.medium(fieldInfo.name), hoverColor: AFThemeExtension.of(context).lightGreyHover,
text: FlowyText.medium(
fieldInfo.name,
color: AFThemeExtension.of(context).textColor,
),
onTap: () => onTap(fieldInfo), onTap: () => onTap(fieldInfo),
leftIcon: svgWidget( leftIcon: svgWidget(
fieldInfo.fieldType.iconName(), fieldInfo.fieldType.iconName(),

View File

@ -37,7 +37,10 @@ class SortChoiceButton extends StatelessWidget {
return FlowyButton( return FlowyButton(
decoration: decoration, decoration: decoration,
useIntrinsicWidth: true, useIntrinsicWidth: true,
text: FlowyText(text), text: FlowyText(
text,
color: AFThemeExtension.of(context).textColor,
),
margin: const EdgeInsets.symmetric(horizontal: 8, vertical: 2), margin: const EdgeInsets.symmetric(horizontal: 8, vertical: 2),
radius: BorderRadius.all(radius), radius: BorderRadius.all(radius),
leftIcon: leftIcon, leftIcon: leftIcon,

View File

@ -182,13 +182,11 @@ class _AddSortButtonState extends State<_AddSortButton> {
child: SizedBox( child: SizedBox(
height: GridSize.popoverItemHeight, height: GridSize.popoverItemHeight,
child: FlowyButton( child: FlowyButton(
hoverColor: AFThemeExtension.of(context).greyHover,
disable: getCreatableSorts(widget.fieldController.fieldInfos).isEmpty, disable: getCreatableSorts(widget.fieldController.fieldInfos).isEmpty,
text: FlowyText.medium(LocaleKeys.grid_sort_addSort.tr()), text: FlowyText.medium(LocaleKeys.grid_sort_addSort.tr()),
onTap: () => _popoverController.show(), onTap: () => _popoverController.show(),
leftIcon: svgWidget( leftIcon: const FlowySvg(name: 'home/add'),
"home/add",
color: Theme.of(context).iconTheme.color,
),
), ),
), ),
popupBuilder: (BuildContext context) { popupBuilder: (BuildContext context) {
@ -220,10 +218,7 @@ class _DeleteSortButton extends StatelessWidget {
.read<SortEditorBloc>() .read<SortEditorBloc>()
.add(const SortEditorEvent.deleteAllSorts()); .add(const SortEditorEvent.deleteAllSorts());
}, },
leftIcon: svgWidget( leftIcon: const FlowySvg(name: 'editor/delete'),
"editor/delete",
color: Theme.of(context).iconTheme.color,
),
), ),
); );
}, },

View File

@ -55,7 +55,10 @@ class SortChoiceChip extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
final arrow = Transform.rotate( final arrow = Transform.rotate(
angle: -math.pi / 2, angle: -math.pi / 2,
child: svgWidget("home/arrow_left"), child: svgWidget(
"home/arrow_left",
color: Theme.of(context).iconTheme.color,
),
); );
final text = LocaleKeys.grid_settings_sort.tr(); final text = LocaleKeys.grid_settings_sort.tr();

View File

@ -25,7 +25,7 @@ class _FilterButtonState extends State<FilterButton> {
return BlocBuilder<GridFilterMenuBloc, GridFilterMenuState>( return BlocBuilder<GridFilterMenuBloc, GridFilterMenuState>(
builder: (context, state) { builder: (context, state) {
final textColor = state.filters.isEmpty final textColor = state.filters.isEmpty
? null ? AFThemeExtension.of(context).textColor
: Theme.of(context).colorScheme.primary; : Theme.of(context).colorScheme.primary;
return _wrapPopover( return _wrapPopover(

View File

@ -5,6 +5,7 @@ import 'package:appflowy/plugins/database_view/grid/presentation/widgets/header/
import 'package:appflowy/startup/startup.dart'; import 'package:appflowy/startup/startup.dart';
import 'package:appflowy_popover/appflowy_popover.dart'; import 'package:appflowy_popover/appflowy_popover.dart';
import 'package:flowy_infra/image.dart'; import 'package:flowy_infra/image.dart';
import 'package:flowy_infra/theme_extension.dart';
import 'package:flowy_infra_ui/flowy_infra_ui.dart'; import 'package:flowy_infra_ui/flowy_infra_ui.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_bloc/flutter_bloc.dart';
@ -115,7 +116,11 @@ class _GridPropertyCellState extends State<_GridPropertyCell> {
triggerActions: PopoverTriggerFlags.none, triggerActions: PopoverTriggerFlags.none,
margin: EdgeInsets.zero, margin: EdgeInsets.zero,
child: FlowyButton( child: FlowyButton(
text: FlowyText.medium(widget.fieldInfo.name), hoverColor: AFThemeExtension.of(context).lightGreyHover,
text: FlowyText.medium(
widget.fieldInfo.name,
color: AFThemeExtension.of(context).textColor,
),
leftIcon: svgWidget( leftIcon: svgWidget(
widget.fieldInfo.fieldType.iconName(), widget.fieldInfo.fieldType.iconName(),
color: Theme.of(context).iconTheme.color, color: Theme.of(context).iconTheme.color,

View File

@ -2,6 +2,7 @@ import 'package:appflowy/plugins/database_view/application/field/field_controlle
import 'package:appflowy/plugins/database_view/application/setting/setting_bloc.dart'; import 'package:appflowy/plugins/database_view/application/setting/setting_bloc.dart';
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:flowy_infra/image.dart'; import 'package:flowy_infra/image.dart';
import 'package:flowy_infra/theme_extension.dart';
import 'package:flowy_infra_ui/style_widget/button.dart'; import 'package:flowy_infra_ui/style_widget/button.dart';
import 'package:flowy_infra_ui/style_widget/scrolling/styled_list.dart'; import 'package:flowy_infra_ui/style_widget/scrolling/styled_list.dart';
import 'package:flowy_infra_ui/style_widget/text.dart'; import 'package:flowy_infra_ui/style_widget/text.dart';
@ -71,9 +72,12 @@ class _SettingItem extends StatelessWidget {
return SizedBox( return SizedBox(
height: GridSize.popoverItemHeight, height: GridSize.popoverItemHeight,
child: FlowyButton( child: FlowyButton(
hoverColor: AFThemeExtension.of(context).lightGreyHover,
text: FlowyText.medium( text: FlowyText.medium(
action.title(), action.title(),
color: action.enable() ? null : Theme.of(context).disabledColor, color: action.enable()
? AFThemeExtension.of(context).textColor
: Theme.of(context).disabledColor,
), ),
onTap: () => onAction(action), onTap: () => onAction(action),
leftIcon: svgWidget( leftIcon: svgWidget(

View File

@ -52,6 +52,7 @@ class _SettingButtonState extends State<SettingButton> {
triggerActions: PopoverTriggerFlags.none, triggerActions: PopoverTriggerFlags.none,
child: FlowyTextButton( child: FlowyTextButton(
LocaleKeys.settings_title.tr(), LocaleKeys.settings_title.tr(),
fontColor: AFThemeExtension.of(context).textColor,
fillColor: Colors.transparent, fillColor: Colors.transparent,
hoverColor: AFThemeExtension.of(context).lightGreyHover, hoverColor: AFThemeExtension.of(context).lightGreyHover,
padding: GridSize.typeOptionContentInsets, padding: GridSize.typeOptionContentInsets,

View File

@ -24,7 +24,7 @@ class _SortButtonState extends State<SortButton> {
return BlocBuilder<SortMenuBloc, SortMenuState>( return BlocBuilder<SortMenuBloc, SortMenuState>(
builder: (context, state) { builder: (context, state) {
final textColor = state.sortInfos.isEmpty final textColor = state.sortInfos.isEmpty
? null ? AFThemeExtension.of(context).textColor
: Theme.of(context).colorScheme.primary; : Theme.of(context).colorScheme.primary;
return wrapPopover( return wrapPopover(

View File

@ -1,6 +1,7 @@
import 'package:appflowy/plugins/database_view/application/cell/cell_controller_builder.dart'; import 'package:appflowy/plugins/database_view/application/cell/cell_controller_builder.dart';
import 'package:appflowy_popover/appflowy_popover.dart'; import 'package:appflowy_popover/appflowy_popover.dart';
import 'package:flowy_infra/image.dart'; import 'package:flowy_infra/image.dart';
import 'package:flowy_infra/theme_extension.dart';
import 'package:flowy_infra_ui/flowy_infra_ui.dart'; import 'package:flowy_infra_ui/flowy_infra_ui.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_bloc/flutter_bloc.dart';
@ -116,7 +117,11 @@ class _ChecklistOptionCellState extends State<_ChecklistOptionCell> {
children: [ children: [
Expanded( Expanded(
child: FlowyButton( child: FlowyButton(
text: FlowyText(widget.option.data.name), hoverColor: AFThemeExtension.of(context).lightGreyHover,
text: FlowyText(
widget.option.data.name,
color: AFThemeExtension.of(context).textColor,
),
leftIcon: icon, leftIcon: icon,
onTap: () => context onTap: () => context
.read<ChecklistCellEditorBloc>() .read<ChecklistCellEditorBloc>()
@ -132,6 +137,7 @@ class _ChecklistOptionCellState extends State<_ChecklistOptionCell> {
Widget _disclosureButton() { Widget _disclosureButton() {
return FlowyIconButton( return FlowyIconButton(
hoverColor: AFThemeExtension.of(context).lightGreyHover,
width: 20, width: 20,
onPressed: () => _popoverController.show(), onPressed: () => _popoverController.show(),
iconPadding: const EdgeInsets.fromLTRB(2, 2, 2, 2), iconPadding: const EdgeInsets.fromLTRB(2, 2, 2, 2),

View File

@ -20,7 +20,7 @@ class ChecklistProgressBar extends StatelessWidget {
percent: percent, percent: percent,
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
progressColor: Theme.of(context).colorScheme.primary, progressColor: Theme.of(context).colorScheme.primary,
backgroundColor: AFThemeExtension.of(context).tint9, backgroundColor: AFThemeExtension.of(context).progressBarBGcolor,
barRadius: const Radius.circular(5), barRadius: const Radius.circular(5),
); );
} }

View File

@ -385,10 +385,7 @@ class _DateTypeOptionButton extends StatelessWidget {
child: FlowyButton( child: FlowyButton(
text: FlowyText.medium(title), text: FlowyText.medium(title),
margin: GridSize.typeOptionContentInsets, margin: GridSize.typeOptionContentInsets,
rightIcon: svgWidget( rightIcon: const FlowySvg(name: 'grid/more'),
"grid/more",
color: Theme.of(context).iconTheme.color,
),
), ),
), ),
), ),

View File

@ -106,7 +106,11 @@ class SelectOptionTag extends StatelessWidget {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
Flexible( Flexible(
child: FlowyText.medium(name, overflow: TextOverflow.ellipsis), child: FlowyText.medium(
name,
overflow: TextOverflow.ellipsis,
color: Theme.of(context).colorScheme.onSurface,
),
), ),
if (onRemove != null) if (onRemove != null)
FlowyIconButton( FlowyIconButton(
@ -116,7 +120,7 @@ class SelectOptionTag extends StatelessWidget {
hoverColor: Colors.transparent, hoverColor: Colors.transparent,
icon: svgWidget( icon: svgWidget(
'home/close', 'home/close',
color: Theme.of(context).iconTheme.color, color: Theme.of(context).colorScheme.onSurface,
), ),
), ),
], ],
@ -139,6 +143,9 @@ class SelectOptionTagCell extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return FlowyHover( return FlowyHover(
style: HoverStyle(
hoverColor: AFThemeExtension.of(context).lightGreyHover,
),
child: InkWell( child: InkWell(
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,

View File

@ -210,7 +210,7 @@ class _CreateOptionCell extends StatelessWidget {
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
child: SelectOptionTag( child: SelectOptionTag(
name: name, name: name,
color: AFThemeExtension.of(context).lightGreyHover, color: AFThemeExtension.of(context).greyHover,
onSelected: () => context onSelected: () => context
.read<SelectOptionCellEditorBloc>() .read<SelectOptionCellEditorBloc>()
.add(SelectOptionEditorEvent.newOption(name)), .add(SelectOptionEditorEvent.newOption(name)),

View File

@ -5,6 +5,7 @@ import 'package:appflowy/workspace/presentation/home/toast.dart';
import 'package:appflowy_popover/appflowy_popover.dart'; import 'package:appflowy_popover/appflowy_popover.dart';
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:flowy_infra/image.dart'; import 'package:flowy_infra/image.dart';
import 'package:flowy_infra/theme_extension.dart';
import 'package:flowy_infra_ui/flowy_infra_ui.dart'; import 'package:flowy_infra_ui/flowy_infra_ui.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
@ -211,10 +212,8 @@ class _EditURLAccessoryState extends State<_EditURLAccessory>
controller: _popoverController, controller: _popoverController,
direction: PopoverDirection.bottomWithLeftAligned, direction: PopoverDirection.bottomWithLeftAligned,
offset: const Offset(0, 8), offset: const Offset(0, 8),
child: svgWidget( child: svgWidget("editor/edit",
"editor/edit", color: AFThemeExtension.of(context).textColor),
color: Theme.of(context).iconTheme.color,
),
popupBuilder: (BuildContext popoverContext) { popupBuilder: (BuildContext popoverContext) {
return URLEditorPopover( return URLEditorPopover(
cellController: cellController:

View File

@ -226,6 +226,7 @@ class AppearanceSettingsState with _$AppearanceSettingsState {
fontColor: theme.surface, fontColor: theme.surface,
), ),
), ),
scaffoldBackgroundColor: theme.surface,
scrollbarTheme: ScrollbarThemeData( scrollbarTheme: ScrollbarThemeData(
thumbColor: MaterialStateProperty.all(theme.shader3), thumbColor: MaterialStateProperty.all(theme.shader3),
thickness: MaterialStateProperty.resolveWith((states) { thickness: MaterialStateProperty.resolveWith((states) {
@ -292,10 +293,12 @@ class AppearanceSettingsState with _$AppearanceSettingsState {
tint7: theme.tint7, tint7: theme.tint7,
tint8: theme.tint8, tint8: theme.tint8,
tint9: theme.tint9, tint9: theme.tint9,
textColor: theme.text,
greyHover: theme.hoverBG1, greyHover: theme.hoverBG1,
greySelect: theme.bg3, greySelect: theme.bg3,
lightGreyHover: theme.shader6, lightGreyHover: theme.hoverBG3,
toggleOffFill: theme.shader5, toggleOffFill: theme.shader5,
progressBarBGcolor: theme.progressBarBGcolor,
code: _getFontStyle( code: _getFontStyle(
fontFamily: monospaceFontFamily, fontFamily: monospaceFontFamily,
fontColor: theme.shader3, fontColor: theme.shader3,
@ -309,7 +312,7 @@ class AppearanceSettingsState with _$AppearanceSettingsState {
fontFamily: fontFamily, fontFamily: fontFamily,
fontSize: FontSizes.s11, fontSize: FontSizes.s11,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
fontColor: theme.shader3, fontColor: theme.hint,
), ),
) )
], ],

View File

@ -20,12 +20,15 @@ class NewAppButton extends StatelessWidget {
hoverColor: Colors.transparent, hoverColor: Colors.transparent,
fontColor: Theme.of(context).colorScheme.tertiary, fontColor: Theme.of(context).colorScheme.tertiary,
onPressed: () async => await _showCreateAppDialog(context), onPressed: () async => await _showCreateAppDialog(context),
heading: Theme.of(context).brightness == Brightness.light heading: Container(
? svgWidget("home/new_app", size: const Size(16, 16)) width: 16,
: svgWidget( height: 16,
"home/new_app_dark", decoration: BoxDecoration(
size: const Size(16, 16), shape: BoxShape.circle,
), color: Theme.of(context).colorScheme.surface,
),
child: svgWidget("home/new_app"),
),
padding: EdgeInsets.symmetric(horizontal: Insets.l, vertical: 20), padding: EdgeInsets.symmetric(horizontal: Insets.l, vertical: 20),
); );

View File

@ -59,7 +59,7 @@ class ThemeSetting extends StatelessWidget {
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
_themeItemButton(context, BuiltInTheme.light), _themeItemButton(context, BuiltInTheme.defaultTheme),
_themeItemButton(context, BuiltInTheme.dandelion), _themeItemButton(context, BuiltInTheme.dandelion),
_themeItemButton(context, BuiltInTheme.lavender), _themeItemButton(context, BuiltInTheme.lavender),
], ],

View File

@ -119,7 +119,7 @@ class _CreateFlowyAlertDialog extends State<NavigatorAlertDialog> {
FlowyText.medium( FlowyText.medium(
widget.title, widget.title,
fontSize: FontSizes.s16, fontSize: FontSizes.s16,
color: Theme.of(context).disabledColor, color: Theme.of(context).colorScheme.tertiary,
), ),
], ],
if (widget.confirm != null) ...[ if (widget.confirm != null) ...[

View File

@ -9,7 +9,7 @@ extension FlowyTintExtension on FlowyTint {
ThemeMode? themeMode, ThemeMode? themeMode,
String? theme, String? theme,
}) { }) {
if (themeMode == ThemeMode.light && theme == BuiltInTheme.light) { if (themeMode == ThemeMode.light && theme == BuiltInTheme.defaultTheme) {
switch (this) { switch (this) {
case FlowyTint.tint1: case FlowyTint.tint1:
return l10n.lightLightTint1; return l10n.lightLightTint1;

View File

@ -1,9 +1,9 @@
import 'package:flowy_infra/colorscheme/lavender.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flowy_infra/theme.dart'; import 'package:flowy_infra/theme.dart';
import 'default_colorscheme.dart'; import 'default_colorscheme.dart';
import 'dandelion.dart'; import 'dandelion.dart';
import 'lavender.dart';
/// A map of all the built-in themes. /// A map of all the built-in themes.
/// ///
@ -11,7 +11,7 @@ import 'dandelion.dart';
/// the first is for light mode, and the second is for dark mode. /// the first is for light mode, and the second is for dark mode.
const Map<String, List<FlowyColorScheme>> themeMap = { const Map<String, List<FlowyColorScheme>> themeMap = {
BuiltInTheme.light: [ BuiltInTheme.defaultTheme: [
DefaultColorScheme.light(), DefaultColorScheme.light(),
DefaultColorScheme.dark(), DefaultColorScheme.dark(),
], ],
@ -69,9 +69,11 @@ abstract class FlowyColorScheme {
final Color hoverBG1; final Color hoverBG1;
//action item hover effect //action item hover effect
final Color hoverBG2; final Color hoverBG2;
final Color hoverBG3;
//the text color when it is hovered //the text color when it is hovered
final Color hoverFG; final Color hoverFG;
final Color questionBubbleBG; final Color questionBubbleBG;
final Color progressBarBGcolor;
const FlowyColorScheme({ const FlowyColorScheme({
required this.surface, required this.surface,
@ -114,8 +116,10 @@ abstract class FlowyColorScheme {
required this.onPrimary, required this.onPrimary,
required this.hoverBG1, required this.hoverBG1,
required this.hoverBG2, required this.hoverBG2,
required this.hoverBG3,
required this.hoverFG, required this.hoverFG,
required this.questionBubbleBG, required this.questionBubbleBG,
required this.progressBarBGcolor,
}); });
factory FlowyColorScheme.builtIn(String themeName, Brightness brightness) { factory FlowyColorScheme.builtIn(String themeName, Brightness brightness) {

View File

@ -12,6 +12,7 @@ const _lightShader1 = Color(0xff333333);
const _lightShader3 = Color(0xff828282); const _lightShader3 = Color(0xff828282);
const _lightShader6 = Color(0xfff2f2f2); const _lightShader6 = Color(0xfff2f2f2);
const _lightMain1 = Color(0xffe21f74); const _lightMain1 = Color(0xffe21f74);
const _lightTint9 = Color(0xffe1fbff);
const _darkShader1 = Color(0xff131720); const _darkShader1 = Color(0xff131720);
const _darkShader2 = Color(0xff1A202C); const _darkShader2 = Color(0xff1A202C);
@ -48,7 +49,7 @@ class DandelionColorScheme extends FlowyColorScheme {
tint6: const Color(0xfff5ffdc), tint6: const Color(0xfff5ffdc),
tint7: const Color(0xffddffd6), tint7: const Color(0xffddffd6),
tint8: const Color(0xffdefff1), tint8: const Color(0xffdefff1),
tint9: const Color(0xffe1fbff), tint9: _lightTint9,
main1: _lightMain1, main1: _lightMain1,
main2: const Color.fromARGB(255, 224, 25, 111), main2: const Color.fromARGB(255, 224, 25, 111),
shadow: _black, shadow: _black,
@ -63,8 +64,10 @@ class DandelionColorScheme extends FlowyColorScheme {
onPrimary: _white, onPrimary: _white,
hoverBG1: _lightBg2, hoverBG1: _lightBg2,
hoverBG2: _lightHover, hoverBG2: _lightHover,
hoverBG3: _lightShader6,
hoverFG: _lightShader1, hoverFG: _lightShader1,
questionBubbleBG: _lightSelector, questionBubbleBG: _lightSelector,
progressBarBGcolor: _lightTint9,
); );
const DandelionColorScheme.dark() const DandelionColorScheme.dark()
@ -86,15 +89,15 @@ class DandelionColorScheme extends FlowyColorScheme {
bg2: _black, bg2: _black,
bg3: const Color(0xff4f4f4f), bg3: const Color(0xff4f4f4f),
bg4: const Color(0xff2c144b), bg4: const Color(0xff2c144b),
tint1: const Color(0xffc3adff), tint1: const Color(0xff8738F5),
tint2: const Color(0xffffadf9), tint2: const Color(0xffE6336E),
tint3: const Color(0xffffadad), tint3: const Color(0xffFF2D9E),
tint4: const Color(0xffffcfad), tint4: const Color(0xffE9973E),
tint5: const Color(0xfffffead), tint5: const Color(0xffFBF000),
tint6: const Color(0xffe6ffa3), tint6: const Color(0xffC0F000),
tint7: const Color(0xffbcffad), tint7: const Color(0xff15F74E),
tint8: const Color(0xffadffe2), tint8: const Color(0xff00F0E2),
tint9: const Color(0xffade4ff), tint9: const Color(0xff00BCF0),
main1: _darkMain1, main1: _darkMain1,
main2: const Color.fromARGB(255, 224, 25, 111), main2: const Color.fromARGB(255, 224, 25, 111),
shadow: _black, shadow: _black,
@ -109,7 +112,9 @@ class DandelionColorScheme extends FlowyColorScheme {
onPrimary: _darkShader1, onPrimary: _darkShader1,
hoverBG1: _darkMain1, hoverBG1: _darkMain1,
hoverBG2: _darkMain1, hoverBG2: _darkMain1,
hoverBG3: _darkShader3,
hoverFG: _darkShader1, hoverFG: _darkShader1,
questionBubbleBG: _darkShader3, questionBubbleBG: _darkShader3,
progressBarBGcolor: _darkShader3,
); );
} }

View File

@ -12,6 +12,7 @@ const _lightShader1 = Color(0xff333333);
const _lightShader3 = Color(0xff828282); const _lightShader3 = Color(0xff828282);
const _lightShader6 = Color(0xfff2f2f2); const _lightShader6 = Color(0xfff2f2f2);
const _lightMain1 = Color(0xff00bcf0); const _lightMain1 = Color(0xff00bcf0);
const _lightTint9 = Color(0xffe1fbff);
const _darkShader1 = Color(0xff131720); const _darkShader1 = Color(0xff131720);
const _darkShader2 = Color(0xff1A202C); const _darkShader2 = Color(0xff1A202C);
const _darkShader3 = Color(0xff363D49); const _darkShader3 = Color(0xff363D49);
@ -47,7 +48,7 @@ class DefaultColorScheme extends FlowyColorScheme {
tint6: const Color(0xfff5ffdc), tint6: const Color(0xfff5ffdc),
tint7: const Color(0xffddffd6), tint7: const Color(0xffddffd6),
tint8: const Color(0xffdefff1), tint8: const Color(0xffdefff1),
tint9: const Color(0xffe1fbff), tint9: _lightTint9,
main1: _lightMain1, main1: _lightMain1,
main2: const Color(0xff00b7ea), main2: const Color(0xff00b7ea),
shadow: _black, shadow: _black,
@ -64,6 +65,8 @@ class DefaultColorScheme extends FlowyColorScheme {
hoverBG2: _lightHover, hoverBG2: _lightHover,
hoverFG: _lightShader1, hoverFG: _lightShader1,
questionBubbleBG: _lightSelector, questionBubbleBG: _lightSelector,
hoverBG3: _lightShader6,
progressBarBGcolor: _lightTint9,
); );
const DefaultColorScheme.dark() const DefaultColorScheme.dark()
@ -108,7 +111,9 @@ class DefaultColorScheme extends FlowyColorScheme {
onPrimary: _darkShader1, onPrimary: _darkShader1,
hoverBG1: _darkMain1, hoverBG1: _darkMain1,
hoverBG2: _darkMain1, hoverBG2: _darkMain1,
hoverBG3: _darkShader3,
hoverFG: _darkShader1, hoverFG: _darkShader1,
questionBubbleBG: _darkShader3, questionBubbleBG: _darkShader3,
progressBarBGcolor: _darkShader3,
); );
} }

View File

@ -13,6 +13,7 @@ const _lightShader1 = Color(0xff333333);
const _lightShader3 = Color(0xff828282); const _lightShader3 = Color(0xff828282);
const _lightShader6 = Color(0xfff2f2f2); const _lightShader6 = Color(0xfff2f2f2);
const _lightMain1 = Color(0xffA652FB); const _lightMain1 = Color(0xffA652FB);
const _lightTint9 = Color(0xffe1fbff);
const _darkShader1 = Color(0xff131720); const _darkShader1 = Color(0xff131720);
const _darkShader2 = Color(0xff1A202C); const _darkShader2 = Color(0xff1A202C);
@ -49,7 +50,7 @@ class LavenderColorScheme extends FlowyColorScheme {
tint6: const Color(0xfff5ffdc), tint6: const Color(0xfff5ffdc),
tint7: const Color(0xffddffd6), tint7: const Color(0xffddffd6),
tint8: const Color(0xffdefff1), tint8: const Color(0xffdefff1),
tint9: const Color(0xffe1fbff), tint9: _lightTint9,
main1: _lightMain1, main1: _lightMain1,
main2: const Color(0xff9327FF), main2: const Color(0xff9327FF),
shadow: _black, shadow: _black,
@ -64,8 +65,10 @@ class LavenderColorScheme extends FlowyColorScheme {
onPrimary: _white, onPrimary: _white,
hoverBG1: _lightBg2, hoverBG1: _lightBg2,
hoverBG2: _lightHover, hoverBG2: _lightHover,
hoverBG3: _lightShader6,
hoverFG: _lightShader1, hoverFG: _lightShader1,
questionBubbleBG: _lightSelector, questionBubbleBG: _lightSelector,
progressBarBGcolor: _lightTint9,
); );
const LavenderColorScheme.dark() const LavenderColorScheme.dark()
@ -87,15 +90,15 @@ class LavenderColorScheme extends FlowyColorScheme {
bg2: _black, bg2: _black,
bg3: const Color(0xff4f4f4f), bg3: const Color(0xff4f4f4f),
bg4: const Color(0xff2c144b), bg4: const Color(0xff2c144b),
tint1: const Color(0xffc3adff), tint1: const Color(0xff8738F5),
tint2: const Color(0xffffadf9), tint2: const Color(0xffE6336E),
tint3: const Color(0xffffadad), tint3: const Color(0xffFF2D9E),
tint4: const Color(0xffffcfad), tint4: const Color(0xffE9973E),
tint5: const Color(0xfffffead), tint5: const Color(0xffFBF000),
tint6: const Color(0xffe6ffa3), tint6: const Color(0xffC0F000),
tint7: const Color(0xffbcffad), tint7: const Color(0xff15F74E),
tint8: const Color(0xffadffe2), tint8: const Color(0xff00F0E2),
tint9: const Color(0xffade4ff), tint9: const Color(0xff00BCF0),
main1: _darkMain1, main1: _darkMain1,
main2: const Color(0xff9327FF), main2: const Color(0xff9327FF),
shadow: _black, shadow: _black,
@ -110,7 +113,9 @@ class LavenderColorScheme extends FlowyColorScheme {
onPrimary: _darkShader1, onPrimary: _darkShader1,
hoverBG1: _darkMain1, hoverBG1: _darkMain1,
hoverBG2: _darkMain1, hoverBG2: _darkMain1,
hoverBG3: _darkShader3,
hoverFG: _darkShader1, hoverFG: _darkShader1,
questionBubbleBG: _darkShader3, questionBubbleBG: _darkShader3,
progressBarBGcolor: _darkShader3,
); );
} }

View File

@ -2,9 +2,9 @@ import 'package:flowy_infra/colorscheme/colorscheme.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class BuiltInTheme { class BuiltInTheme {
static const String light = 'light'; static const String defaultTheme = 'Default';
static const String dandelion = 'dandelion'; static const String dandelion = 'Dandelion';
static const String lavender = 'lavender'; static const String lavender = 'Lavender';
} }
class AppTheme { class AppTheme {

View File

@ -15,10 +15,12 @@ class AFThemeExtension extends ThemeExtension<AFThemeExtension> {
final Color tint8; final Color tint8;
final Color tint9; final Color tint9;
final Color textColor;
final Color greyHover; final Color greyHover;
final Color greySelect; final Color greySelect;
final Color lightGreyHover; final Color lightGreyHover;
final Color toggleOffFill; final Color toggleOffFill;
final Color progressBarBGcolor;
final TextStyle code; final TextStyle code;
final TextStyle callout; final TextStyle callout;
@ -40,9 +42,11 @@ class AFThemeExtension extends ThemeExtension<AFThemeExtension> {
required this.greySelect, required this.greySelect,
required this.lightGreyHover, required this.lightGreyHover,
required this.toggleOffFill, required this.toggleOffFill,
required this.textColor,
required this.code, required this.code,
required this.callout, required this.callout,
required this.caption, required this.caption,
required this.progressBarBGcolor,
}); });
static AFThemeExtension of(BuildContext context) { static AFThemeExtension of(BuildContext context) {
@ -62,10 +66,12 @@ class AFThemeExtension extends ThemeExtension<AFThemeExtension> {
Color? tint7, Color? tint7,
Color? tint8, Color? tint8,
Color? tint9, Color? tint9,
Color? textColor,
Color? greyHover, Color? greyHover,
Color? greySelect, Color? greySelect,
Color? lightGreyHover, Color? lightGreyHover,
Color? toggleOffFill, Color? toggleOffFill,
Color? progressBarBGcolor,
TextStyle? code, TextStyle? code,
TextStyle? callout, TextStyle? callout,
TextStyle? caption, TextStyle? caption,
@ -82,10 +88,12 @@ class AFThemeExtension extends ThemeExtension<AFThemeExtension> {
tint7: tint7 ?? this.tint7, tint7: tint7 ?? this.tint7,
tint8: tint8 ?? this.tint8, tint8: tint8 ?? this.tint8,
tint9: tint9 ?? this.tint9, tint9: tint9 ?? this.tint9,
textColor: textColor ?? this.textColor,
greyHover: greyHover ?? this.greyHover, greyHover: greyHover ?? this.greyHover,
greySelect: greySelect ?? this.greySelect, greySelect: greySelect ?? this.greySelect,
lightGreyHover: lightGreyHover ?? this.lightGreyHover, lightGreyHover: lightGreyHover ?? this.lightGreyHover,
toggleOffFill: toggleOffFill ?? this.toggleOffFill, toggleOffFill: toggleOffFill ?? this.toggleOffFill,
progressBarBGcolor: progressBarBGcolor ?? this.progressBarBGcolor,
code: code ?? this.code, code: code ?? this.code,
callout: callout ?? this.callout, callout: callout ?? this.callout,
caption: caption ?? this.caption, caption: caption ?? this.caption,
@ -110,10 +118,13 @@ class AFThemeExtension extends ThemeExtension<AFThemeExtension> {
tint7: Color.lerp(tint7, other.tint7, t)!, tint7: Color.lerp(tint7, other.tint7, t)!,
tint8: Color.lerp(tint8, other.tint8, t)!, tint8: Color.lerp(tint8, other.tint8, t)!,
tint9: Color.lerp(tint9, other.tint9, t)!, tint9: Color.lerp(tint9, other.tint9, t)!,
textColor: Color.lerp(textColor, other.textColor, t)!,
greyHover: Color.lerp(greyHover, other.greyHover, t)!, greyHover: Color.lerp(greyHover, other.greyHover, t)!,
greySelect: Color.lerp(greySelect, other.greySelect, t)!, greySelect: Color.lerp(greySelect, other.greySelect, t)!,
lightGreyHover: Color.lerp(lightGreyHover, other.lightGreyHover, t)!, lightGreyHover: Color.lerp(lightGreyHover, other.lightGreyHover, t)!,
toggleOffFill: Color.lerp(toggleOffFill, other.toggleOffFill, t)!, toggleOffFill: Color.lerp(toggleOffFill, other.toggleOffFill, t)!,
progressBarBGcolor:
Color.lerp(progressBarBGcolor, other.progressBarBGcolor, t)!,
code: other.code, code: other.code,
callout: other.callout, callout: other.callout,
caption: other.caption, caption: other.caption,

View File

@ -138,7 +138,7 @@ class ScrollbarState extends State<StyledScrollbar> {
// Handle color // Handle color
var handleColor = widget.handleColor ?? var handleColor = widget.handleColor ??
(Theme.of(context).brightness == Brightness.dark (Theme.of(context).brightness == Brightness.dark
? AFThemeExtension.of(context).greyHover.withOpacity(.2) ? AFThemeExtension.of(context).lightGreyHover
: AFThemeExtension.of(context).greyHover); : AFThemeExtension.of(context).greyHover);
// Track color // Track color
var trackColor = widget.trackColor ?? var trackColor = widget.trackColor ??