Skip to content

PAINTROID-799: Fix opacity regression after zoom and improve semi-transparent color swatch rendering#149

Open
DevAnuragT wants to merge 3 commits intoCatrobat:developfrom
DevAnuragT:feature/paintroid-799-opacity-fix
Open

PAINTROID-799: Fix opacity regression after zoom and improve semi-transparent color swatch rendering#149
DevAnuragT wants to merge 3 commits intoCatrobat:developfrom
DevAnuragT:feature/paintroid-799-opacity-fix

Conversation

@DevAnuragT
Copy link

@DevAnuragT DevAnuragT commented Mar 1, 2026

Short Description

This PR fixes PAINTROID-799 by resolving opacity darkening after zoom gestures and improving semi-transparent color preview rendering in the toolbar swatch.

Jira ticket: PAINTROID-799

Root Cause

After a zoom interaction, an unintended paint-end commit could still be triggered.
This affected the latest active stroke, which explains why only the most recently added semi-transparent stroke got darker.

New Features and Enhancements

  • None

Refactorings and Bug Fixes

  • Prevent unintended paint commit after zoom end in drawing interaction flow.
  • Add stricter interaction gating so paint commit is executed only for valid single-pointer paint interactions.
  • Preserve opacity stability of semi-transparent brush strokes across zoom in/out.
  • Improve bottom bar color swatch rendering for semi-transparent colors using a white base layer.
  • Prevent build-phase side effects from landing page database error toast handling.
  • Add/adjust regression tests for:
    • opacity stability after zoom,
    • semi-transparent swatch rendering behavior,
    • updated bottom nav bar interaction helper behavior.

Validation

  • flutter analyze passes on this branch.
  • Relevant targeted regression test passes:
    • test/integration/brush_tool_test.dart
  • Manual validation on physical device confirms the reported darkening behavior is fixed.

Video Proof

paintroid_opacity.mp4

Checklist

Your checklist for this pull request

Please review the contributing guidelines and wiki pages of this repository.

  • Include the name of the Jira ticket in the PR’s title
  • Add the link to the ticket in Jira in the description of the PR
  • Include a summary of the changes plus the relevant context
  • Choose the proper base branch (develop)
  • Confirm that the changes follow the project’s coding guidelines (Wiki)
  • Verify that the changes generate no compiler or linter warnings
  • Perform a self-review of the changes
  • Verify to commit no other files than the intentionally changed ones
  • Include reasonable and readable tests verifying the added or changed behavior
  • Confirm that new and existing tests pass locally
  • Check that the commits’ message style matches the project’s guideline
  • Verify that your changes do not have any conflicts with the base branch
  • After the PR, verify that all CI checks have passed
  • Add new information to the Wiki

@DevAnuragT
Copy link
Author

I couldn't comment on Jira under this issue, so I thought I should open a PR directly for now

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