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

Add the option to remove the shadow for dragged pieces #977

Closed
EmmetSchuler opened this issue Sep 5, 2024 · 6 comments · Fixed by #1165
Closed

Add the option to remove the shadow for dragged pieces #977

EmmetSchuler opened this issue Sep 5, 2024 · 6 comments · Fixed by #1165

Comments

@EmmetSchuler
Copy link

It seems that some users on the forum dislike the shadow that appears when they drag pieces, because they are used to dragging on the website without one.
As we already have a toggle for piece magnification, I think this is relevant to certain users.

@anthisse
Copy link

anthisse commented Sep 5, 2024

When you mean shadow, do you mean the round circle that appears when dragging the piece over another square? Or instead do you mean the translucent piece that is displayed in the original square when dragging the piece?

@EmmetSchuler
Copy link
Author

I'm referring to the grey circle under the dragged piece

@anthisse
Copy link

Opening a pull request now; I will start to work on this.

@ijm8710
Copy link

ijm8710 commented Sep 18, 2024

This just feels like people being way too uptight. Feels unnecessary imo

@EmmetSchuler
Copy link
Author

Maybe not the most necessary, that's true. But a lot of people are coming from the website where there isn't a shadow. Someone made a feedback post about it so I guess there's at least a userbase for it.

@anthisse
Copy link

anthisse commented Oct 2, 2024

Upon further inspection, it seems that the circle comes from flutter-chessground; it's being drawn by _DragAvatar in board.dart here: https://github.com/lichess-org/flutter-chessground/blob/25de90896c8e00a825efaf174850d5b44a9c9048/lib/src/widgets/board.dart#L781

It doesn't appear to have an interface to turn it off unfortunately. To add the functionality, another bool (perhaps called showPieceShadow) inside of ChessboardSettings needs be added with associated mutators and accessors to set _DragAvatar::decoration to always be null when false. I'll submit a pull request there to add that functionality.

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

Successfully merging a pull request may close this issue.

3 participants