Skip to content

feat(editor): eyedropper for the fill and text outline pickers, 95% opaque bars and popovers - #7

Merged
howar31 merged 3 commits into
mainfrom
feat/fill-eyedropper
Oct 1, 2026
Merged

howar31 merged 3 commits into
mainfrom
feat/fill-eyedropper

Conversation

@howar31

@howar31 howar31 commented Oct 1, 2026

Copy link
Copy Markdown
Owner

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). applySampledColor writes 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 through applySampledColor.
  • 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.
  • Version 1.22.0+39.

Verification

  • flutter analyze and the full flutter test suite pass on macOS, including new controller tests for the three targets.
  • The macOS debug build was checked by hand: eyedropper in the fill picker, popover and toolbar background.
  • Not checked by hand on Windows.

…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.
@howar31
howar31 merged commit 5b25860 into main Oct 1, 2026
4 checks passed

This branch was successfully deployed

1 active deployment
github-pages — 5b258606 Deployed Oct 1, 2026 by howar31 via deploy #64
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.

1 participant