Bug 120425 - Different icon sizes for different filetypes inserted as icons
Summary: Different icon sizes for different filetypes inserted as icons
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard: target:7.4.0
Keywords:
Depends on:
Blocks: OLE-Objects
  Show dependency treegraph
 
Reported: 2018-10-08 15:57 UTC by Mike Kaganski
Modified: 2023-11-07 23:56 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot: comparison of different filetypes' icon sizes (6.34 KB, image/png)
2018-10-08 15:57 UTC, Mike Kaganski
Details
Object inserted in WPS Office use huge icons (75.15 KB, image/png)
2022-03-30 16:00 UTC, Rizal Muttaqin
Details
Image inserted as OLE in Galaxy use 32px (40.32 KB, image/png)
2022-03-30 16:10 UTC, Rizal Muttaqin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2018-10-08 15:57:45 UTC
Created attachment 145479 [details]
Screenshot: comparison of different filetypes' icon sizes

1. Insert→Object→OLE Object...
2. Choose "Create from file", check "Display as icon" ("Link to file" status doesn't matter)
3. Select an ODS document, or an ODT document, then OK.
4. Repeat steps 1-2; select an DOC(X) or XLS(X) document, OK.

The icon added to the document on step 3 will be smaller than that is added on step 5 (see the screenshot). They should be equal. I suppose that there is possibly some difference in available icon sizes in respective icon resources; since all these icons are LibreOffice-provided (they have LO logo, and don't depend upon OS or if MS Office is also installed on the box), this should be LibreOffice problem.

Tested with Version: 6.1.2.1 (x64)
Build ID: 65905a128db06ba48db947242809d14d3f9a93fe
CPU threads: 12; OS: Windows 10.0; UI render: GL; 
Locale: ru-RU (ru_RU); Calc: CL

and also with Version: 6.1.2.1
Build ID: 1:6.1.2~rc1-0ubuntu0.18.04.1
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3;
Locale: en-US (en_US.UTF-8); Calc:
Comment 1 Buovjaga 2018-10-27 16:48:15 UTC
Repro with Colibre, but not with Tango.
Got a crash with master, have to check it tomorrow.

Arch Linux 64-bit
Version: 6.1.2.1
Build ID: 6.1.2-1
CPU threads: 8; OS: Linux 4.18; UI render: default; VCL: gtk3_kde5; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group threaded
Comment 2 QA Administrators 2019-10-28 03:29:01 UTC Comment hidden (obsolete)
Comment 3 Mike Kaganski 2019-10-28 06:28:39 UTC
Still repro with Version: 6.4.0.0.alpha1+ (x64)
Build ID: c0b8be4d7eb9fa1a0d8abfb1d27c71ac34bffd1b
CPU threads: 12; OS: Windows 10.0 Build 18362; UI render: GL; VCL: win; 
Locale: ru-RU (ru_RU); UI-Language: en-US
Calc: CL
Comment 4 Rizal Muttaqin 2022-03-29 15:15:18 UTC
Reproducible with Colibre

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 2816f498505bab01bc0f17ef0962ece663c607c9
CPU threads: 8; OS: Linux 5.13; UI render: default; VCL: kf5 (cairo+xcb)
Locale: id-ID (id_ID.UTF-8); UI: en-US
Calc: threaded

Any design part which should be updated?
Comment 5 Mike Kaganski 2022-03-29 15:17:59 UTC
(In reply to Rizal Muttaqin from comment #4)

Could you please tell which specific icons (filenames) are those? And what is different wrt those filenames compared to Tango (comment 0)?
Comment 6 Rizal Muttaqin 2022-03-29 15:27:00 UTC
(In reply to Mike Kaganski from comment #5)
> (In reply to Rizal Muttaqin from comment #4)
> 
> Could you please tell which specific icons (filenames) are those? And what
> is different wrt those filenames compared to Tango (comment 0)?

Just tried Galaxy and the issue is reproducible also. I guess some icons that being used from Galaxy reference:
- ODT: res/lx03251.png (26px)
- ODS: res/lx03250.png (26px)
- XLSX: res/lx03188.png or res/lx03126.png (?) (32px)
- DOCX: res/lx03162.png or res/lx03156.png (?) (32px)


Here come the confusion. Does lx* files are supposed to be 24px (Galaxy use 26px instead of 24px in their large size variants) or 32px? This is my long question actually
Comment 7 Rizal Muttaqin 2022-03-29 15:34:23 UTC
(In reply to Mike Kaganski from comment #5)
> (In reply to Rizal Muttaqin from comment #4)
> 
> Could you please tell which specific icons (filenames) are those? And what
> is different wrt those filenames compared to Tango (comment 0)?

For Tango

- ODT: res/lx03251.png (24px)
- ODS: res/lx03250.png (24px)
- XLSX: res/lx03126.png (24px) which has same exact appearance with res/lx03127.png. But from Galaxy reference, I can say lx03126.png is the file
- DOCX: res/lx03162.png (24px)
Comment 8 Mike Kaganski 2022-03-29 15:35:03 UTC
(In reply to Rizal Muttaqin from comment #6)
> Does lx* files are supposed to be 24px (Galaxy use 26px instead of 24px in
> their large size variants) or 32px? This is my long question actually

https://opengrok.libreoffice.org/xref/core/svtools/source/misc/imagemgr.cxx?r=60eaa424#505 (and its respective BMP_* constants defined in https://opengrok.libreoffice.org/xref/core/svtools/inc/bitmaps.hlst?r=60eaa424) suggests that lx are 24/26 pixels (and the 24/26 is documented at https://opengrok.libreoffice.org/xref/core/include/vcl/vclenum.hxx?r=2f4f4cbe&fi=Size26#320).
Comment 9 Rizal Muttaqin 2022-03-29 15:38:20 UTC
(In reply to Mike Kaganski from comment #8)

> https://opengrok.libreoffice.org/xref/core/include/vcl/vclenum.
> hxx?r=2f4f4cbe&fi=Size26#320).

Likely 26px should be updated as now all icon themes are using 24px instead. But it's another topic.
Comment 10 Adolfo Jayme Barrientos 2022-03-30 12:07:06 UTC
(Back in 2019, I wrote in commit bea44e5c1b982d05314b72452b94fe288071a496 that the canonical size should be 24 × 24. It’s a logical value that has precedence in Linux icon themes, and I’ve never known why Sun decided on a seemingly random value of 26 pixels.)
Comment 11 Commit Notification 2022-03-30 14:12:58 UTC
Rizal Muttaqin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/95e85730ad850a66879a639d9f5936fa67549ab7

Colibre: tdf#120425 equalize icon dimensions

It will be available in 7.4.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 Rizal Muttaqin 2022-03-30 16:00:18 UTC
Created attachment 179220 [details]
Object inserted in WPS Office use huge icons

Just curious, do we need too enlarge the icon? The 24px for me is too tiny for a OLE OBJECT document icon inserted?
Comment 13 Rizal Muttaqin 2022-03-30 16:10:32 UTC
Created attachment 179221 [details]
Image inserted as OLE in Galaxy use 32px

(In reply to Rizal Muttaqin from comment #12)

> Just curious, do we need too enlarge the icon? The 24px for me is too tiny
> for a OLE OBJECT document icon inserted?

Galaxy as the main fallback in the past use 32px (lx03125.png) for inserted OLE Object image  type. This size more suitable for me, not too large nor too tiny. But how we deal with lx* file? Mike you said that the file is supposed to be 24 px? So why some of res/lx* Galaxy icons are 32px? I think we should have an agreement here 

- What are proper/the best icon dimension size for the embedded OLE Object file?
- Do all lx* files have to be 24px? If there is a 32px size, do we need to define it in the coding section, for example an xlx* image with a size of 32px.
Comment 14 Mike Kaganski 2022-03-30 16:22:29 UTC
(In reply to Rizal Muttaqin from comment #13)

This is not related to this bug. If needed, please file another one.
Specifically, the icons that you fixed, you fixed *correctly* to 24px. Your question is related to "do we want to use *these* icons for inserted objects, or should we use lxNNN_32 variants instead?".