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

[Problem] Spreadsheet: No way to reset cell background color #13862

Open
2 tasks done
NXTler opened this issue May 7, 2024 · 6 comments
Open
2 tasks done

[Problem] Spreadsheet: No way to reset cell background color #13862

NXTler opened this issue May 7, 2024 · 6 comments
Labels
FDWG Input or discussion from FreeCAD Design Working Group needed Mod: Spreadsheet Related to the Spreadsheet Workbench Topic: Color Regarding the color handling Topic: User Interface Issue related UI/UX Type: Feature FR for improvements or new features

Comments

@NXTler
Copy link

NXTler commented May 7, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Problem description

Greetings,
when changing the background color of a cell, there is no way to revert to transparent again without deleting the cell:
grafik
FreeCAD also sets the background to white when using STRG + Z, assuming that the spreadsheet background is the same, which is not the case when the user uses a dark theme.

Full version info

OS: Manjaro Linux (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.37213 (Git) AppImage
Build type: Release
Branch: main
Hash: 20e7deb86a8c6c2cd2378f09f8313760933f3a5c
Python 3.11.9, Qt 5.15.13, Coin 4.0.2, Vtk 9.2.6, OCC 7.7.2
Locale: German/Germany (de_DE)
Installed mods: 
  * PieMenu 1.2.7
  * sheetmetal 0.4.2
  * A2plus 0.4.63
  * QuickMeasure 2022.10.28
  * Curves 0.6.23
  * CfdOF 1.25.2
  * IconThemes
  * fasteners 0.5.12

Subproject(s) affected?

Spreadsheet

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@maxwxyz maxwxyz added Topic: User Interface Issue related UI/UX Mod: Spreadsheet Related to the Spreadsheet Workbench Type: Feature FR for improvements or new features labels May 7, 2024
@luzpaz luzpaz changed the title [Problem] No way to reset cell background color [Problem] Spreadsheet: No way to reset cell background color Aug 14, 2024
@luzpaz luzpaz added Topic: Color Regarding the color handling FDWG Input or discussion from FreeCAD Design Working Group needed labels Aug 14, 2024
@hyarion
Copy link
Contributor

hyarion commented Sep 18, 2024

I've started to work on this issue.

What I've notice is that there is partial support for clearing colors already, but there are some quirks that makes clearing background impossible.

There are multiple ways to fix this.

  1. We could change the clear-color to opaque white - rgbaF(1, 1, 1, 1). But then you wouldn't be able to use white as background in dark mode. It is a quick fix and works as expected in light mode. It would be a bit strange in dark mode, but users should be able to find it.
  2. We could also add a new standard color in the background color picker, which is this transparent white rgbaF(1, 1, 1, 0) which could be called "None". It would be a bit strange to have a transparent color in the color picker so I would suggest that we indicate that this is a remove-background-color. This would also make it possible to create semi-transparent colors and if we support that, then we need to create a way to show those colors clearly too.

Option 1 is easy to fix with minimal change and I think it could be enough for v1.0. (Implemented in this branch: https://github.com/hyarion/FreeCAD/tree/spreadsheet-use-opaque-white-clear-color)
Option 2 requires some UI work but I think this is probably the way to go in the long run (I've implemented it with programmers art for the ui in this branch: https://github.com/hyarion/FreeCAD/tree/spreadsheet-clear-bg-and-transparent-colors)

Here's a screen recording of the Option 2 branch:

removebgcolor.mov

And a screenshot of the programmers-art-color-swatch with clear color and semi-transparency:

image

So what do you think, should we:

  1. Remove the possibility to change background color in cells to white, but allowing users to clear the color and maybe get a fix ready for v1.0? Or,
  2. Keep white as a background color option and add new none-color with a special icon?
  3. Something else completely?

@NXTler
Copy link
Author

NXTler commented Sep 18, 2024

I would go with a none colour option. I can imagine that some people might use the white colour even in none light mode themes, so keeping that functionality is important.

@hyarion
Copy link
Contributor

hyarion commented Sep 19, 2024

@NXTler I agree, it feels a bit like breaking something else by fixing this.

To continue with the "none"-color option, we need to decide on:

  • Do we want to support semi-transparent colors in spreadsheets?
  • Is the look I created good enough, or should we redesign the color picker?
  • If redesign, how should it look?

@luzpaz How do I get attention on this from the right people? Or should I lay low until 1.0 is released?

@NXTler
Copy link
Author

NXTler commented Sep 19, 2024

This issue is just for the ability to set a none colour. However, if you would like to redesign the colour selector anyway here are my thoughts:
I think the best approach is to do something similar to Office programs and offer all the basic colours in different strengths on a grid. It's intuitive and people know it well:
82b36c59-818d-41cb-99c4-079df967f487-758406764

But different from these office programs, the strengths should be set through their transparency value rather then their white content. That way the new selector should smoothly integrate into all themes without causing any unexpected discolouration or dark/light theme overlaps.

@NXTler
Copy link
Author

NXTler commented Sep 19, 2024

That being said, the design you created is more than good enough and would already fix this issue.

@MisterMakerNL
Copy link
Contributor

MisterMakerNL commented Sep 19, 2024

If you got the time can you check this out too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FDWG Input or discussion from FreeCAD Design Working Group needed Mod: Spreadsheet Related to the Spreadsheet Workbench Topic: Color Regarding the color handling Topic: User Interface Issue related UI/UX Type: Feature FR for improvements or new features
Projects
None yet
Development

No branches or pull requests

5 participants