Bug 163086 - The "Pin" button is huge after updating
Summary: The "Pin" button is huge after updating
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
24.8.1.2 release
Hardware: Other All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard: target:25.2.0 target:24.8.2 target:24...
Keywords:
: 156555 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-09-21 19:09 UTC by Ethan Shafer
Modified: 2024-09-23 11:36 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Big Pins (541.23 KB, image/png)
2024-09-21 19:11 UTC, Ethan Shafer
Details
Snapshot with fix in patch https://gerrit.libreoffice.org/c/core/+/173765 (148.53 KB, image/png)
2024-09-22 13:52 UTC, Patrick (volunteer)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ethan Shafer 2024-09-21 19:09:39 UTC
Description:
I installed LibreOffice 24.8.1.2 then after opening it, the "Pin" button was huge.

Steps to Reproduce:
1.Open LibreOffice version 24.8.1
2.Click help
3.Check for updates
4.Install version 24.8.1.2
5.Open it

Actual Results:
The "Pin" button was big.

Expected Results:
It should not have had a big pin and should have updated normally.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 24.8.1.2 (X86_64) / LibreOffice Community
Build ID: 87fa9aec1a63e70835390b81c40bb8993f1d4ff6
CPU threads: 4; OS: macOS 13.7; UI render: Skia/Metal; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 1 Ethan Shafer 2024-09-21 19:11:17 UTC
Created attachment 196595 [details]
Big Pins
Comment 2 Patrick (volunteer) 2024-09-21 21:15:11 UTC
Looks like this bug is caused by my commit f4ef5435df5560e6b6b061ce4053c71e2819bf51. That commit increases the resolution of SVG toolbar icons but, in this particular case, the commit causes the SVG to be draw at a larger size rather than at a higher resolution.

I'll investigate and post again when I have any news.
Comment 3 m_a_riosv 2024-09-21 22:04:04 UTC
It happens also with Win11
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 5b54f68599d9a9b6f4d21fd8c0cdac746ea71ecb
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded
Comment 4 Patrick (volunteer) 2024-09-21 22:09:48 UTC
(In reply to Patrick (volunteer) from comment #2)
> Looks like this bug is caused by my commit
> f4ef5435df5560e6b6b061ce4053c71e2819bf51. That commit increases the
> resolution of SVG toolbar icons but, in this particular case, the commit
> causes the SVG to be draw at a larger size rather than at a higher
> resolution.
> 
> I'll investigate and post again when I have any news.

Correction: this bug exists in LibreOffice 24.2.5.2 so the bug predates my commit and commit f4ef5435df5560e6b6b061ce4053c71e2819bf51 is not the cause of this bug.

What I did find is that this bug only occurs when the icon set is set to an SVG icon set. If you use a PNG icon set, no bug.

So the next question is why is the SVG pin icon (res/recentdoc_pin.svg) drawn twice as big as the matching PNG icons? It does not seem to be influenced by the window scale factor as I disabled Retina display code in LibreOffice by running it from the command line after invoking "export SAL_FORCE_HIDPI_SCALING=1" and this "double sized pin icon" bug still occurs.
Comment 5 Telesto 2024-09-22 10:35:55 UTC
*** Bug 156555 has been marked as a duplicate of this bug. ***
Comment 6 Patrick (volunteer) 2024-09-22 13:52:05 UTC
Created attachment 196607 [details]
Snapshot with fix in patch https://gerrit.libreoffice.org/c/core/+/173765

I have implemented a fix for this bug in the following patch. For some unkown reason, the viewport in the SVG pin icons in most icon sets is set to 64x64 pixels. So I just downscale any large icons to 24x24 (i.e. the same size as the PNG pin icons):

https://gerrit.libreoffice.org/c/core/+/173765
Comment 7 Commit Notification 2024-09-22 15:15:17 UTC
Patrick Luby committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/13a42d5c2d433da6c2c69159bfc6df0e37643333

tdf#163086 downscale excessively large pinned document icons

It will be available in 25.2.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 Patrick (volunteer) 2024-09-22 15:17:42 UTC
I have committed my fix for this bug. The fix should be in tomorrow's (23 September 2024) nightly master builds:

https://dev-builds.libreoffice.org/daily/master/current.html

Notes for macOS testers:

The nightly master build installer does not overwrite any LibreOffice official versions. Instead, it will be installed as a separate application called "LibreOfficeDev" in the /Applications folder.

Because this is a "test" build, you will need to do the following steps before you launch the LibreOfficeDev application:

1. Go to the Finder and navigate to the /Applications/Utilities folder
2. Launch the "Terminal" application
3. Paste the following command in the Terminal application window and press the Return key to execute the command:

   xattr -d com.apple.quarantine /Applications/LibreOfficeDev.app
Comment 9 Patrick (volunteer) 2024-09-22 22:12:43 UTC
Update: while my fix worked, the following patch which corrects the viewport size in each of the SVG pin icons is in the works:

https://gerrit.libreoffice.org/c/core/+/173774
Comment 10 Commit Notification 2024-09-23 04:34:45 UTC
Ilmari Lauhakangas committed a patch related to this issue.
It has been pushed to "master":

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

tdf#163086 Resize SVG pin icons to 24x24 and clean them up

It will be available in 25.2.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 2024-09-23 07:20:06 UTC
Ilmari Lauhakangas committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/65773351521b0a3c84d34915e5b0537610effc40

tdf#163086 Resize SVG pin icons to 24x24 and clean them up

It will be available in 24.8.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.
Comment 12 Xisco Faulí 2024-09-23 07:47:55 UTC
(In reply to Patrick (volunteer) from comment #9)
> Update: while my fix worked, the following patch which corrects the viewport
> size in each of the SVG pin icons is in the works:
> 
> https://gerrit.libreoffice.org/c/core/+/173774

Hi Patrick,
Should your patch be reverted then ?
Comment 13 Buovjaga 2024-09-23 11:36:41 UTC
(In reply to Xisco Faulí from comment #12)
> (In reply to Patrick (volunteer) from comment #9)
> > Update: while my fix worked, the following patch which corrects the viewport
> > size in each of the SVG pin icons is in the works:
> > 
> > https://gerrit.libreoffice.org/c/core/+/173774
> 
> Hi Patrick,
> Should your patch be reverted then ?

It was reverted as part of my patch toward 25.2.
Comment 14 Commit Notification 2024-09-23 11:36:59 UTC
Ilmari Lauhakangas committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/6336572021f4faf8ef3847380f0df5c4f2c1356e

tdf#163086 Resize SVG pin icons to 24x24 and clean them up

It will be available in 24.2.7.

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.