mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: add an outline to accessory buttons (#5178)
This commit is contained in:
parent
62c80303c6
commit
c60ed11fe5
@ -1,6 +1,3 @@
|
|||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
|
|
||||||
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
||||||
import 'package:appflowy/generated/locale_keys.g.dart';
|
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||||
import 'package:appflowy/plugins/database/application/cell/bloc/url_cell_bloc.dart';
|
import 'package:appflowy/plugins/database/application/cell/bloc/url_cell_bloc.dart';
|
||||||
@ -9,8 +6,11 @@ import 'package:appflowy/plugins/database/widgets/row/accessory/cell_accessory.d
|
|||||||
import 'package:appflowy/plugins/database/widgets/row/cells/cell_container.dart';
|
import 'package:appflowy/plugins/database/widgets/row/cells/cell_container.dart';
|
||||||
import 'package:appflowy/workspace/presentation/home/toast.dart';
|
import 'package:appflowy/workspace/presentation/home/toast.dart';
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
|
import 'package:flowy_infra/size.dart';
|
||||||
import 'package:flowy_infra/theme_extension.dart';
|
import 'package:flowy_infra/theme_extension.dart';
|
||||||
import 'package:flowy_infra_ui/widget/flowy_tooltip.dart';
|
import 'package:flowy_infra_ui/widget/flowy_tooltip.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
|
||||||
import '../editable_cell_skeleton/url.dart';
|
import '../editable_cell_skeleton/url.dart';
|
||||||
@ -193,10 +193,16 @@ class _URLAccessoryIconContainer extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return SizedBox.square(
|
return Container(
|
||||||
dimension: 26,
|
width: 26,
|
||||||
child: Padding(
|
height: 26,
|
||||||
padding: const EdgeInsets.all(3.0),
|
decoration: BoxDecoration(
|
||||||
|
border: Border.fromBorderSide(
|
||||||
|
BorderSide(color: Theme.of(context).dividerColor),
|
||||||
|
),
|
||||||
|
borderRadius: Corners.s6Border,
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
child: child,
|
child: child,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -71,11 +71,16 @@ class _PrimaryCellAccessoryState extends State<PrimaryCellAccessory>
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return FlowyTooltip(
|
return FlowyTooltip(
|
||||||
message: LocaleKeys.tooltip_openAsPage.tr(),
|
message: LocaleKeys.tooltip_openAsPage.tr(),
|
||||||
child: SizedBox(
|
child: Container(
|
||||||
width: 26,
|
width: 26,
|
||||||
height: 26,
|
height: 26,
|
||||||
child: Padding(
|
decoration: BoxDecoration(
|
||||||
padding: const EdgeInsets.all(3.0),
|
border: Border.fromBorderSide(
|
||||||
|
BorderSide(color: Theme.of(context).dividerColor),
|
||||||
|
),
|
||||||
|
borderRadius: Corners.s6Border,
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
child: FlowySvg(
|
child: FlowySvg(
|
||||||
FlowySvgs.full_view_s,
|
FlowySvgs.full_view_s,
|
||||||
color: Theme.of(context).colorScheme.primary,
|
color: Theme.of(context).colorScheme.primary,
|
||||||
@ -162,8 +167,10 @@ class CellAccessoryContainer extends StatelessWidget {
|
|||||||
final children =
|
final children =
|
||||||
accessories.where((accessory) => accessory.enable()).map((accessory) {
|
accessories.where((accessory) => accessory.enable()).map((accessory) {
|
||||||
final hover = FlowyHover(
|
final hover = FlowyHover(
|
||||||
style:
|
style: HoverStyle(
|
||||||
HoverStyle(hoverColor: AFThemeExtension.of(context).lightGreyHover),
|
hoverColor: AFThemeExtension.of(context).lightGreyHover,
|
||||||
|
backgroundColor: Theme.of(context).cardColor,
|
||||||
|
),
|
||||||
builder: (_, onHover) => accessory.build(),
|
builder: (_, onHover) => accessory.build(),
|
||||||
);
|
);
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
|
Loading…
Reference in New Issue
Block a user