Skip to content

Fix #5545: Update status bar on zoom change#5723

Merged
dacap merged 1 commit into
aseprite:mainfrom
Darth712:fix-issue-5545
Apr 7, 2026
Merged

Fix #5545: Update status bar on zoom change#5723
dacap merged 1 commit into
aseprite:mainfrom
Darth712:fix-issue-5545

Conversation

@Darth712

Copy link
Copy Markdown
Contributor

Cause:
Previously, the StatusBar did not receive a signal when the editor's zoom level was modified, via mouse wheel. This resulted in the zoom percentage displayed in the status bar becoming desynchronized from the actual zoom state.

Fix:
Implemented an override for the "onZoomChanged" function in doc_view.cpp. This ensures that whenever a zoom event is triggered, we check if the editor isActive() and force a StatusBar update via updateFromEditor(this).

I declare that my contributions are not co-authored using a generative AI technology.

I agree that my contributions are licensed under the Individual Contributor License Agreement V4.0 ("CLA") as stated in https://github.com/igarastudio/cla/blob/main/cla.md

I have signed the CLA following the steps given in https://github.com/igarastudio/cla#signing

@Darth712 Darth712 requested a review from dacap as a code owner March 27, 2026 13:51
@dacap dacap self-assigned this Mar 27, 2026
@dacap dacap added the needs cla The full CLA signing process wasn't completed. label Mar 27, 2026
@dacap

dacap commented Mar 27, 2026

Copy link
Copy Markdown
Member

Hi @Darth712, check that you should have received another email from SignNow to digital sign the CLA.

@aseprite-bot aseprite-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

Comment thread src/app/ui/doc_view.cpp
StatusBar::instance()->updateFromEditor(this);
}

void onZoomChanged(Editor* editor) override

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: parameter 'editor' is unused [misc-unused-parameters]

Suggested change
void onZoomChanged(Editor* editor) override
void onZoomChanged(Editor* /*editor*/) override

@Darth712

Copy link
Copy Markdown
Contributor Author

Hi @Darth712, check that you should have received another email from SignNow to digital sign the CLA.

Hi, I just received and signed the CLA

@aseprite-bot

Copy link
Copy Markdown
Collaborator

Hi there!

One or more of the commit messages in this PR do not match our code submission policy, please check the lint_commits CI job for more details on which commits were flagged and why.
Please do not close this PR and open another, instead modify your commit message(s) with git commit --amend and force push those changes to update this PR.

Added an override for the 'onZoomChanged' event in 'doc_view.cpp'
to ensure the 'StatusBar' is properly updated whenever the
editor's zoom level changes.
@dacap dacap removed the needs cla The full CLA signing process wasn't completed. label Mar 27, 2026
@Darth712

Darth712 commented Apr 7, 2026

Copy link
Copy Markdown
Contributor Author

Hi @dacap It's been a week since the last update. Is there anything else you need from my side? Thanks.

@dacap

dacap commented Apr 7, 2026

Copy link
Copy Markdown
Member

@Darth712 I'll take a look to this PR today and merge it if possible.

@dacap

dacap commented Apr 7, 2026

Copy link
Copy Markdown
Member

Just asking @Darth712, we've received several CLAs from @tecnico.ulisboa.pt, are you doing this PR work as a personal work (i.e. like a student) or is this part of a departament inside Universidade de Lisboa.

@Darth712

Darth712 commented Apr 7, 2026

Copy link
Copy Markdown
Contributor Author

@dacap I'm doing this as a student for a personal work.

@dacap

dacap commented Apr 7, 2026

Copy link
Copy Markdown
Member

@dacap I'm doing this as a student for a personal work.

Thanks for your answer 👍

@dacap dacap linked an issue Apr 7, 2026 that may be closed by this pull request
@dacap dacap added this to the v1.3.17.1 milestone Apr 7, 2026
@dacap

dacap commented Apr 7, 2026

Copy link
Copy Markdown
Member

Thanks for your fix @Darth712, I've just tested and it works great 👍

@dacap dacap merged commit 7aa0c94 into aseprite:main Apr 7, 2026
12 checks passed
@Darth712

Darth712 commented Apr 7, 2026

Copy link
Copy Markdown
Contributor Author

Thank you for the attention @dacap , keep up the great work!

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.

Zoom field doesn't update correclty

3 participants