Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: improve default app bar layout #254

Merged
merged 3 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 6.1.2
- **STYLE(AppBar)**: moved close action to AppBar's leading parameter for improved layout consistency.
- **STYLE(AppBar)**: updated IconButtons to use default 8-point all-around padding, enhancing visual balance.
- **STYLE(AppBar)**: adjusted loading indicator padding to a multiple of 2 to align with design system standards.

## 6.1.1
- **FIX**(CustomWidgets): resolve issue preventing user from using custom widget `removeLayerArea`.

Expand Down
20 changes: 7 additions & 13 deletions lib/modules/main_editor/main_editor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2009,21 +2009,17 @@ class ProImageEditorState extends State<ProImageEditor>
configs.layerInteraction.hideToolbarOnInteraction
? null
: AppBar(
automaticallyImplyLeading: false,
foregroundColor: imageEditorTheme.appBarForegroundColor,
backgroundColor: imageEditorTheme.appBarBackgroundColor,
leading: IconButton(
tooltip: i18n.cancel,
icon: Icon(icons.closeEditor),
onPressed: closeEditor,
),
actions: [
IconButton(
tooltip: i18n.cancel,
padding: const EdgeInsets.symmetric(horizontal: 8),
icon: Icon(icons.closeEditor),
onPressed: closeEditor,
),
const Spacer(),
IconButton(
key: const ValueKey('MainEditorUndoButton'),
tooltip: i18n.undo,
padding: const EdgeInsets.symmetric(horizontal: 8),
icon: Icon(
icons.undoAction,
color: stateManager.position > 0
Expand All @@ -2035,7 +2031,6 @@ class ProImageEditorState extends State<ProImageEditor>
IconButton(
key: const ValueKey('MainEditorRedoButton'),
tooltip: i18n.redo,
padding: const EdgeInsets.symmetric(horizontal: 8),
icon: Icon(
icons.redoAction,
color: stateManager.position < stateHistory.length - 1
Expand All @@ -2046,17 +2041,16 @@ class ProImageEditorState extends State<ProImageEditor>
),
!_initialized
? Padding(
padding: const EdgeInsets.symmetric(horizontal: 11.0),
padding: const EdgeInsets.symmetric(horizontal: 10.0),
child: SizedBox.square(
dimension: 22,
dimension: 24,
child:
PlatformCircularProgressIndicator(configs: configs),
),
)
: IconButton(
key: const ValueKey('MainEditorDoneButton'),
tooltip: i18n.done,
padding: const EdgeInsets.symmetric(horizontal: 8),
icon: Icon(icons.doneIcon),
iconSize: 28,
onPressed: doneEditing,
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: pro_image_editor
description: "A Flutter image editor: Seamlessly enhance your images with user-friendly editing features."
version: 6.1.1
version: 6.1.2
homepage: https://github.com/hm21/pro_image_editor/
repository: https://github.com/hm21/pro_image_editor/
issue_tracker: https://github.com/hm21/pro_image_editor/issues/
Expand Down