Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Status bar displays wrong zoom value instead of 100% #1068

Closed
tkzv opened this issue May 2, 2024 · 1 comment · Fixed by #1084
Closed

Status bar displays wrong zoom value instead of 100% #1068

tkzv opened this issue May 2, 2024 · 1 comment · Fixed by #1084
Labels

Comments

@tkzv
Copy link

tkzv commented May 2, 2024

Describe the bug
When I change image zoom (with up/down arrows or mouse wheel), when it becomes 100%, the status bar displays the previous value. Though, when I set 100% zoom with Ctrl-1, status bar correctly displays 100%; the gray panel at lower left also displays the correct value.

To Reproduce
Steps to reproduce the behavior:

  1. Open an image.
  2. Make sure status bar is visible.
  3. Press Ctrl-1 to reset zoom to 100%.
  4. Press the up arrow — the image is displayed at 150%, the panel at lower left and the status bar correctly indicate 150% zoom.
  5. Press the down arrow — the image is displayed at 100%, the panel at lower left shows correct 100%, but the status bar still says 150%.
  6. Press the down arrow — the image is displayed at 50%, the panel at lower left and the status bar correctly indicate 50% zoom.
  7. Press the up arrow 2 times — zoom changes to 75%, then to 100%, the panel at lower left correctly shows those values, but the status bar says 75% for both.
  8. Change zoom with the mouse wheel — same as above: correct values in status bar for all but 100%.

Expected behavior
The status bar should always display the correct magnification value.

Desktop:

  • OS: Gentoo Linux
  • Version 3.16.224-r6

Additional context
There were no errors in console.

@leejuyuu
Copy link
Collaborator

leejuyuu commented May 4, 2024

Thanks for reporting, reproduced with nomacs 3.17.2295 (94e9ada) on Arch Linux.

@leejuyuu leejuyuu added the bug label May 4, 2024
leejuyuu added a commit to leejuyuu/nomacs that referenced this issue Jun 1, 2024
Fixes nomacs#1068.

There are two branches in `DkViewPort::zoom()` that changes the zoom but
does not call `DkStatusBarManager::setMessage()`, so the status bar is
not updated in some cases.

Add the call in the common function to fix this.
novomesk pushed a commit that referenced this issue Jun 2, 2024
Fixes #1068.

There are two branches in `DkViewPort::zoom()` that changes the zoom but
does not call `DkStatusBarManager::setMessage()`, so the status bar is
not updated in some cases.

Add the call in the common function to fix this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants