https://bugs.documentfoundation.org/show_bug.cgi?id=145080

--- Comment #22 from Mike Kaganski <mikekagan...@hotmail.com> ---
(In reply to steve from comment #18)
> macOS uses
> - Accent colour (defaults to blue)
> - Highlight colour (defaults to light blue)
> 
> ...
> 
> LO currently uses macOS 10.13 as target. macOS 10.13 has no understanding of
> accent color. So when build target will be raised to macOS 10.14 it will be
> possible to utilize Accent color.

I see this code in electron [1] (MIT license) Objective C++ file:

std::string SystemPreferences::GetAccentColor() {
  NSColor* sysColor = nil;
  if (@available(macOS 10.14, *))
    sysColor = [NSColor controlAccentColor];

  return ToRGBAHex(skia::NSSystemColorToSkColor(sysColor),
                   false /* include_hash */);
}

I see a discussion about run-time API availability check [2], mentioning that
it is introduced in XCode 9 (our baseline is 12.5 [3]).

This is the related documentation from Apple [4], [5].

It *seems* to me that we have everything required to make it work on systems
that support the accent color, without bumping requirements (which should
happen ~soon anyway, IIUC).

[1]
https://github.com/electron/electron/blob/bd10b19b0cdc46cdbadb570af89305e64541b679/shell/browser/api/electron_api_system_preferences_mac.mm#L374
[2]
https://stackoverflow.com/questions/34013293/why-does-objective-c-not-have-api-availability-checking
[3] https://opengrok.libreoffice.org/xref/core/README.md?r=3469f697#42
[4]
https://developer.apple.com/documentation/swift/objective-c_and_c_code_customization/marking_api_availability_in_objective-c
[5]
https://developer.apple.com/documentation/appkit/nscolor/3000782-controlaccentcolor

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to