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

Square padding #47

Closed
alejandrogiubel opened this issue Apr 19, 2022 · 7 comments
Closed

Square padding #47

alejandrogiubel opened this issue Apr 19, 2022 · 7 comments
Assignees
Labels
enhancement New feature or request
Projects
Milestone

Comments

@alejandrogiubel
Copy link

Hi great plugin!. Any way to add a padding to square inside the wheel?

@rydmike
Copy link
Owner

rydmike commented Apr 21, 2022

Thanks @alejandrogiubel !😄
Probably not in current version. Could you perhaps make screenshot with some drawing/mockup indicating where you would like to have some padding capability? What should it look like?

Perhaps it can be added. The wheel is a custom painter, so its certainly possible to draw whatever, just not with a padding widget per say.


BTW, finally got V5 of this this released https://pub.dev/packages/flex_color_scheme

@alejandrogiubel
Copy link
Author

Hi.
Now we have something like this
Captura de Pantalla 2022-04-21 a la(s) 09 52 22

And we need something like this
Captura de Pantalla 2022-04-21 a la(s) 09 52

Just aesthetic requirements 😅

@rydmike rydmike added the enhancement New feature or request label Apr 21, 2022
@rydmike rydmike added this to To do in TODOs via automation Apr 21, 2022
@rydmike rydmike added this to the v2.5.0 milestone Apr 21, 2022
@rydmike
Copy link
Owner

rydmike commented Apr 21, 2022

Nice mockup and I think I got it. Yes I agree that is a nice layout feature to be able to adjust.
So like this then? 😄

fcp-v2-5-0_1

Notice btw that thumb keeps its relative position when you adjust the shade square padding and the wheel width.

Added border radius adjustment of the shade square too, it was hard coded to 4 dp before.

Releasing version 2.5.0 in a few minutes with two new props as below A new web demo build with these features included is built and published automatically too when I release it.

  /// Padding between shade square inside the hue wheel and inner
  /// side of the wheel.
  ///
  /// Keep it reasonable in relation to wheelDiameter and wheelWidth, values
  /// from 0 to 20 are recommended.
  ///
  /// Defaults to 0 dp.
  final double wheelSquarePadding;

  /// Border radius of the shade square inside the hue wheel.
  ///
  /// Keep it reasonable, the thumb center always goes out to the square box
  /// corner, regardless of this border radius. It is only for visual design,
  /// the edge color shades are in the sharp corner, even if not shown.
  ///
  /// Recommended values 0 to 16.
  ///
  /// Defaults to 4 dp.
  final double wheelSquareBorderRadius;

@tonyrbf96
Copy link

tonyrbf96 commented Apr 21, 2022

@rydmike I think that setting the wheelSquareBorderRadius will cause to lose some important corner colors, like pure white or black.

EDITED

I see the comments, so you noticed 👍🏼

@alejandrogiubel
Copy link
Author

@rydmike
😳 That was unbelievably fast. Thanks for the quick support. That's exactly what we needed 😁

@rydmike
Copy link
Owner

rydmike commented Apr 21, 2022

You are welcome!

BTW, the rounding does not affect the color.

The thumb still moves all the way to the sharp corner box, even when visually rounded. The color's shade comes from the thumbs relative position in the box, not from the shade actually visually shown behind it, so you get correct color result even if you round the corners a bit visually or as much as you want, they were always rounded to 4dp before.

For example this still becomes white, since you are in the full white shade corner
image

@rydmike
Copy link
Owner

rydmike commented Apr 21, 2022

Updated WEB demo just updated itself too via GitHub actions release: https://rydmike.com/flexcolorpicker

@rydmike rydmike moved this from To do to Released on pub.dev in TODOs Jul 18, 2022
@rydmike rydmike self-assigned this Jan 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Released
TODOs
Released on pub.dev
Development

No branches or pull requests

3 participants