Skip to content

Draft: Allow to change grid color in WP taskpanel#13051

Merged
Roy-043 merged 4 commits intoFreeCAD:mainfrom
yorikvanhavre:draft-wp-set-color
Mar 26, 2024
Merged

Draft: Allow to change grid color in WP taskpanel#13051
Roy-043 merged 4 commits intoFreeCAD:mainfrom
yorikvanhavre:draft-wp-set-color

Conversation

@yorikvanhavre
Copy link
Member

This adds a color button to the task panel that appears when pressing the Draft working plane button, that allows to change the grid color

@yorikvanhavre yorikvanhavre requested a review from Roy-043 March 20, 2024 11:23
@github-actions github-actions bot added the Mod: Draft Related to the Draft Workbench label Mar 20, 2024
@Roy-043
Copy link
Contributor

Roy-043 commented Mar 22, 2024

There are some issues with the code. But before discussing that, I have my doubts about the idea itself. In my mind changing the grid color is not a frequent occurrence and therefore I would not expect to see this feature in the Draft_SelectPlane task panel. And why only the grid color and not the other visual aspects of the grid (transparency, colored axes, human figure...)?

@yorikvanhavre
Copy link
Member Author

This was mostly because when you change the UI theme, your grid color often needs to be changed too. And it takes a lot of tweaking to find the right color for a certain background color. When you need to go to the preferences, then restart FreeCAD to see the changes, this takes a lot of effort.

Now with this, you can much more easily tweak the grid to exactly the right aspect and intensity you want. The other settings are indeed not so important to set often, that's basically why I left them out.

@Roy-043
Copy link
Contributor

Roy-043 commented Mar 22, 2024

Yes, the _param_observer_callback_grid function in params.py currently does not handle grid color changes. I missed that. IMO we should improve that function instead. And even if a button is added to the task panel, that function needs to trigger the change.

@yorikvanhavre
Copy link
Member Author

Okay for me

If you change the grid color in the preferences and cick the Apply button, the color of all grids is updated now. So you can experiment while the Preferences Editor is open.

I have kept but moved the grid color button in the Draft_SelectPlane task panel for now. So that both options can be tested.
@yorikvanhavre
Copy link
Member Author

Thanks for the fix! This PR now depends on a fix in the params observer, right?

@Roy-043
Copy link
Contributor

Roy-043 commented Mar 26, 2024

The param observer already triggered the correct functions. Not changes were needed there.

@Roy-043 Roy-043 merged commit e7c0d96 into FreeCAD:main Mar 26, 2024
@yorikvanhavre yorikvanhavre deleted the draft-wp-set-color branch March 18, 2025 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Mod: Draft Related to the Draft Workbench

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants