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

Theme brush rename #2435

Closed
Keboo opened this issue Sep 24, 2021 · 5 comments
Closed

Theme brush rename #2435

Keboo opened this issue Sep 24, 2021 · 5 comments
Milestone

Comments

@Keboo
Copy link
Member

Keboo commented Sep 24, 2021

Right now there is not a good standardization of brush name, or how to add new brushes to the theme. These have also deviated from the latest material design guidance.

The plan is to introduce the new brush names alongside the current brushes; however the old brushes names should be considered obsolete with the intention to remove them in the 5.x release.

This issue is a request for comment on the design moving forward.

Brush naming rules:

  1. Brush names will be prefixed with "MaterialDesign.Brush."
  2. Foreground brushes will be named with their corresponding brush with ".Foreground" suffix appended
  3. Color resources will be named with their corresponding brush with ".Color" suffix appended
  4. "Mid" or default colors will have "mid" removed from their names for brevity
  5. Brushes used by controls should be prefixed with "MaterialDesign.Brush.."

This will greatly expand the total number of brushes, however with the use of extension methods on ITheme many of these should not need to be set directly unless greater customization is desired.

Feedback?

Here is the current set of theme brushes as well as some of the proposed new names:
PrimaryHueLightBrush => MaterialDesign.Brush.Primary.Light
PrimaryHueLightForegroundBrush => MaterialDesign.Brush.Primary.Light.Foreground
PrimaryHueMidBrush => MaterialDesign.Brush.Primary
PrimaryHueMidForegroundBrush => MaterialDesign.Brush.Primary.Foreground
PrimaryHueDarkBrush => MaterialDesign.Brush.Primary.Dark
PrimaryHueDarkForegroundBrush => MaterialDesign.Brush.Primary.Dark.Foreground
SecondaryHueLightBrush => MaterialDesign.Brush.Secondary.Light
SecondaryHueLightForegroundBrush => MaterialDesign.Brush.Secondary.Light.Foreground
SecondaryHueMidBrush => MaterialDesign.Brush.Secondary
SecondaryHueMidForegroundBrush => MaterialDesign.Brush.Secondary.Foreground
SecondaryHueDarkBrush => MaterialDesign.Brush.Secondary.Dark
SecondaryHueDarkForegroundBrush => MaterialDesign.Brush.Secondary.Dark.Foreground
MaterialDesignValidationErrorBrush => MaterialDesign.Brush..ValidationError
MaterialDesignBackground => (removed; use MaterialDesign.Brush.Background)
MaterialDesignPaper => MaterialDesign.Brush.Background
MaterialDesignCardBackground => MaterialDesign.Brush.Card.Background
MaterialDesignToolBarBackground => MaterialDesign.Brush.ToolBar.Background
MaterialDesignBody => MaterialDesign.Brush.Text.Foreground
MaterialDesignBodyLight => MaterialDesign.Brush.Text.Light.Foreground
MaterialDesignColumnHeader => MaterialDesign.Brush.DataGrid.ColumnHeaderForeground and MaterialDesign.Brush.ListView.GridViewColumnHeaderForeground
MaterialDesignCheckBoxOff => MaterialDesign.Brush.CheckBox.CheckOff
MaterialDesignCheckBoxDisabled => MaterialDesign.Brush.CheckBox.CheckDisabled
MaterialDesignTextBoxBorder => (this brush will need to be multiplied for all controls) MaterialDesign.Brush.TextBox.Border
MaterialDesignDivider => (replaced with control specific brushes)
MaterialDesignSelection => (replaced with control specific brushes)
MaterialDesignToolForeground => (replaced with control specific brushes)
MaterialDesignToolBackground => (replaced with control specific brushes)
MaterialDesignFlatButtonClick => MaterialDesign.Brush.ToolBar.Button.MouseOver
MaterialDesignFlatButtonRipple => MaterialDesign.Brush..RippleFeedback
MaterialDesignToolTipBackground => MaterialDesign.Brush.ToolTip.Background
MaterialDesignChipBackground => MaterialDesign.Brush.Chip.Background
MaterialDesignSnackbarBackground => MaterialDesign.Brush.Snackbar.Background
MaterialDesignSnackbarMouseOver => MaterialDesign.Brush.Snackbar.MouseOver
MaterialDesignSnackbarRipple => MaterialDesign.Brush.Snackbar.RippleFeedback
MaterialDesignTextFieldBoxBackground => (replaced with control specific brushes)
MaterialDesignTextFieldBoxHoverBackground => (replaced with control specific brushes)
MaterialDesignTextFieldBoxDisabledBackground => (replaced with control specific brushes)
MaterialDesignTextAreaBorder => (replaced with control specific brushes)
MaterialDesignTextAreaInactiveBorder => (replaced with control specific brushes)
MaterialDesignDataGridRowHoverBackground => (replaced with control specific brushes)
MaterialDesignLightBackground => [MaterialDesign.Brush.Badged.LightBackground, MaterialDesign.Brush.ColorZone.LightBackground, MaterialDesign.Brush.ComboBox.Popup.LightBackground]
MaterialDesignLightForeground => [MaterialDesign.Brush.Badged.LightForeground, MaterialDesign.Brush.ColorZone.LightForeground, MaterialDesign.Brush.ComboBox.Popup.LightForeground]
MaterialDesignDarkBackground => [MaterialDesign.Brush.Badged.DarkBackground, MaterialDesign.Brush.ColorZone.DarkBackground, MaterialDesign.Brush.ComboBox.Popup.DarkBackground]
MaterialDesignDarkForeground => [MaterialDesign.Brush.Badged.DarkForeground, MaterialDesign.Brush.ColorZone.DarkForeground, MaterialDesign.Brush.ComboBox.Popup.DarkForeground]

@Erapchu
Copy link
Contributor

Erapchu commented Sep 25, 2021

Total renaming of the brushes? I like it, no problems.
But before update old versions to newer (v4.3 or v5.0), we are should be aware about it. Thanks.
Some of my projects still using v3.

@bebenins
Copy link
Contributor

I'm all for progress even with breaking changes. Bring it :)

@Keboo
Copy link
Member Author

Keboo commented Sep 25, 2021

@Erapchu yea that plan is to start the rename soon but leave both brush names in place for the new few version to give people time to update.

@kacciocciacciara
Copy link

I really like the unification of the resources name header.
A welcome change nonetheless.

@JorisCleVR
Copy link
Contributor

Looks good. Really like the consistency in naming!

What I also like is that more colors are added.
Yesterday I looked for the brushes of the Chip its delete button (to use in a control next to it) and then sadly found out that they were hard coded inside of the Chip style.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

5 participants