Skip to content

Commit

Permalink
Fix icon button if no display icon available
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeDoctorDE committed Nov 6, 2023
1 parent c74fd72 commit 5768136
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
30 changes: 17 additions & 13 deletions app/lib/views/property.dart
Original file line number Diff line number Diff line change
Expand Up @@ -132,26 +132,30 @@ class _PropertyViewState extends State<PropertyView>
controller.close();
}))
.toList();
final icon = PhosphorIcon(
selection.icon(multi
? PhosphorIconsStyle.fill
: PhosphorIconsStyle.light),
color: Theme.of(context).iconTheme.color,
);
return Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Header(
title:
Text(selection.getLocalizedName(context)),
leading: MenuAnchor(
controller: controller,
builder: defaultMenuButton(
icon: PhosphorIcon(
selection.icon(multi
? PhosphorIconsStyle.fill
: PhosphorIconsStyle.light),
color: Theme.of(context).iconTheme.color,
),
tooltip: AppLocalizations.of(context).icon,
),
menuChildren: menuChildren,
),
leading: menuChildren.length <= 1
? icon
: MenuAnchor(
controller: controller,
builder: defaultMenuButton(
icon: icon,
tooltip:
AppLocalizations.of(context).icon,
),
menuChildren: menuChildren,
),
actions: [
if (selection.showDeleteButton)
IconButton(
Expand Down
1 change: 1 addition & 0 deletions fastlane/metadata/android/en-US/changelogs/79.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
* Add templates to data settings
* Fix icon button if no display icon available

View all changes in the blog: https://linwood.dev/butterfly/2.0.0-beta.15

0 comments on commit 5768136

Please sign in to comment.