Bug 151898 - Sidebar Icons and "Font Color" Icon Appear Blurry When On HiDPI
Summary: Sidebar Icons and "Font Color" Icon Appear Blurry When On HiDPI
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
7.4.2.3 release
Hardware: All Linux (All)
: medium trivial
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.5.0 target:7.4.4 target:7.4.6
Keywords:
Depends on:
Blocks: HiDPI
  Show dependency treegraph
 
Reported: 2022-11-04 12:14 UTC by Stephen Zhang
Modified: 2023-01-24 10:36 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot indicating the blurry icon issue (185.54 KB, image/png)
2022-11-04 12:14 UTC, Stephen Zhang
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen Zhang 2022-11-04 12:14:21 UTC
Description:
Hi, I've tested different icon sets (SVG), and other icons are clear and sharp, but only icons on sidebar, "Font Color" icon, and "Highlight" icon are blurry.

OS: Fedora 36
Desktop: Wayland
Resolution: 3840x2160
Scale: 200%
Source: RPMs from Official Website

Steps to Reproduce:
1. Launch any LibreOffice app

Actual Results:
Blurry icons

Expected Results:
All icons should appear clear and sharp


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 7.4.2.3 / LibreOffice Community
Build ID: 382eef1f22670f7f4118c8c2dd222ec7ad009daf
CPU threads: 16; OS: Linux 6.0; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL
Comment 1 Stephen Zhang 2022-11-04 12:14:53 UTC
Created attachment 183411 [details]
Screenshot indicating the blurry icon issue
Comment 2 Amr Ibrahim 2022-11-08 16:05:35 UTC
Confirmed using Colibre (SVG) on Debian testing, 175% scaling.

Version: 7.4.2.3
Build ID: 40 (Build:3)
CPU threads: 8; OS: Linux 6.0; UI render: default; VCL: gtk3
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Debian package version: 1:7.4.2-2
Comment 3 Caolán McNamara 2022-11-08 20:39:44 UTC
The font and highlight get the current color painted into them, so there's probably a round trip through an intermediate bitmap which squeezes the hidpi out of them.

Not sure about the sidebar, something else must be happening there.
Comment 4 Commit Notification 2022-11-09 15:38:22 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/cb8a05bfccf77d5217f4f2e20b5898d6a24f990d

Related: tdf#151898 set origin for implLoadRepositoryImage XGraphics

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Stephen Zhang 2022-11-10 05:39:58 UTC
Thanks for the quick response!

So far version 7.5.0.0.alpha0+ still has the issue. I'll keep an eye on the future builds.

Cheers
Comment 6 Caolán McNamara 2022-11-10 08:38:14 UTC
yeah, "Related" patch doesn't do anything user useful yet, just a necessary preliminary step.
Comment 7 Commit Notification 2022-11-10 08:41:20 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/397f5daa850e59f0f4d3881cb99d110b50e34e3d

tdf#151898 if svgs are used in hidpi get a high quality GtkImage

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2022-11-10 15:43:52 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/758163bf5a754160e692dfff511f0a8a750b6bba

Related: tdf#151898 use more of the code path that can use scaled svgs

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Caolán McNamara 2022-11-10 20:36:49 UTC
I think I see a route to getting those last runtime-generated cases working
Comment 10 Commit Notification 2022-11-11 19:36:31 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/c2c37eadf32c80bcd8f168b9fc67f32002b3cb07

Related: tdf#151898 consider surface scaling if prescale with Bitmap::Scale

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2022-11-11 19:36:39 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/c3da84a10260b3260ee42df900e2ff01119e4f7c

Resolves: tdf#151898 get hidpi font/highlight color icons

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Caolán McNamara 2022-11-11 19:43:54 UTC
done in trunk, backports to 7-4 in gerrot
Comment 13 Commit Notification 2022-11-14 05:33:02 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/44463562732fb57c4009ecf54bb0c4ffa5df5034

Related: tdf#151898 set origin for implLoadRepositoryImage XGraphics

It will be available in 7.4.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 14 Commit Notification 2022-11-14 05:35:11 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/3cfeeb2ea83edbf99d4e3bb6e0b67538f03f783d

Related: tdf#151898 consider surface scaling if prescale with Bitmap::Scale

It will be available in 7.4.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 15 Commit Notification 2022-11-14 05:35:20 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/b10615a204469846508ad94c5858d5434260664a

tdf#151898 if svgs are used in hidpi get a high quality GtkImage

It will be available in 7.4.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 16 Commit Notification 2022-11-14 05:36:29 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/82934c0ab5bc917c2f00676a0758199964fac285

Resolves: tdf#151898 get hidpi font/highlight color icons

It will be available in 7.4.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 17 Andreas Radke 2023-01-12 17:56:37 UTC
This fix breaks build in 7.4.4 in Arch Linux:

In file included from /build/libreoffice-fresh/src/libreoffice-7.4.4.2/vcl/unx/gtk4/gtkinst.cxx:19:
/build/libreoffice-fresh/src/libreoffice-7.4.4.2/vcl/unx/gtk4/../gtk3/gtkinst.cxx: In function ‘void {anonymous}::picture_set_from_xgraphic(GtkPicture*, const com::sun::star::uno::Reference<com::sun::star::graphic::XGraphic>&)’:
/build/libreoffice-fresh/src/libreoffice-7.4.4.2/vcl/unx/gtk4/../gtk3/gtkinst.cxx:5117:42: error: too many arguments to function ‘std::unique_ptr<utl::TempFile> {anonymous}::getImageFile(const com::sun::star::uno::Reference<com::sun::star::graphic::XGraphic>&)’
 5117 |         if (auto xTempFile = getImageFile(rPicture, false))
      |                              ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/build/libreoffice-fresh/src/libreoffice-7.4.4.2/vcl/unx/gtk4/../gtk3/gtkinst.cxx:4861:36: note: declared here
 4861 |     std::unique_ptr<utl::TempFile> getImageFile(const css::uno::Reference<css::graphic::XGraphic>& rImage)
      |                                    ^~~~~~~~~~~~

reverting it allows to finish the build.

gcc 12.2.0 / gtk3 3.24.36 / gtk4 4.8.3
Comment 18 Caolán McNamara 2023-01-12 20:57:40 UTC
https://gerrit.libreoffice.org/c/core/+/145421 to fix the 7-4 gtk4 build
Comment 19 Commit Notification 2023-01-13 08:15:29 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/42d7d6a6f5b7701d9ec6c14dae6ffb48eb4b4035

Related: tdf#151898 fix gtk4 build in 7-4

It will be available in 7.4.5.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 20 Xisco Faulí 2023-01-24 10:36:13 UTC
7.4.5 was a hotfix release, updating target in status-whiteboard