refactor: use snapshot for RnColorSetter and RnColorPad instead of css#1633
Draft
Doublonmousse wants to merge 8 commits intoflxzt:mainfrom
Draft
refactor: use snapshot for RnColorSetter and RnColorPad instead of css#1633Doublonmousse wants to merge 8 commits intoflxzt:mainfrom
snapshot for RnColorSetter and RnColorPad instead of css#1633Doublonmousse wants to merge 8 commits intoflxzt:mainfrom
Conversation
Note that _some_ css is left because of the icon dark/light variants switch For now color interpolation is done linearly in rgb space (do we have to do it in another space to be better ?)
snapshot for RnColorSetter instead of csssnapshot for RnColorSetter and RnColorPad instead of css
Owner
|
Noticing some visual differences, particularly: Seems like you were able to re-implement everything in the I don't see a difference when replacing the css with, or am I missing something? .colorpad {
min-width: 32px;
min-height: 32px;
padding: 0px;
margin: 0px;
}
.colorsetter {
min-width: 32px;
min-height: 32px;
padding: 0px;
margin: 0px;
} |
This way they stay visible even with light colors on light mode
Collaborator
Author
Collaborator
Author
|
I can do a let checkboard_color = {
match adw::StyleManager::default().color_scheme() {to dispatch color depending on the light/dark mode but that won't update immediately, only on the next redraw ... |
Collaborator
Author
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.






Uses only
snapshotto render the colorsetter (or at least reduces the amount of css and makes the color render through asnapshotcall, not a css color variable)The animation is implemented with a
TimedAnimationFor the colorpad, there is still some
cssleft because of the icon light/dark mode switch (that I don't really know how to toggle programatically here)