Skip to content

tab: Fix pill indicator flicker when replacing tabs#2556

Open
BeratHundurel wants to merge 1 commit into
longbridge:mainfrom
BeratHundurel:codex/fix-tab-indicator-flicker
Open

tab: Fix pill indicator flicker when replacing tabs#2556
BeratHundurel wants to merge 1 commit into
longbridge:mainfrom
BeratHundurel:codex/fix-tab-indicator-flicker

Conversation

@BeratHundurel

Copy link
Copy Markdown
Contributor

Description

Fix transient visual artifacts when replacing selected animated tabs.

Cached indicator bounds could survive a tab replacement when the selected index remained unchanged. Replacing a longer tab with a shorter one therefore briefly rendered a clipped indicator. Indicator geometry is now invalidated when tab labels or count change and remains hidden until fresh bounds are measured.

The pill label fade could also replay a previous animation epoch after operations such as “Close All,” briefly flashing the normal text color. The fade now runs only while the indicator is actually moving.

Screenshot

image

Checklist

  • I have read the CONTRIBUTING document and followed the guidelines.
  • Reviewed the changes in this PR and confirmed AI generated code (If any) is accurate.
  • Passed cargo run for story tests related to the changes.
  • Tested macOS, Windows and Linux platforms performance (if the change is platform-specific)

- Introduce indicator_moving on Tab
- Propagate through TabBar to Tab state
- Return moving flag from render_indicator and store on Tab
- Refactor TabIndicatorBounds to track labels with sync_tabs
- Use TabIndicatorBounds::new inits and apply sync logic
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