Bug 459736 - On Wayland, libreoffice calc opens with enormously big buttons
Summary: On Wayland, libreoffice calc opens with enormously big buttons
Status: RESOLVED DOWNSTREAM
Alias: None
Product: kde
Classification: I don't know
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-27 13:36 UTC by Gergely HORVÁTH
Modified: 2022-09-29 15:10 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot with libreoffice on normal scale (808.22 KB, image/png)
2022-09-27 16:29 UTC, Gergely HORVÁTH
Details
Screenshot with libreoffice when things are big (861.04 KB, image/png)
2022-09-27 16:29 UTC, Gergely HORVÁTH
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gergely HORVÁTH 2022-09-27 13:36:45 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

Setup:
- 14inch laptop, resolution: 2880x1800, 150% scale
- ultrawide screen, resolution: 2580x1080, 100% scale
- using wayland.

Opening libreoffice calc onto the external screen creates HUGE icons. They seem to be 2x in every direction as he original icons should be (compared to Mozilla Firefox icons). Moving all the window to the notebook screen scales the window and icons/buttons to their expected size. Interesting to see, that the switch between the "normal" and "toobig" size happens when the windows is fully moved to either of the screens. Moving it only partially retains the "size" from the previous screen.

I thought it may be related to GTK but Gimp does not show the same behaviour. 

STEPS TO REPRODUCE
1. Two screen with different scale on wayland (I guess these are the trigger points)
2. Open LibreOffice Calc (it happens with Writer or Impress as well)

OBSERVED RESULT
Bad scale on the external screen, with 100% scale factor opposed to the original scale with 150% scale factor. Talking about good vs bad scale is based on comparison of the buttons/icons inside the window to icons/buttons in other apps on the same screen.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.25.5
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.6
Kernel Version: 5.19.9-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 8 × 11th Gen Intel® Core™ i7-11370H @ 3.30GHz
Memory: 15,4 GiB of RAM
Graphics Processor: Mesa Intel® Xe Graphics
Manufacturer: TUXEDO
Product Name: TUXEDO InfinityBook Pro 14 Gen6

ADDITIONAL INFORMATION
I gladly give more information, but it may take some time, as I only sporadically use this setup (about once a week).
Comment 1 Nate Graham 2022-09-27 16:12:28 UTC
I can't reproduce this with LibreOffice 7.3.5.2 and current git master version of everything KDE.

Can you please:
1. Mention which LibreOffice version you're using
2. Mention which frontend UI for LibreOffice you're using (the KDE UI or the GTK UI)
3. Attach a screenshot that shows the problem

Thanks!
Comment 2 Gergely HORVÁTH 2022-09-27 16:29:28 UTC
Created attachment 152464 [details]
Screenshot with libreoffice on normal scale
Comment 3 Gergely HORVÁTH 2022-09-27 16:29:58 UTC
Created attachment 152466 [details]
Screenshot with libreoffice when things are big
Comment 4 Gergely HORVÁTH 2022-09-27 16:31:49 UTC
Thanks for the triage Nate!
I added two screenshots, *big is on the external screen, while *small is on the laptop screen. I put firefox and dolphin on the image, behind libreoffice for reference.
Libreoffice version is: 7.3.6-2 and I'm not sure about the UI. Can you give me some pointers, how can I check?
Comment 5 Nate Graham 2022-09-27 16:45:32 UTC
You're welcome!

Based on the screenshots, it looks like you're using the KDE UI. I feel fairly confident that this is a bug in LibreOffice itself. it looks like it's failing to scale itself according to the screen it's on, and is instead treating the highest scale factor it finds (or the scale factor of the primary screen, if your laptop is the primary) as global.

...which is it on X11, so that's not totally unreasonable. But on Wayland it's per-screen, and it needs to gain knowledge of this and scale itself accordingly. I'd encourage you to file a bug report at https://bugs.documentfoundation.org.
Comment 6 Gergely HORVÁTH 2022-09-29 15:10:01 UTC
Later reference that is the downstream bug: https://bugs.documentfoundation.org/show_bug.cgi?id=141578