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

Max button align fix #36

Merged
merged 3 commits into from
Jun 5, 2024
Merged

Max button align fix #36

merged 3 commits into from
Jun 5, 2024

Conversation

gemdev111
Copy link
Contributor

[f] Improve Max button position #11 #11
[~] re-indent

[~] small refactor assetlistview, removed unused alignment: .center -> center by default
[u] updated onChange iin assetlistview, old one was deprecated

attached images:
Simulator Screenshot - iPad (10th generation) - 2024-06-05 at 15 45 01
Simulator Screenshot - iPhone 15 Pro Max - 2024-06-05 at 15 19 39

…> center by default

[u] updated onChange iin assetlistview, old one was deprecated
@gemdev111 gemdev111 requested a review from gemcoder21 June 5, 2024 12:56
@gemdev111 gemdev111 self-assigned this Jun 5, 2024
@gemdev111 gemdev111 linked an issue Jun 5, 2024 that may be closed by this pull request
@gemdev111 gemdev111 removed a link to an issue Jun 5, 2024
@gemdev111 gemdev111 linked an issue Jun 5, 2024 that may be closed by this pull request
.fixedSize()
HStack {
Button(Localized.Transfer.max, action: useMax)
.buttonStyle(ColorButton.lightGray(paddingHorizontal: 16, paddingVertical: 8))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of 16,8 use Spacing.small, Spacing.medium

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

)
}
}
.frame(maxWidth: Spacing.scene.button.maxWidth)
.frame(maxWidth: .infinity)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to make sure button is not larger than Spacing.scene.button.maxWidth

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah. Button still fixedSize and haven't changed. The frame changed for container view for iPad to fix ipad layout for that button

@@ -82,7 +82,7 @@ public struct AssetListItemView: View {
public var body: some View {
HStack {
imageView
HStack(alignment: .center) {
HStack {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sure this does not break other places

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. By default HStack initialise with alignment: center. HStack(alignment: .center) - not necessary to write

@gemdev111 gemdev111 merged commit af279eb into main Jun 5, 2024
1 check passed
@gemdev111 gemdev111 deleted the max-button-align-fix branch June 5, 2024 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Improve Max button position
2 participants