Repository navigation
Gtk: Show page numbers in the image list - #989
Merged
cyanfish merged 2 commits intoNov 24, 2026
Merged
Conversation
Draw the 1-based "n / total" label below each thumbnail when ShowPageNumbers is enabled, keeping labels in sync with list position after set, append, replace, trim and regenerate operations. Rebuild the GTK list when settings are saved so changes apply without a restart. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings the existing "Show page numbers" option to the GTK/Linux frontend.
We opened a discussion to confirm the approach before this PR, as CONTRIBUTING suggests for UI changes: #982. There has been no response there so far, so we're opening this PR to continue the review.
Changes
SupportsShowPageNumbersis nowtrue, so the existing checkbox is shown on Linux. It reusesUiStrings.ShowPageNumbers, so no new strings are added.ShowPageNumbersis set, each thumbnail gets a centered label with the 1-based position and total (e.g.2 / 5), matching the Windows rendering. Labels are refreshed after set, append, replace, trim and regenerate operations.UpdateListView()to callRegenerateImages(). GTK list items are widgets rather than custom-drawn, so toggling the setting applies without a restart.Testing
SupportsShowPageNumbersasfalse.NAPS2.App.Gtkbuilds with 0 warnings and 0 errors.NAPS2.Lib.Tests: 510 total, 0 failed, 8 ignored.NAPS2.Sdk.Tests: 5 failures inPageSizeTestson my machine. They depend on the system culture (pt-BR) and pass withen-US.AI assistance
This change was drafted with the help of an AI coding assistant (Claude). The code was reviewed, built and tested manually on Linux as described above.