mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-11-11 16:29:19 +03:00
fix link button color on dark mode
This commit is contained in:
parent
beb844da17
commit
1c6b78e7d4
@ -53,7 +53,15 @@ class _FlowyLinkStyleButtonState extends State<FlowyLinkStyleButton> {
|
||||
final theme = context.watch<AppTheme>();
|
||||
final isEnabled = !widget.controller.selection.isCollapsed;
|
||||
final pressedHandler = isEnabled ? () => _openLinkDialog(context) : null;
|
||||
final icon = isEnabled ? svg('editor/share') : svg('editor/share', color: theme.shader4);
|
||||
final icon = isEnabled
|
||||
? svg(
|
||||
'editor/share',
|
||||
color: theme.iconColor,
|
||||
)
|
||||
: svg(
|
||||
'editor/share',
|
||||
color: theme.disableIconColor,
|
||||
);
|
||||
|
||||
return FlowyIconButton(
|
||||
onPressed: pressedHandler,
|
||||
|
@ -1,7 +1,7 @@
|
||||
import 'package:flowy_infra/image.dart';
|
||||
import 'package:flowy_infra/theme.dart';
|
||||
import 'package:flowy_infra_ui/style_widget/icon_button.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flowy_infra/theme.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
const double defaultIconSize = 18;
|
||||
@ -29,9 +29,7 @@ class ToolbarIconButton extends StatelessWidget {
|
||||
iconPadding: const EdgeInsets.symmetric(horizontal: 4, vertical: 4),
|
||||
onPressed: onPressed,
|
||||
width: width,
|
||||
icon: isToggled == true
|
||||
? svg(iconName, color: Colors.white)
|
||||
: svg(iconName),
|
||||
icon: isToggled == true ? svg(iconName, color: Colors.white) : svg(iconName),
|
||||
fillColor: isToggled == true ? theme.main1 : theme.shader6,
|
||||
hoverColor: isToggled == true ? theme.main1 : theme.shader5,
|
||||
tooltipText: tooltipText,
|
||||
|
@ -62,6 +62,7 @@ class AppTheme {
|
||||
late Color tint9;
|
||||
late Color textColor;
|
||||
late Color iconColor;
|
||||
late Color disableIconColor;
|
||||
|
||||
late Color main1;
|
||||
late Color main2;
|
||||
@ -110,7 +111,8 @@ class AppTheme {
|
||||
..main2 = const Color(0xff00b7ea)
|
||||
..textColor = _black
|
||||
..iconColor = _black
|
||||
..shadowColor = _black;
|
||||
..shadowColor = _black
|
||||
..disableIconColor = const Color(0xffbdbdbd);
|
||||
|
||||
case ThemeType.dark:
|
||||
return AppTheme(ty: themeType, isDark: true)
|
||||
@ -144,7 +146,8 @@ class AppTheme {
|
||||
..main2 = const Color(0xff009cc7)
|
||||
..textColor = _white
|
||||
..iconColor = _white
|
||||
..shadowColor = _white;
|
||||
..shadowColor = _white
|
||||
..disableIconColor = const Color(0xff333333);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user