Bug 156854 - Menu icons are broken on macOS with Skia
Summary: Menu icons are broken on macOS with Skia
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
24.2.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Patrick (volunteer)
URL:
Whiteboard: target:24.2.0
Keywords: regression
Depends on:
Blocks: Skia-macOS
  Show dependency treegraph
 
Reported: 2023-08-22 04:11 UTC by ⁨خالد حسني⁩
Modified: 2024-06-17 11:31 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot (92.68 KB, image/png)
2023-08-22 09:02 UTC, ⁨خالد حسني⁩
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ⁨خالد حسني⁩ 2023-08-22 04:11:18 UTC
When Skia is enable, menu icons on macOS are rendered as hallowed rectangles. This might be related to bug 156853, but it happens only when Skia is used (while bug 156853 happens all the time).
Comment 1 steve 2023-08-22 08:55:25 UTC
Could you provide a screenshot as well as exact macOS and LibreOffice versions you are using.
Comment 2 ⁨خالد حسني⁩ 2023-08-22 09:02:26 UTC
Created attachment 189091 [details]
Screenshot

This is freshly built master:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 31a30cc87c31423e135d24bf46f2eadcd326c655
CPU threads: 6; OS: Mac OS X 13.4.1; UI render: Skia/Metal; VCL: osx
Locale: en-EG (en_EG.UTF-8); UI: en-US
Calc: threaded
Comment 3 Telesto 2023-08-22 22:57:45 UTC
Confirm
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: e60ef8651cfb30335471d1622e58c13eebc7d58b
CPU threads: 8; OS: Mac OS X 13.4.1; UI render: Skia/Metal; VCL: osx
Locale: nl-NL (nl_NL.UTF-8); UI: en-US
Calc: threaded
Comment 4 Patrick (volunteer) 2023-08-22 23:08:56 UTC
(In reply to ⁨خالد حسني⁩ from comment #0)
> When Skia is enable, menu icons on macOS are rendered as hallowed
> rectangles. This might be related to bug 156853, but it happens only when
> Skia is used (while bug 156853 happens all the time).

I think you are right: it sure looks like it is another case of an alpha mask that needs to be inverted.

This bug does not occur in LibreOffice 7.6.0.3 so it is likely due to the recent transparency->alpha patch.

I can take a look at it tomorrow.
Comment 5 Commit Notification 2023-08-23 14:49:04 UTC
Patrick Luby committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2f5bc5989bab384fee066d0346eb7312f4a58d2a

tdf#156854 invert alpha mask for macOS native menu item images

It will be available in 24.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 6 steve 2023-08-27 13:25:56 UTC
What is the status here?
@خالد حسني⁩ / @Telesto: where you able to test the fix?

Oddly enough I am unable to reproduce broken menu icons when looking at recent documents in this 4 days (should be pre-patch) build:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: b5aaf194866c5e416167cb54d37f9f04dabc5375
CPU threads: 8; OS: Mac OS X 13.5.1; UI render: Skia/Metal; VCL: osx
Locale: en-US (en_DE.UTF-8); UI: en-US
Calc: threaded
Comment 7 Patrick (volunteer) 2023-08-27 13:30:59 UTC
I forgot to mark this as Resolved/Fixed after I committed a fix.