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

Spreadsheet cell color buttons don't reflect state of selected cell #13874

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

Spreadsheet cell color buttons don't reflect state of selected cell #13874

krushia opened this issue May 7, 2024 · 2 comments
Labels
Feature FR for improvements or new features Missing: forum discussion MIssing a forum post discussion with the FC community WB Spreadsheet Related to the Spreadsheet Workbench

Comments

@krushia
Copy link

krushia commented May 7, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Problem description

The formatting buttons in the spreadsheet toolbar don't reflect the state of the selected cell. They instead show the last format applied to any cell in any spreadsheet open. This confuses the user when for example they have a cell with fg/bg white/black but the buttons show black/white. In this case I get tricked into using the wrong button to change a color.

Full version info

OS: Gentoo Linux (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.37100 (Git) AppImage
Build type: Release
Branch: main
Hash: ede6c811fd39d68a44949601f2eb7ecc8a67fdb7
Python 3.11.9, Qt 5.15.13, Coin 4.0.2, Vtk 9.2.6, OCC 7.7.2
Locale: English/United States (en_US)
Installed mods: 
  * parts_library
  * Curves 0.6.36
  * A2plus 0.4.64a
  * DynamicData 2.62.0
  * Assembly4 0.50.12 (Disabled)
  * Alternate_OpenSCAD 1.0.0
  * CurvedShapes 1.0.9
  * fasteners 0.5.20
  * SearchBar 1.0.2
  * Nodes 0.1.36 (Disabled)
  * workfeature
  * MnesarcoUtils 0.2.5
  * Manipulator 1.5.7
  * Assembly3 0.12.2
  * lattice2 1.0.0
  * Launcher
  * CommandPanel
  * CubeMenu
  * PieMenu 1.5.0
  * MeshRemodel 1.9.23

Subproject(s) affected?

Spreadsheet

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@maxwxyz maxwxyz added WB Spreadsheet Related to the Spreadsheet Workbench Feature FR for improvements or new features Missing: forum discussion MIssing a forum post discussion with the FC community labels May 7, 2024
@maxwxyz
Copy link
Collaborator

maxwxyz commented May 7, 2024

I guess this is to easily apply the last setting to other cells. This should need some more discussion.

@monkeypangit
Copy link

monkeypangit commented May 7, 2024

I think there are two simultaneous issues working in tandem here:

  1. The issue described by the krushia
  2. The fact that cells are highlighted by filling in the background of the cell and changing the text color based on style sheet settings (effectively masking its selected forground and background color).

It would probably make sense to do the following:

  1. Toolbar button colors reflect the colors of the currently selected cell.
  2. If multiple cells are selected the colors are set to that of the first selected cell (QEvent::MouseButtonPress).
  3. Draw a frame around selected cells instead of changing their colors (this seems to be a style sheet setting for the QTTableWidget)

This matches the behavior of for example Google Sheets.

How to set the QTTableWidget stylesheet:
https://www.qtcentre.org/threads/27195-Border-around-selected-cell-in-qtablewidget

Example of Google Sheets
googlesheets

Current implementation in Freecad
freecadspreadsheet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature FR for improvements or new features Missing: forum discussion MIssing a forum post discussion with the FC community WB Spreadsheet Related to the Spreadsheet Workbench
Projects
None yet
Development

No branches or pull requests

3 participants