Repository navigation
feat(editor): eyedropper for the fill and text outline pickers, 95% opaque bars and popovers - #7
Merged
Merged
Conversation
…pickers The eyedropper button was only wired for the stroke colour picker because a sample always wrote the stroke colour. The sample now carries a target (stroke, fill or outline) set by the picker that started it, and the sampled pixel is written to that colour. The target colour keeps its alpha. A fill or outline at alpha 0 means none, so a sample there becomes fully opaque.
The toolbar, option bar, popovers and tooltips share one background colour at about 70% opacity with no blur, so the content behind showed through and interfered with small controls such as the colour picker. The shared colour is now about 95% opaque in both light and dark.
This branch was successfully deployed
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.
Cause
The fill and text outline colour pickers use the same popover as the stroke picker but had no eyedropper button, because a sample always wrote the stroke colour.
The toolbar, option bar, popovers and tooltips share one background colour at about 70% opacity with no blur. The content behind showed through and interfered with small controls such as the colour picker.
Change
lib/editor/editor_controller.dart: the eyedropper carries a target (stroke, fill or outline).applySampledColorwrites the sampled pixel to that colour and keeps its alpha. A fill or outline at alpha 0 becomes fully opaque.lib/editor/editor_core.dart: the sample goes throughapplySampledColor.lib/overlay/toolbar.dart: all three colour pickers pass their target and show the eyedropper button.lib/theme/glimpr_theme.dart: the shared bar background is about 95% opaque in light and dark.Verification
flutter analyzeand the fullflutter testsuite pass on macOS, including new controller tests for the three targets.