Blurry Icons on HighDPI

Bug #1750199 reported by Kai Mast
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
LibreOffice
Fix Released
Medium
libreoffice (Ubuntu)
In Progress
Medium
Unassigned

Bug Description

On bionic with libreoffice 6.0 from proposed new and subjectively better icons are shipped which is great.

However, they still are rather blurry on a HighDPI screen. Can we patch the package to provide a higher resolution iconset?

Tags: bionic highdpi
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in libreoffice (Ubuntu):
status: New → Confirmed
Revision history for this message
In , Pmenzel+bugs-documentfoundation-org (pmenzel+bugs-documentfoundation-org) wrote :

Description:
Using Debian sid/unstable with LibreOffice 7.2.1-1 (and GNOME), the icons are blurry on a HiDPI screen. This is *not* a regression.

A similar bug is in Ubuntu’s bug tracker [1].

[1]: https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1750199

Steps to Reproduce:
1. Start LibreOffice on a HiDPI screen

Actual Results:
Notice blurry icons.

Expected Results:
Sharp icons.

Reproducible: Always

User Profile Reset: No

Additional Info:
Version: 7.2.1.2 / LibreOffice Community
Build ID: 20(Build:2)
CPU threads: 4; OS: Linux 5.14; UI render: default; VCL: gtk3
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Debian package version: 1:7.2.1-1
Calc: threaded

Revision history for this message
In , Heiko-tietze-g (heiko-tietze-g) wrote :

Tools > Options > View let you pick different themes and icon sizes. Guess you use Elementary and Automatic but please try the SVG variant.

Revision history for this message
In , Pmenzel+bugs-documentfoundation-org (pmenzel+bugs-documentfoundation-org) wrote :

