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

Gradient for fixed column, data cell and fixed row #219

Open
a15056478 opened this issue Sep 1, 2023 · 4 comments
Open

Gradient for fixed column, data cell and fixed row #219

a15056478 opened this issue Sep 1, 2023 · 4 comments

Comments

@a15056478
Copy link

We can use only color property for row, column and cell. But we can't achieve gradient for data cell, fixed row or column. This could be a good feature which makes the table look much better. Is there any way to achieve this functionality?

@maxim-saplin
Copy link
Owner

Hi, in fact you can achieve gradient color for a data cell (not header or checkbox) via putting a Container as a child of data cell, setting its alignment to centre (to stretch it) and setting decoration. Though in this case there will be vertical spaces between cells

@maxim-saplin
Copy link
Owner

I've added a new branch cell_decroation, will work on it slowly, the idea is:

  • Add DataCell2 class with decoration property
  • Use DataCell2.decoration value for Container.decoration use internally
  • Add ability to set decoration for checkbox column
  • Add nullable decoration property for fixed sections as an alternative to fixed color properties there're now
  • Add heading cells decoration
  • Sort out how all those decorations don't mess the API and are clear enough to use

@hendricgc
Copy link

hendricgc commented Sep 5, 2023

+1, really need this to my project

Hi, in fact you can achieve gradient color for a data cell (not header or checkbox) via putting a Container as a child of data cell, setting its alignment to centre (to stretch it) and setting decoration. Though in this case there will be vertical spaces between cells

I personally tested this workaround here. Of course it's possible, but when you are using some properties like columnSpacing or horizontalMargin, it may be kinda verbose to set zero to them and handle in the code synchronizing these spaces between the headers and cells. So, it can simplify a lot.

@maxim-saplin
Copy link
Owner

maxim-saplin commented Sep 6, 2023

columnSpacing or horizontalMargin

Though some peeople might want those fields affecting the backgrouds of cells... That's one of the tradeoffs I am not sure about. Either leave the widget as is and suggest going with Containers in cells and be expilict with each cell looks or introduce 10 more new fields to the widget that will be used to impilictly apply some (complicated) logic to the looks of differents cells across the widegst (column, row, header, fixed columns etc.)

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