[TxMt] Re: 10.14 / Mojave Dark Mode
Jacob Carlborg
doob at me.com
Sat Oct 6 08:48:12 UTC 2018
> On 5 Oct 2018, at 10:25, Allan Odgaard <mailinglist at textmate.org> wrote:
> There are no semantic colors for gradients or even highlighted search results as in Jason’s screenshot.
>
> And I am not aware of how we can introduce our own semantic colors without asset catalogs, as the RGB value of a semantic color is not resolved until it is being used (i.e. have a graphics context), but there does not appear to be an NSColor API for this (beyond set, but probably can’t rely on that working 100% of the time, e.g. when other colors are derived from the base color).
>
I’m not expert on this subject but I did have a look at the “Advance Dark Mode” WWDC video [1]. If the asset catalog or the built-in dynamic colors are not flexible enough a view can do appearance sensitive work in the following methods: “updateConstraints", "layout", "draw:dirtyRect" and "updateLayer”. The current appearance can be queried using “effectiveAppearance” and “bestMatch” can be used on the returned appearance.
But if you can upgrade Xcode to a later version it would be much simpler.
[1] https://developer.apple.com/videos/play/wwdc2018/218/
--
/Jacob Carlborg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20181006/44a43396/attachment.html>
More information about the textmate
mailing list