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

Make palette selection and hover colors customizable #598

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ptziegler
Copy link
Contributor

This defines a new ColorPalette interface that can be set in the PaletteViewer. The colors provided by this interface are then used in the palette figure for e.g. the tool entries.

Clients can extend the DefaultColorPalette to define their own colors and therefore change the look of the palette.

@ptziegler
Copy link
Contributor Author

Contributes to #589. But with how complicated this is going to be, I think it's preferable to split it up into smaller chunks...

The current state allows you to customize the colors used for selection and hover, but not e.g. the background.
image

*/
@Deprecated(forRemoval = true, since = "3.20")
public DrawerFigure(final Control control) {
Copy link
Contributor Author

@ptziegler ptziegler Oct 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder whether it's a good or a bad idea to keep those old constructors. They're internal, so we're free to remove them without breaking API. But I know of at least one project that is using those internal classes...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keeping technical dept for the sake of what-ifs is probably not a good idea... Especially for something that's very easy to adapt, if user were to use those internal classes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I totally agree here with you. We have enough technical dept already.

@ptziegler ptziegler force-pushed the palette-customizer-pt1 branch 3 times, most recently from 58b2f67 to 80bcbc7 Compare October 26, 2024 07:06
This defines a new ColorPalette interface that can be set in the
PaletteViewer. The colors provided by this interface are then used in
the palette figure for e.g. the tool entries.

Clients can extend the DefaultColorPalette to define their own colors
and therefore change the look of the palette.
@ptziegler ptziegler changed the title Make palette colors customizable Make palette selection and hover colors customizable Oct 27, 2024
/**
* Flips between the custom and the default color palette whenever executed.
*/
public class ColorPaletteAction extends EditorPartAction {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't we use for new code the command, handler, menu extension points?

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

Successfully merging this pull request may close these issues.

2 participants