Repository navigation
Show page numbers on the GTK/Linux image list #982
Closed
darkstarfire
started this conversation in
Development
Replies: 2 comments
|
Screenshots for reference (GTK/Linux, UI in English):
The labels update after removing or reordering pages, and disappear when the option is turned off. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi! I'd like to bring the existing Show page numbers option (currently Windows-only) to the GTK/Linux frontend. Since CONTRIBUTING asks for a discussion before UI changes, I'm sharing the proposed approach here before opening a PR. I have a working branch and can open the PR once the approach is confirmed.
Related: #75 covers counting selected/total pages in general; this proposal is about a per-thumbnail label.
Current state
LinuxSystemCompat.SupportsShowPageNumbersisfalse, so the checkbox is hidden on Linux.GtkListViewnever draws a page label.Proposed change
SupportsShowPageNumberson Linux. The existing "Show page numbers" checkbox is reused with the existingUiStrings.ShowPageNumberskey, so no new strings are added. Loading, saving andappsettings.xmllocking use the existing shared code.ListViewBehavior.ShowPageNumbersis set,GtkListViewadds a centered label below each thumbnail showing 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, so they stay correct after adding, removing, rotating or reordering pages.GtkDesktopFormoverridesUpdateListView()to callRegenerateImages(). The base implementation only invalidates, so without this the change would need a restart.Questions
n / totalformat acceptable on GTK (as on Windows), or do you prefer a bare index (1,2,3)?AI assistance
This change was drafted with the help of an AI coding assistant (Claude). I reviewed the code, built the GTK app with .NET 11 (0 warnings, 0 errors), and tested it manually on Linux: labels appear, update after removing and reordering pages, and disappear when the option is turned off. I also ran the local test suites; the failures I saw also occur on the base commit, or depend on the system locale.
Platforms
SupportsShowPageNumbersasfalse.Feedback on the approach is welcome.

All reactions