Bug 422758 - The 'page number' toolbar item sometimes is too narrow to fit the complete page number
Summary: The 'page number' toolbar item sometimes is too narrow to fit the complete pa...
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 1.10.1
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: Nate Graham
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-10 15:34 UTC by Kishore Gopalakrishnan
Modified: 2021-08-01 05:12 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 21.08
Sentry Crash Report:


Attachments
Screenshot showing the issue (13.03 KB, image/png)
2020-06-10 15:34 UTC, Kishore Gopalakrishnan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kishore Gopalakrishnan 2020-06-10 15:34:51 UTC
Created attachment 129201 [details]
Screenshot showing the issue

SUMMARY
If we open a PDF that has page numbers from say 100 to 105, the 'page number' item shows something like `[101] 2 of 5.`. The 101 inside the box gets cut off since the box is only wide enough to fit a single digit (see attached screenshot).

STEPS TO REPRODUCE
1. Open the attached PDF.

OBSERVED RESULT
The page number entry box in the 'page bar' is not wide enough to show the page number completely.

EXPECTED RESULT
The page number entry box should be wide enough to fit 

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.19.0
KDE Frameworks Version: 5.70.0
Qt Version: 5.15.0
Okular version: 1.10.1 (from Help > About Okular)

ADDITIONAL INFORMATION
The width is set correctly on PDFs that legitimately have 3-digit numbers of pages, so it looks like Okular is setting the width of the box wrongly based on the number of pages in the PDF, and not the internal page numbers used by the file.
Comment 1 Kishore Gopalakrishnan 2020-06-10 15:39:25 UTC
Sorry, I couldn't attach the PDF to the report, but it can be downloaded from here: https://ui.adsabs.harvard.edu/link_gateway/1978A&A....65..281R/ADS_PDF
Comment 2 Nate Graham 2020-06-10 22:18:35 UTC
Yes, I suppose this will happen when the window is vary narrow and there are a lot of pages in the PDF. I'll look into it.
Comment 3 Laura David Hurka 2020-06-11 22:05:11 UTC
Working code for the text box appears to exist in the presentation toolbar. I am not sure how much it is applicable for an XMLGui toolbar, but I think it should work.
Comment 4 Justin Zobel 2020-11-13 03:15:50 UTC
(In reply to Nate Graham from comment #2)
> Yes, I suppose this will happen when the window is vary narrow and there are
> a lot of pages in the PDF. I'll look into it.

Any progress on a patch for this one?
Comment 5 Nate Graham 2020-11-13 03:45:23 UTC
No, sorry.
Comment 6 Bug Janitor Service 2021-07-12 16:33:51 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/okular/-/merge_requests/457