Bug 168610 - Dark mode application icon (and clear and tinted) needed for macOS 26 Tahoe
Summary: Dark mode application icon (and clear and tinted) needed for macOS 26 Tahoe
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All macOS (All)
: medium normal
Assignee: Heiko Tietze
URL:
Whiteboard: target:26.2.0 target:25.8.3
Keywords: needsDevEval
Depends on:
Blocks: macOS-Dark-Mode
  Show dependency treegraph
 
Reported: 2025-09-29 13:00 UTC by Wim M
Modified: 2025-10-13 16:37 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of dock with LibreOffice icon, icon & widget style set to "Dark" (819.04 KB, image/png)
2025-09-29 13:02 UTC, Wim M
Details
Screenshot of dock with LibreOffice icon, icon & widget style set to "Clear" (759.23 KB, image/png)
2025-09-29 13:02 UTC, Wim M
Details
Screenshot of dock with LibreOffice icon, icon & widget style set to "Tinted" (953.65 KB, image/png)
2025-09-29 13:03 UTC, Wim M
Details
NeoOffice and Word app icons - Dark appearance (293.61 KB, image/png)
2025-10-02 13:56 UTC, Patrick (volunteer)
Details
NeoOffice and Word app icons - Dark appearance (294.83 KB, image/png)
2025-10-02 13:57 UTC, Patrick (volunteer)
Details
Modified icon (63.87 KB, image/x-icns)
2025-10-06 11:26 UTC, Heiko Tietze
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wim M 2025-09-29 13:00:47 UTC
Description:
macOS 26 Tahoe has introduced new icon and widget styles: default, dark, clear and tinted. Apparently, the latest LibreOffice release version (25.8.1.1) does not have an application icon to accommodate these styles. This makes the LibreOffice app icon stand out in the dock and elsewhere, and not in a nice way.

Steps to Reproduce:
1. Install LibreOffice on macOS
2. Go to System Settings > Appearance
3. For "icon and widget style", choose "Dark", "Clear", or "Tinted"
4. Observe the LibreOffice app icon in the Dock.

Actual Results:
The LibreOffice application icon stays on default.

Expected Results:
The LibreOffice application icon should change in accordance with the user preference.


Reproducible: Always


User Profile Reset: No

