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

Allow color customization of single togglable #527

Merged
merged 1 commit into from Jan 15, 2023

Conversation

Jupi007
Copy link
Member

@Jupi007 Jupi007 commented Jan 15, 2023

For example:

Capture d’écran du 2023-01-15 13-09-58

This is the part one of yaru togglable theming.
In a second time, maybe introduce some kind of app global theming? Wdyt @jpnurmi @Feichtmeier ?

Fixes #526

Pull request checklist

  • This PR does not introduce visual changes

Copy link
Member

@Feichtmeier Feichtmeier left a comment

Choose a reason for hiding this comment

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

nice

@Feichtmeier Feichtmeier merged commit 6274160 into ubuntu:main Jan 15, 2023
@Jupi007 Jupi007 deleted the Jupi007/issue526 branch January 15, 2023 12:29
@jpnurmi
Copy link
Member

jpnurmi commented Jan 15, 2023

It would be nice to have:

final MaterialStateProperty<Color?>? checkColor;
final MaterialStateProperty<Color?>? fillColor;

and then introduce YaruCheckboxTheme(Data) with the same properties.

@Jupi007
Copy link
Member Author

Jupi007 commented Jan 15, 2023

Yeah, I looked at how material widgets are done.
But isn't ask for a MaterialStateProperty a bit overkill? Because we don't provide hover/focus variants.

@jpnurmi
Copy link
Member

jpnurmi commented Jan 15, 2023

or maybe 🤔

class YaruCheckbox {
  final Color? checkColor;
  final Color? fillColor;
}

class YaruCheckboxThemeData {
  final MaterialStateProperty<Color?>? checkColor;
  final MaterialStateProperty<Color?>? fillColor;
}

@jpnurmi
Copy link
Member

jpnurmi commented Jan 15, 2023

It's up to us decide and document which states each widget resolves against. :) As for togglables, selected and disabled states at least?

@Jupi007
Copy link
Member Author

Jupi007 commented Jan 15, 2023

It's up to us decide and document which states each widget resolves against. :) As for togglables, selected and disabled states at least?

Okay, I didn't know :D
Let's do this so 👍

@jpnurmi jpnurmi mentioned this pull request Jan 15, 2023
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.

Allow color customization of single togglable
3 participants