fix: launch review issues (#3413)

This commit is contained in:
Lucas.Xu 2023-09-15 17:51:29 +08:00 committed by GitHub
parent 936b49a63f
commit 3426e5b53e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 30 additions and 12 deletions

View File

@ -87,7 +87,13 @@ class _AlignmentButtonsState extends State<_AlignmentButtons> {
color: Theme.of(context).colorScheme.onTertiary, color: Theme.of(context).colorScheme.onTertiary,
borderRadius: const BorderRadius.all(Radius.circular(4)), borderRadius: const BorderRadius.all(Radius.circular(4)),
), ),
popupBuilder: (_) => _AlignButtons(onAlignChanged: widget.onAlignChanged), popupBuilder: (_) {
keepEditorFocusNotifier.value += 1;
return _AlignButtons(onAlignChanged: widget.onAlignChanged);
},
onClose: () {
keepEditorFocusNotifier.value -= 1;
},
child: widget.child, child: widget.child,
); );
} }

View File

@ -167,16 +167,21 @@ class OutlineItemWidget extends StatelessWidget {
style: HoverStyle( style: HoverStyle(
hoverColor: Theme.of(context).hoverColor, hoverColor: Theme.of(context).hoverColor,
), ),
child: GestureDetector( builder: (context, onHover) {
onTap: () => scrollToBlock(context), return GestureDetector(
child: Container( onTap: () => scrollToBlock(context),
padding: EdgeInsets.only(left: node.leftIndent), child: Container(
child: Text( padding: EdgeInsets.only(left: node.leftIndent),
node.outlineItemText, child: Text(
style: style, node.outlineItemText,
style: style.copyWith(
color:
onHover ? Theme.of(context).colorScheme.onSecondary : null,
),
),
), ),
), );
), },
); );
} }

View File

@ -1,5 +1,7 @@
import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/workspace/application/settings/prelude.dart'; import 'package:appflowy/workspace/application/settings/prelude.dart';
import 'package:appflowy/workspace/presentation/settings/widgets/settings_appearance/theme_setting_entry_template.dart'; import 'package:appflowy/workspace/presentation/settings/widgets/settings_appearance/theme_setting_entry_template.dart';
import 'package:easy_localization/easy_localization.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';
@ -15,14 +17,18 @@ class CreateFileSettings extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return ThemeSettingEntryTemplateWidget( return ThemeSettingEntryTemplateWidget(
label: 'Show rename dialog when creating a new file', label:
LocaleKeys.settings_appearance_showNamingDialogWhenCreatingPage.tr(),
trailing: [ trailing: [
BlocProvider.value( BlocProvider.value(
value: cubit, value: cubit,
child: BlocBuilder<CreateFileSettingsCubit, bool>( child: BlocBuilder<CreateFileSettingsCubit, bool>(
builder: (context, state) { builder: (context, state) {
_prevSetting = state;
return Switch( return Switch(
value: state, value: state,
splashRadius: 0,
activeColor: Theme.of(context).colorScheme.primary,
onChanged: (value) { onChanged: (value) {
cubit.toggle(value: value); cubit.toggle(value: value);
_prevSetting = value; _prevSetting = value;

View File

@ -289,7 +289,8 @@
}, },
"theme": "Theme", "theme": "Theme",
"builtInsLabel": "Built-in Themes", "builtInsLabel": "Built-in Themes",
"pluginsLabel": "Plugins" "pluginsLabel": "Plugins",
"showNamingDialogWhenCreatingPage": "Show naming dialog when creating a page"
}, },
"files": { "files": {
"copy": "Copy", "copy": "Copy",