Additional Info:
I was somewhat surprised not to find this bug reported already, not even under meta bug 118017.
Comment 1 Wim M 2025-09-29 13:02:13 UTC
Created attachment 203030 [details]
Screenshot of dock with LibreOffice icon, icon & widget style set to "Dark"
Comment 2 Wim M 2025-09-29 13:02:34 UTC
Created attachment 203032 [details]
Screenshot of dock with LibreOffice icon, icon & widget style set to "Clear"
Comment 3 Wim M 2025-09-29 13:03:00 UTC
Created attachment 203033 [details]
Screenshot of dock with LibreOffice icon, icon & widget style set to "Tinted"
Comment 4 Heiko Tietze 2025-10-01 08:11:17 UTC
Patrick, do you see an easy way to switch the MIME type icons?
Comment 5 Patrick (volunteer) 2025-10-01 16:57:48 UTC
(In reply to Heiko Tietze from comment #4)
> Patrick, do you see an easy way to switch the MIME type icons?

I don't think any LibreOffice code needs to change. I think we only need to do the following

1. Replace the current main.icns file included in the LibreOffice installation's Contents/Resources folder with a new AppIcon.icns
2. Include a new Assets.car file the Contents/Resources folder
3. Replace the CFBundleIconFile entry in the Contents/Info.plist file with the following 2 entries:
    <key>CFBundleIconFile</key>
    <string>AppIcon</string>
    <key>CFBundleIconName</key>
    <string>AppIcon</string>

Currently, it looks like the main.icns file is created in the sysui/Package_osxicons.mk makefile using a bunch of .svg files and the iconutil command. But I don't know what would need to change there to assemble any new images into an AppIcon.icns and Assets.car files though.
Comment 6 Patrick (volunteer) 2025-10-01 17:23:21 UTC
I forgot to mention that I was able to copy TextEdit's app icon files into my macOS Tahoe LibreOffice master build using the following steps. Note: the "." folder is the top of the LibreOffice source tree:

1. cp /System/Applications/TextEdit.app/Contents/Resources/AppIcon.icns ./instdir/LibreOfficeDev.app/Contents/Resources

2. cp /System/Applications/TextEdit.app/Contents/Resources/Assets.car ./instdir/LibreOfficeDev.app/Contents/Resources

3. Open the ./instdir/LibreOfficeDev.app/Contents/Info.plist file in a text editor and replace the following lines:

    <key>CFBundleIconFile</key>
    <string>main.icns</string>

with the following lines:

    <key>CFBundleIconFile</key>
    <string>AppIcon</string>
    <key>CFBundleIconName</key>
    <string>AppIcon</string>

4. touch ./instdir/LibreOfficeDev.app
5. open -a ./instdir/LibreOfficeDev.app

LibreOffice now has TextEdit's app icons and changing "Icon & widget style" in the System Settings application works. So I think I found all of the files that we would need to ship.
Comment 7 Heiko Tietze 2025-10-02 11:00:57 UTC
(In reply to Patrick (volunteer) from comment #5)
> 1. Replace the current main.icns file included in the LibreOffice
> installation's Contents/Resources folder with a new AppIcon.icns
TextEdit has only one color in the AppIcon.icns, and MSO has no such file at all in the Resources. How can macOS turn a white background into dark?

> 2. Include a new Assets.car file the Contents/Resources folder
Totally unclear to me what needs to go into this file. assetutil -I on the extracted *car file from TextEdit fails with "is not a BOMStorage file".
Comment 8 Heiko Tietze 2025-10-02 11:54:36 UTC
Some resources:

https://successfulsoftware.net/category/software/
https://www.hendrik-erz.de/post/supporting-liquid-glass-icons-in-apps-without-xcode
https://www.alansiu.net/2023/04/24/extracting-icons-from-assets-car-on-macos/

I still struggle to understand the light/dark conversion. The icon itself needs perhaps some transparent regions.
Comment 9 Patrick (volunteer) 2025-10-02 13:51:23 UTC
(In reply to Heiko Tietze from comment #8)
> I still struggle to understand the light/dark conversion. The icon itself
> needs perhaps some transparent regions.

I think you are right. When running Word from the Mac App Store on my machine, the white areas in the Word app icon change with the system setting.

But even though Word has a Contents/Resources/Asset.car file, it does *not* have a CFBundleName entry in Contents/Info.plist so I thought maybe Word doesn't have more than one app icon and macOS is just transforming colors in the app icon.

So I used the following steps to *only* replace LibreOffice's main.icns file and it worked:

1. cp /Applications/Microsoft\ Word.app/Contents/Resources/MSWD.icns ./instdir/LibreOfficeDev.app/Contents/Resources/main.icns
2. touch ./instdir/LibreOfficeDev.app
3. open ./instdir/LibreOfficeDev.app

I'll post some screen snapshots but from my above experiment, it appears that Word does not use the Assets.car file for its app icon. Hopefully that is good news.

So what I don't understand is why the white background gets changed when using Word's MSWD.icns but LibreOffice's white background does not change. Interestingly, NeoOffice's app icon will change with the system settings, but the transparent areas in its icon are gray when the system settings is "default".
Comment 10 Patrick (volunteer) 2025-10-02 13:56:32 UTC
Created attachment 203108 [details]
NeoOffice and Word app icons - Dark appearance

Note that Word icon has white background, but NeoOffice has gray background in its transparent areas.
Comment 11 Patrick (volunteer) 2025-10-02 13:57:19 UTC
Created attachment 203109 [details]
NeoOffice and Word app icons - Dark appearance

Note that Word icon has very dark background, but NeoOffice has only a dark gray background in its transparent areas.
Comment 12 Patrick (volunteer) 2025-10-02 14:09:54 UTC
OK. I might have found something. I opened the app icons for LibreOffice, Thunderbird, and Word.

Using the /Applications/Utilies/Digital Color Monitor application, it appears that the background in Word's app icon is pure white (i.e. RBG = 1.0, 1.0, 1.0).

In contrast, the background in LibreOffice's and Thunderbird's app icons (neither of which change with the system setting) are nearly white but have a slight gray tint (e.g. RBG = 0.96, 0.96, 0.96).

So maybe we just need to change the background slightly in LibreOffice's app icon?
Comment 13 Dennis Roczek 2025-10-02 14:13:29 UTC
But why does NeoOffice changes the color then?
Comment 14 Patrick (volunteer) 2025-10-02 14:29:22 UTC
(In reply to Dennis Roczek from comment #13)
> But why does NeoOffice changes the color then?

That is part of the mystery. I know that NeoOffice's .icns is from .png files that have transparent pixels around the edges. So macOS sets its background color just like how Apple's Preview application does. But LibreOffice, Thunderbird, and Word are opaque images AFAICT.

The problem is I am not a graphic designer so I don't have the tools you edit pixels. So I am not sure what the next step is.
Comment 15 Heiko Tietze 2025-10-06 11:26:39 UTC
Created attachment 203161 [details]
Modified icon

Tested with icons where the outer white decoration was removed: the app icon is still using white. The changed variant is effective on the Finder preview - and the icon follows the system settings.
Comment 16 Patrick (volunteer) 2025-10-06 16:40:58 UTC
(In reply to Heiko Tietze from comment #15)
> Created attachment 203161 [details]
> Modified icon
> 
> Tested with icons where the outer white decoration was removed: the app icon
> is still using white. The changed variant is effective on the Finder preview
> - and the icon follows the system settings.

That seems to work. But because I have a Retina display, I had to create extract the icon_256x256.png from your attached main.icns and to the following image in my build to see it:

sysui/desktop/icons/macos/app-launcher/main.iconset/icon_128x128@2x.png

So, if you can update all of the .png files in the sysui/desktop/icons/macos/app-launcher/main.iconset folder, that should hopefully be enough to fix this bug.
Comment 17 Heiko Tietze 2025-10-07 06:42:23 UTC
(In reply to Patrick (volunteer) from comment #16)
> That seems to work.
Woot! And why not for me? All icons specified in the make file need to be present during build. Do you mean 64px instead of 128?
Comment 18 Heiko Tietze 2025-10-07 08:31:56 UTC
(In reply to Heiko Tietze from comment #17)
> (In reply to Patrick (volunteer) from comment #16)
> > That seems to work.
It does, after make clean.
Comment 19 Commit Notification 2025-10-07 10:46:27 UTC
Heiko Tietze committed a patch related to this issue.
It has been pushed to "master":

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

Resolves tdf#168610 - MacOS main icon should respond to icon style

It will be available in 26.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 20 Wim M 2025-10-07 11:05:54 UTC
Thanks for the quick fix! Will it also be backported to the current two branches?
Comment 21 Patrick (volunteer) 2025-10-07 12:38:08 UTC
(In reply to Heiko Tietze from comment #17)
> (In reply to Patrick (volunteer) from comment #16)
> > That seems to work.
> Woot! And why not for me? All icons specified in the make file need to be
> present during build. Do you mean 64px instead of 128?

Ignore my comments from yesterday. I was splicing your attached main.icns (which was missing all of the @2x.png variants) instead of your Gerrit patch.

I have rebuilt with your committed patch and I can confirm that your fix works.

Note: I didn't need to do a clean rebuild. I only needed to "touch ./instdir/LibreOfficeDev.app" after rebuilding to get the icon changes to appear in the macOS Dock.
Comment 22 Patrick (volunteer) 2025-10-07 12:42:01 UTC
(In reply to Wim M from comment #20)
> Thanks for the quick fix! Will it also be backported to the current two
> branches?

I have submitted a backport in the following link. It is too late to include in LibreOffice 25.8.2 so hopefully it will be included in LibreOffice 25.8.3:

https://gerrit.libreoffice.org/c/core/+/192042

In the meantime, you can test @Heiko's fix in tomorrow's (08 October 2025) nightly master builds:

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

Note 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 23 Commit Notification 2025-10-07 13:52:00 UTC
Heiko Tietze committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

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

Resolves tdf#168610 - MacOS main icon should respond to icon style

It will be available in 25.8.3.

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.