(In reply to Heiko Tietze from comment #1)
> Tools > Options > View let you pick different themes and icon sizes. Guess
> you use Elementary and Automatic but please try the SVG variant.

*Elementary (SVG)* is selected.

Revision history for this message
Paul Menzel (paulmenzel) wrote :

Under *Tools* → *Options* → *View*, what theme do you have selected?

Even with *Elementary (SVG)* I get blurry icons with *libreoffice* 7.2.1-3 from Debian sid/unstable.

I reported the issue [upstream][1].

[1]: https://bugs.documentfoundation.org/show_bug.cgi?id=144583

Revision history for this message
In , Jay Chu (escape0707) wrote :

I can reproduce this on Arch Linux and Gnome 41 Wayland with my 13-inch 2K laptop:

Version: 7.3.2.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 16; OS: Linux 5.17; UI render: default; VCL: gtk3
Locale: ja-JP (ja_JP.UTF-8); UI: en-US
7.3.2-1
Calc: threaded

The non-SVG version is a bit blurry as expected, but the SVG version blurry even more, which is annoying.

Revision history for this message
In , Hossein-7 (hossein-7) wrote :

Created attachment 182408
Blurry toolbar icons

I can reproduce this issue, as I use HiDPI display with 2x scaling on Ubuntu 22.04.

I use this icon theme: Breeze (SVG + Dark)

Toolbar icons look blurry in 7.4:

Version: 7.4.0.3 / LibreOffice Community
Build ID: f85e47c08ddd19c015c0114a68350214f7066f5a
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: fa-IR (en_US.UTF-8); UI: en-US
Calc: threaded

And also in the latest dev master 7.5:

Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: c0d09eb46665a0b2ab86f263cc95662f406d83d2
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Revision history for this message
In , Hossein-7 (hossein-7) wrote :

@Caolan
I think this is related to the way icons are rasterized and get rendered. If someone uses a 2x scaling, the underlying rasterizer does the rasterization for a smaller size, and the result becomes blurry.
Do you have any idea how to draw vectors better in vcl/gtk?

Revision history for this message
In , Vstuart-foote (vstuart-foote) wrote :

(In reply to Hossein from comment #5)
> @Caolan
> I think this is related to the way icons are rasterized and get rendered. If
> someone uses a 2x scaling, the underlying rasterizer does the rasterization
> for a smaller size, and the result becomes blurry.
> Do you have any idea how to draw vectors better in vcl/gtk?

@Hossein, *
So please check the cache in your user profile. With a 200% scaling you should see a breeze_svg directory and sub-directory "200" that should contain the entire Breeze icon theme resampled to PNG icons at ~64x64px. If used those should be very crisp.

If not there then the icons are not being rebuilt and some lower resolution 32px icons are simply being scaled 200% with other UI graphics.

See also bug 115439

Revision history for this message
In , Pmenzel+bugs-documentfoundation-org (pmenzel+bugs-documentfoundation-org) wrote :

I am still experiencing this with *libreoffice* 1:7.4.1~rc2-3 from Debian sid/unstable.

Strange, that these cache files are created for each user, but here you go:

    $ file /home/user/.config/libreoffice/4/cache/elementary_svg/200/sc/res/dropurl.png
    /home/user/.config/libreoffice/4/cache/elementary_svg/200/sc/res/dropurl.png: PNG image data, 34 x 34, 8-bit/color RGBA, non-interlaced

Revision history for this message
In , Hossein-7 (hossein-7) wrote :
Download full text (4.9 KiB)

This is the result from my system:

$ file ~/.config/libreoffice/4/cache/breeze_dark_svg/200/res/*.png
/home/hossein/.config/libreoffice/4/cache/breeze_dark_svg/200/res/mainapp_48_8.png: PNG image data, 98 x 98, 8-bit/color RGBA, non-interlaced
/home/hossein/.config/libreoffice/4/cache/breeze_dark_svg/200/res/minus.png: PNG image data, 24 x 24, 8-bit/color RGBA, non-interlaced
/home/hossein/.config/libreoffice/4/cache/breeze_dark_svg/200/res/odb_32_8.png: PNG image data, 66 x 66, 8-bit/color RGBA, non-interlaced
/home/hossein/.config/libreoffice/4/cache/breeze_dark_svg/200/res/odf_32_8.png: PNG image data, 66 x 66, 8-bit/color RGBA, non-interlaced
/home/hossein/.config/libreoffice/4/cache/breeze_dark_svg/200/res/odg_16_8.png: PNG image data, 34 x 34, 8-bit/color RGBA, non-interlaced
/home/hossein/.config/libreoffice/4/cache/breeze_dark_svg/200/res/odg_32_8.png: PNG image data, 66 x 66, 8-bit/color RGBA, non-interlaced
/home/hossein/.config/libreoffice/4/cache/breeze_dark_svg/200/res/odp_16_8.png: PNG image data, 34 x 34, 8-bit/color RGBA, non-interlaced
/home/hossein/.config/libreoffice/4/cache/breeze_dark_svg/200/res/odp_32_8.png: PNG image data, 66 x 66, 8-bit/color RGBA, non-interlaced
/home/hossein/.config/libreoffice/4/cache/breeze_dark_svg/200/res/odp_48_8.png: PNG image data, 98 x 98, 8-bit/color RGBA, non-interlaced
/home/hossein/.config/libreoffice/4/cache/breeze_dark_svg/200/res/ods_16_8.png: PNG image data, 34 x 34, 8-bit/color RGBA, non-interlaced
/home/hossein/.config/libreoffice/4/cache/breeze_dark_svg/200/res/ods_32_8.png: PNG image data, 66 x 66, 8-bit/color RGBA, non-interlaced
/home/hossein/.config/libreoffice/4/cache/breeze_dark_svg/200/res/ods_48_8.png: PNG image data, 98 x 98, 8-bit/color RGBA, non-interlaced
/home/hossein/.config/libreoffice/4/cache/breeze_dark_svg/200/res/odt_16_8.png: PNG image data, 34 x 34, 8-bit/color RGBA, non-interlaced
/home/hossein/.config/libreoffice/4/cache/breeze_dark_svg/200/res/odt_32_8.png: PNG image data, 66 x 66, 8-bit/color RGBA, non-interlaced
/home/hossein/.config/libreoffice/4/cache/breeze_dark_svg/200/res/odt_48_8.png: PNG image data, 98 x 98, 8-bit/color RGBA, non-interlaced
/home/hossein/.config/libreoffice/4/cache/breeze_dark_svg/200/res/plus.png: PNG image data, 24 x 24, 8-bit/color RGBA, non-interlaced
/home/hossein/.config/libreoffice/4/cache/breeze_dark_svg/200/res/recentdoc_remove_highlighted.png: PNG image data, 50 x 50, 8-bit/color RGBA, non-interlaced
/home/hossein/.config/libreoffice/4/cache/breeze_dark_svg/200/res/recentdoc_remove.png: PNG image data, 50 x 50, 8-bit/color RGBA, non-interlaced
/home/hossein/.config/libreoffice/4/cache/breeze_dark_svg/200/res/reload.png: PNG image data, 34 x 34, 8-bit/color RGBA, non-interlaced
/home/hossein/.config/libreoffice/4/cache/breeze_dark_svg/200/res/sx03123.png: ...

Read more...

Revision history for this message
In , Vstuart-foote (vstuart-foote) wrote :

(In reply to Hossein from comment #8)
> This is the result from my system:
>
> $ file ~/.config/libreoffice/4/cache/breeze_dark_svg/200/res/*.png

So the SVG *are* being resampled and scaled 200% into a new set of scale appropriate PNG icons correctly, but then are not being used by the DE as the UI is scaled.

Revision history for this message
In , Caolanm (caolanm) wrote :
Changed in libreoffice (Ubuntu):
status: Confirmed → In Progress
importance: Undecided → Medium
Revision history for this message
In , Libreoffice-commits (libreoffice-commits) wrote :

Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Related: tdf#144583 move current lok hidpi icon thing into SalGraphics

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.

Revision history for this message
In , Libreoffice-commits (libreoffice-commits) wrote :

Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: tdf#144583 reuse lok hidpi icon scheme for gtk

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.

Revision history for this message
In , Hossein-7 (hossein-7) wrote :

(In reply to Caolán McNamara from comment #10)
> https://gerrit.libreoffice.org/c/core/+/139944 +
> https://gerrit.libreoffice.org/c/core/+/139945
> give me good results

Thank you for the quick fix, Caolán!

It worked fine for me on HiDPI and 2x integer scaling, after you have merged the above two patches:

Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: d480af79c6d67341e650a5b920bf66c2865309e0
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Note: I haven't tested the fixes extensively with fractional scaling.

Revision history for this message
In , Caolanm (caolanm) wrote :

Seeing as the original report was with svg lets call this fixed then, and backport to 7-4 is in gerrit. Maybe for the png case it would be nicer to have the pngs available in different sizes to begin with so a suitable size would be available rather than upscaling a smaller one, or maybe svg only is the right way to go eventually.

Revision history for this message
In , Hossein-7 (hossein-7) wrote :

Verifying the fix with the above commits, as I described in comment 13.

I think sticking to SVG is the better approach, because of the use of fractional scaling leads to multiple/unknown icon sizes.

Changed in df-libreoffice:
importance: Unknown → Medium
status: Unknown → Fix Released
Revision history for this message
In , Libreoffice-commits (libreoffice-commits) wrote :

Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

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

Resolves: tdf#144583 reuse lok hidpi icon scheme for gtk

It will be available in 7.4.2.

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.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.