Bug 423517

Summary: Text in enabled form fields becomes smaller when the window is made wider, and eventually disappears; but only with certain widget styles.
Product: [Applications] okular Reporter: Brendan Early <kde>
Component: PDF backendAssignee: Okular developers <okular-devel>
Status: REPORTED ---    
Severity: normal CC: aacid, kde
Priority: NOR    
Version: 1.9.3   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Form issue
Form issue 2

Description Brendan Early 2020-06-25 19:51:21 UTC
Created attachment 129683 [details]
Form issue

SUMMARY

If the window is too wide when filling a PDF text form Okular will not display typed text. When hiding form fields typed text is visible.

STEPS TO REPRODUCE
1. Open https://wcjc.edu/Admissions/admissions-and-registration/AddressChangeADAv1.pdf
2. Maximize window
3. Attempt to fill form

OBSERVED RESULT

See attached video

EXPECTED RESULT

I should be able to see filled form text at all window sizes.

SOFTWARE/OS VERSIONS
Operating System: Fedora 32
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.70.0
Qt Version: 5.14.2
Kernel Version: 5.6.19-300.fc32.x86_64
OS Type: 64-bit
Processors: 8 × Intel® Core™ i7-6700 CPU @ 3.40GHz
Memory: 15.6 GiB of RAM


ADDITIONAL INFORMATION
Resolution: 3840x2160
Scale: 150%
Comment 1 Albert Astals Cid 2020-06-25 21:48:03 UTC
Interesting, can't reproduce it.

Do you know which Qt style are you using?
Comment 2 Brendan Early 2020-06-25 22:02:17 UTC
(In reply to Albert Astals Cid from comment #1)
> Interesting, can't reproduce it.
> 
> Do you know which Qt style are you using?

No, where can I find that? I think I'm just using breeze.
Comment 3 Laura David Hurka 2020-06-26 12:04:11 UTC
The widget style looks very much like Breeze, but the color scheme is very likely not Breeze. It looks similar, but note the white text on blue background on the pressed button.

If you can determine your color scheme, we could examine where it uses white for text foreground.

On Plasma desktop you would just go to System Settings -> Colors.
Comment 4 Brendan Early 2020-06-26 15:26:47 UTC
Created attachment 129700 [details]
Form issue 2

It was under application style, I was using Arc via Kvantum. I am still seeing differences when the window gets wider. I can see the text just fine, but when I expand the window the text gets smaller.
Comment 5 Laura David Hurka 2020-06-26 21:04:36 UTC
Ah, ok, now I realize it. So the bug is:

Text in form fields becomes smaller when the window is made wider, and eventually disappears. But when form fields are disabled, everthing is fine.

Correct?
Comment 6 Brendan Early 2020-06-26 21:06:34 UTC
Pretty much, though it doesn't disappear when using Breeze. I'm pretty sure I've never seen an application change text size depending on window width.
Comment 7 Brendan Early 2020-06-26 21:16:37 UTC
> I've never seen an application change text size depending on window width.

I feel a bit silly for writing this. I think the intended behaviour here should be that the text size should be the same as the rendered form text.
Comment 8 Laura David Hurka 2020-06-26 21:37:12 UTC
I think what you write makes sense.

But I still believe this is an issue with the widget style you are using. Is “Arc” the widget style?

Another interpretation is that Okular shoudn’t rely on the system widget style to render form fields. For the same reason as why I think text highlight background shouldn’t follow the system color scheme: Form fields are inside a WYSIWYG graphics area, which shouldn’t and mostly doesn’t follow system stuff, but should do what the document says.
Comment 9 Brendan Early 2020-06-26 21:43:32 UTC
(In reply to David Hurka from comment #8)
> I think what you write makes sense.

It makes sense that the text size should change along with the rest of the document. I do not think it makes sense that the form text size becomes smaller when the rest of the document becomes bigger.

> But I still believe this is an issue with the widget style you are using. Is
> “Arc” the widget style?

My widget style is Breeze, Arc is only set for window decorations. I still see this with a version I built using kdesrc-build & kdesrc-run.

> Another interpretation is that Okular shoudn’t rely on the system widget
> style to render form fields. For the same reason as why I think text
> highlight background shouldn’t follow the system color scheme: Form fields
> are inside a WYSIWYG graphics area, which shouldn’t and mostly doesn’t
> follow system stuff, but should do what the document says.

+1
Comment 10 Brendan Early 2020-06-26 21:46:51 UTC
I'm just realizing that this is due to the zoom level changing when the window is made wider.