Skip to content

Commit

Permalink
Improve action buttons in add dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeDoctorDE committed Oct 30, 2023
1 parent 6731a6d commit 1bc6e25
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 20 deletions.
42 changes: 24 additions & 18 deletions app/lib/dialogs/add.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,29 +41,35 @@ class AddDialog extends StatelessWidget {
? Theme.of(context).disabledColor
: null;
return BoxTile(
title: Row(
mainAxisAlignment: MainAxisAlignment.center,
title: Text(
tool.getLocalizedName(context),
textAlign: TextAlign.center,
),
size: tool.isAction() ? 110 : 100,
subtitle: caption.isEmpty ? null : Text(caption),
icon: Stack(
alignment: Alignment.topCenter,
children: [
Text(
tool.getLocalizedName(context),
textAlign: TextAlign.center,
Padding(
padding: const EdgeInsets.all(8.0),
child: PhosphorIcon(
tool.icon(PhosphorIconsStyle.light),
color: color,
size: tool.isAction() ? 38 : 32,
),
),
if (tool.isAction()) ...[
const SizedBox(width: 8),
IconButton(
onPressed: () =>
handler.onSelected(bloc, currentIndexCubit, false),
icon: const PhosphorIcon(PhosphorIconsLight.playCircle),
tooltip: AppLocalizations.of(context).play,
if (tool.isAction())
Align(
alignment: Alignment.bottomRight,
child: IconButton(
onPressed: () =>
handler.onSelected(bloc, currentIndexCubit, false),
icon: const PhosphorIcon(PhosphorIconsLight.playCircle),
tooltip: AppLocalizations.of(context).play,
),
),
],
],
),
subtitle: caption.isEmpty ? null : Text(caption),
icon: PhosphorIcon(
tool.icon(PhosphorIconsStyle.light),
color: color,
),
onTap: () => addTool(tool),
);
}
Expand Down
4 changes: 2 additions & 2 deletions app/lib/dialogs/packs/dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ class _PacksDialogState extends State<PacksDialog>
},
trailing: MenuAnchor(
builder: defaultMenuButton(
tooltip:
AppLocalizations.of(context).copy,
tooltip: AppLocalizations.of(context)
.actions,
),
menuChildren: [
MenuItemButton(
Expand Down
1 change: 1 addition & 0 deletions app/lib/visualizer/tool.dart
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ extension ToolVisualizer on Tool {
import: (_) => true,
undo: (_) => true,
redo: (_) => true,
fullSceen: (_) => true,
orElse: () => false,
);
}
Expand Down
1 change: 1 addition & 0 deletions fastlane/metadata/android/en-US/changelogs/78.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
* Add cursor to path eraser
* Add scrollbar to recent files
* Improve action buttons in add dialog
* Fix folder creation ([#513](https://github.com/LinwoodDev/Butterfly/issues/513))
* Fix locale spacing

Expand Down

0 comments on commit 1bc6e25

Please sign in to comment.