Commit faf55dda authored by Hans Muller's avatar Hans Muller

Disabled IconButtons render correctly

parent c56be8ef
......@@ -84,7 +84,7 @@ class Icon extends StatelessComponent {
final int iconAlpha = (255.0 * (IconTheme.of(context)?.clampedOpacity ?? 1.0)).round();
if (iconAlpha != 255) {
if (color != null) {
iconColor = color.withAlpha(iconAlpha);
iconColor = color.withAlpha((iconAlpha * color.opacity).round());
} else {
switch(iconThemeColor) {
case IconThemeColor.black:
......
......@@ -7,6 +7,7 @@ import 'package:flutter/widgets.dart';
import 'icon.dart';
import 'icon_theme_data.dart';
import 'ink_well.dart';
import 'theme.dart';
import 'tooltip.dart';
/// A material design "icon button".
......@@ -47,7 +48,7 @@ class IconButton extends StatelessComponent {
size: size,
icon: icon,
colorTheme: colorTheme,
color: color
color: onPressed != null ? color : Theme.of(context).disabledColor
)
);
if (tooltip != null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment