mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-04-24 22:57:12 -04:00
fix link button color on dark mode
This commit is contained in:
parent
beb844da17
commit
1c6b78e7d4
3 changed files with 16 additions and 7 deletions
|
@ -53,7 +53,15 @@ class _FlowyLinkStyleButtonState extends State<FlowyLinkStyleButton> {
|
||||||
final theme = context.watch<AppTheme>();
|
final theme = context.watch<AppTheme>();
|
||||||
final isEnabled = !widget.controller.selection.isCollapsed;
|
final isEnabled = !widget.controller.selection.isCollapsed;
|
||||||
final pressedHandler = isEnabled ? () => _openLinkDialog(context) : null;
|
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(
|
return FlowyIconButton(
|
||||||
onPressed: pressedHandler,
|
onPressed: pressedHandler,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import 'package:flowy_infra/image.dart';
|
import 'package:flowy_infra/image.dart';
|
||||||
import 'package:flowy_infra/theme.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';
|
||||||
|
import 'package:flowy_infra/theme.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
const double defaultIconSize = 18;
|
const double defaultIconSize = 18;
|
||||||
|
@ -29,9 +29,7 @@ class ToolbarIconButton extends StatelessWidget {
|
||||||
iconPadding: const EdgeInsets.symmetric(horizontal: 4, vertical: 4),
|
iconPadding: const EdgeInsets.symmetric(horizontal: 4, vertical: 4),
|
||||||
onPressed: onPressed,
|
onPressed: onPressed,
|
||||||
width: width,
|
width: width,
|
||||||
icon: isToggled == true
|
icon: isToggled == true ? svg(iconName, color: Colors.white) : svg(iconName),
|
||||||
? svg(iconName, color: Colors.white)
|
|
||||||
: svg(iconName),
|
|
||||||
fillColor: isToggled == true ? theme.main1 : theme.shader6,
|
fillColor: isToggled == true ? theme.main1 : theme.shader6,
|
||||||
hoverColor: isToggled == true ? theme.main1 : theme.shader5,
|
hoverColor: isToggled == true ? theme.main1 : theme.shader5,
|
||||||
tooltipText: tooltipText,
|
tooltipText: tooltipText,
|
||||||
|
|
|
@ -62,6 +62,7 @@ class AppTheme {
|
||||||
late Color tint9;
|
late Color tint9;
|
||||||
late Color textColor;
|
late Color textColor;
|
||||||
late Color iconColor;
|
late Color iconColor;
|
||||||
|
late Color disableIconColor;
|
||||||
|
|
||||||
late Color main1;
|
late Color main1;
|
||||||
late Color main2;
|
late Color main2;
|
||||||
|
@ -110,7 +111,8 @@ class AppTheme {
|
||||||
..main2 = const Color(0xff00b7ea)
|
..main2 = const Color(0xff00b7ea)
|
||||||
..textColor = _black
|
..textColor = _black
|
||||||
..iconColor = _black
|
..iconColor = _black
|
||||||
..shadowColor = _black;
|
..shadowColor = _black
|
||||||
|
..disableIconColor = const Color(0xffbdbdbd);
|
||||||
|
|
||||||
case ThemeType.dark:
|
case ThemeType.dark:
|
||||||
return AppTheme(ty: themeType, isDark: true)
|
return AppTheme(ty: themeType, isDark: true)
|
||||||
|
@ -144,7 +146,8 @@ class AppTheme {
|
||||||
..main2 = const Color(0xff009cc7)
|
..main2 = const Color(0xff009cc7)
|
||||||
..textColor = _white
|
..textColor = _white
|
||||||
..iconColor = _white
|
..iconColor = _white
|
||||||
..shadowColor = _white;
|
..shadowColor = _white
|
||||||
|
..disableIconColor = const Color(0xff333333);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue