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

Hardcoded CARD_WIDTH #4

Open
dangfan opened this issue May 9, 2020 · 5 comments
Open

Hardcoded CARD_WIDTH #4

dangfan opened this issue May 9, 2020 · 5 comments
Assignees

Comments

@dangfan
Copy link
Contributor

dangfan commented May 9, 2020

CARD_WIDTH should be computed dynamically.
@CircuitCoder

@DawnMagnet
Copy link

May I ask what CARD_WIDTH meas?

@DawnMagnet
Copy link

Do you mean this const double CARD_WIDTH = (240 - 20) * (86.0 / 54) + 20; in nfsee/lib/ui/card_physics.dart

@dangfan
Copy link
Contributor Author

dangfan commented Jun 21, 2020

CARD_WIDTH means the width of each card shown on the main screen.

@DawnMagnet
Copy link

I nearly get it.Should we dynamically compute it by screen width or something else?

@CircuitCoder
Copy link
Contributor

@DawnMagnet I suppose we should be able to compute it based on screen width? Maybe we can introduce a max card width computable from screen width?

The more complicated part of the story is that, the height of the card is defined as a fixed ratio of its width. So adjusting card width can also change the amount of vertical screen space occupied by a card, affecting the layout and animation of the card detail fields below the card.

I guess it's not a big problem, but we should be careful about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants