10.14 / Mojave Dark Mode

classic Classic list List threaded Threaded
30 messages Options
12
Reply | Threaded
Open this post in threaded view
|

10.14 / Mojave Dark Mode

jason
Are people using TextMate with Dark Mode? I see some issues with reading text (find input text is black until unfocused, then changes to white), but also curiously the icons in the outline view are also missing.

Screen Shot 2018-10-04 at 8.04.30 PM.png


_______________________________________________
textmate mailing list
[hidden email]
https://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: 10.14 / Mojave Dark Mode

Bernhard Minatti
yes, i also use it in dark mode but face the same issues; in my case the upper folder in the file browser also has some kind of display issue.

nonetheless it’s great to finally have a dark filebrowser :-)


Am 05.10.2018 um 02:05 schrieb jason <[hidden email]>:

Are people using TextMate with Dark Mode? I see some issues with reading text (find input text is black until unfocused, then changes to white), but also curiously the icons in the outline view are also missing.

<Screen Shot 2018-10-04 at 8.04.30 PM.png>

_______________________________________________
textmate mailing list
[hidden email]
https://lists.macromates.com/listinfo/textmate



_______________________________________________
textmate mailing list
[hidden email]
https://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: 10.14 / Mojave Dark Mode

Michael Sheets-2
In reply to this post by jason
On Oct 4, 2018, at 7:05 PM, jason <[hidden email]> wrote:
>
> Are people using TextMate with Dark Mode? I see some issues with reading text (find input text is black until unfocused, then changes to white), but also curiously the icons in the outline view are also missing.

TextMate does not yet support dark mode, this will get added at some point in the future. With the official builds you will not get a dark mode with the system setting enabled, it is only in custom builds where you will get the halfway version as in the screenshots.

--
Michael Sheets – MacroMates Support

Tip of the Day: Use ⌃⌘T (control-command-T) to see a list of currently available bundle items, start typing to filter the list.

_______________________________________________
textmate mailing list
[hidden email]
https://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: 10.14 / Mojave Dark Mode

Jacob Carlborg
In reply to this post by jason

On 5 Oct 2018, at 02:05, jason <[hidden email]> wrote:

Are people using TextMate with Dark Mode? I see some issues with reading text (find input text is black until unfocused, then changes to white), but also curiously the icons in the outline view are also missing.

I’ve tried, but it doesn't look so good yet. For example my tabs are not dark as on your screen shot. Have you changed the source code?

-- 
/Jacob Carlborg



_______________________________________________
textmate mailing list
[hidden email]
https://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: 10.14 / Mojave Dark Mode

Allan Odgaard-4
In reply to this post by jason

On 5 Oct 2018, at 2:05, jason wrote:

Are people using TextMate with Dark Mode? I see some issues with reading
text (find input text is black until unfocused, then changes to white), but
also curiously the icons in the outline view are also missing.

I pushed a quick fix for the find dialog strings: https://github.com/textmate/textmate/commit/cae5eff55cd31788ab53bf2e84e65d75cdc21f80

Colors will still be wrong if you enable regular expression, you can set the theme used (for syntax highlight of find/replace strings) via the UIThemeUUID defaults key (requires relaunch after changing it) but it will currently render the theme’s background color, so this is not ideal and will require a bit more work.

The file icons are done with an NSImage subclass (this is required so we get proper behavior for retina screens etc.) and will likely have to be rewritten using new API to work with Mojave (I have no idea why our subclass breaks when building with the 10.14 SDK but NSImage is a bit iffy and if they have completely rewritten the internals for Mojave then I believe it wouldn’t be a first).

For the rest of the colors (gradients, find result highlights, etc.) we will need to move to asset catalogs, but I am in a bit of a pickle because I can’t do deployment builds with newer versions of Xcode, as they are prone to crash (numerous hours have been spent trying to track it down, but it relates to internal garbage collection of the NSOutlineView, so quite difficult to get any meaningful information from the crash logs), and colors in asset catalogs is not possible with the version of Xcode I am using.



_______________________________________________
textmate mailing list
[hidden email]
https://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: 10.14 / Mojave Dark Mode

Allan Odgaard-4
In reply to this post by Jacob Carlborg

On 5 Oct 2018, at 7:45, Jacob Carlborg wrote:

I’ve tried, but it doesn't look so good yet. For example my tabs are not dark as on your screen shot. Have you changed the source code?

Dark mode is supported for the tabs when building from master: https://github.com/textmate/textmate/commit/cf06fb3d947e7aee56a5ef76c93ac6c2fa96b89d



_______________________________________________
textmate mailing list
[hidden email]
https://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: 10.14 / Mojave Dark Mode

Jacob Carlborg

On 5 Oct 2018, at 09:38, Allan Odgaard <[hidden email]> wrote:

Dark mode is supported for the tabs when building from master: https://github.com/textmate/textmate/commit/cf06fb3d947e7aee56a5ef76c93ac6c2fa96b89d


Ok, cool. I haven’t looked at the git repository in a while.

-- 
/Jacob Carlborg



_______________________________________________
textmate mailing list
[hidden email]
https://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: 10.14 / Mojave Dark Mode

Jacob Carlborg
In reply to this post by Allan Odgaard-4

On 5 Oct 2018, at 09:35, Allan Odgaard <[hidden email]> wrote:

For the rest of the colors (gradients, find result highlights, etc.) we will need to move to asset catalogs, but I am in a bit of a pickle because I can’t do deployment builds with newer versions of Xcode, as they are prone to crash (numerous hours have been spent trying to track it down, but it relates to internal garbage collection of the NSOutlineView, so quite difficult to get any meaningful information from the crash logs), and colors in asset catalogs is not possible with the version of Xcode I am using.


Using asset catalogs would be nice but it’s still possible to do with just code. If you can use the semantic colors, with a fallback for when they’re not available, it would help as well I think.

-- 
/Jacob Carlborg



_______________________________________________
textmate mailing list
[hidden email]
https://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: 10.14 / Mojave Dark Mode

Allan Odgaard-4

On 5 Oct 2018, at 9:49, Jacob Carlborg wrote:

Using asset catalogs would be nice but it’s still possible to do with just code. If you can use the semantic colors, with a fallback for when they’re not available, it would help as well I think.

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).



_______________________________________________
textmate mailing list
[hidden email]
https://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: 10.14 / Mojave Dark Mode

jason
In reply to this post by Allan Odgaard-4
Great. I have also been trying to track down the crash in NSOutlineView that I see via -[FSItem isEqual:]! 

On Fri, Oct 5, 2018 at 3:36 AM Allan Odgaard <[hidden email]> wrote:

On 5 Oct 2018, at 2:05, jason wrote:

Are people using TextMate with Dark Mode? I see some issues with reading
text (find input text is black until unfocused, then changes to white), but
also curiously the icons in the outline view are also missing.

I pushed a quick fix for the find dialog strings: https://github.com/textmate/textmate/commit/cae5eff55cd31788ab53bf2e84e65d75cdc21f80

Colors will still be wrong if you enable regular expression, you can set the theme used (for syntax highlight of find/replace strings) via the UIThemeUUID defaults key (requires relaunch after changing it) but it will currently render the theme’s background color, so this is not ideal and will require a bit more work.

The file icons are done with an NSImage subclass (this is required so we get proper behavior for retina screens etc.) and will likely have to be rewritten using new API to work with Mojave (I have no idea why our subclass breaks when building with the 10.14 SDK but NSImage is a bit iffy and if they have completely rewritten the internals for Mojave then I believe it wouldn’t be a first).

For the rest of the colors (gradients, find result highlights, etc.) we will need to move to asset catalogs, but I am in a bit of a pickle because I can’t do deployment builds with newer versions of Xcode, as they are prone to crash (numerous hours have been spent trying to track it down, but it relates to internal garbage collection of the NSOutlineView, so quite difficult to get any meaningful information from the crash logs), and colors in asset catalogs is not possible with the version of Xcode I am using.


_______________________________________________
textmate mailing list
[hidden email]
https://lists.macromates.com/listinfo/textmate


_______________________________________________
textmate mailing list
[hidden email]
https://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: 10.14 / Mojave Dark Mode

Ronald Wampler
In reply to this post by Allan Odgaard-4


> On Oct 5, 2018, at 3:38 AM, Allan Odgaard <[hidden email]> wrote:
>
> On 5 Oct 2018, at 7:45, Jacob Carlborg wrote:
>
> I’ve tried, but it doesn't look so good yet. For example my tabs are not dark as on your screen shot. Have you changed the source code?
>
> Dark mode is supported for the tabs when building from master: https://github.com/textmate/textmate/commit/cf06fb3d947e7aee56a5ef76c93ac6c2fa96b89d
>
I should mention that  the current way we handle the styling  for the tabs (as
NSImages) is not  optimal since it doesn’t support desktop  tint. The only way
I know how to  properly support it is to add the tab  bar as an accessory view
in the  title bar (API 10.10)  and change the `OakTabBarStyle`  to use NSColor
instead of NSImage images.

Ron
>
> _______________________________________________
> textmate mailing list
> [hidden email]
> https://lists.macromates.com/listinfo/textmate


_______________________________________________
textmate mailing list
[hidden email]
https://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: 10.14 / Mojave Dark Mode

Allan Odgaard-4
In reply to this post by jason

On 5 Oct 2018, at 13:37, jason wrote:

Great. I have also been trying to track down the crash in NSOutlineView
that I see via -[FSItem isEqual:]!

You saw this with Xcode 10? I have not yet tested for the issue with Xcode 10 myself, but if you saw it on Mojave, then that saves me the trouble.

I did go through basically removing all features of the file browser and yet still had the crash.

I’ve reached a point where rewriting the involved code is probably the most feasible way to try and fix this :(



_______________________________________________
textmate mailing list
[hidden email]
https://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Completions window?

じょいすじょん
Where in the source code should we find the completion list and completion window ?
I would like to look at enhancing it and need to figure out where it is.

_______________________________________________
textmate mailing list
[hidden email]
https://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: Completions window?

Jacob Carlborg
> On 6 Oct 2018, at 09:09, じょいすじょん <[hidden email]> wrote:
>
> Where in the source code should we find the completion list and completion window ?
> I would like to look at enhancing it and need to figure out where it is.


If you’re referring to the completion list that bundle commands can show it’s available here [1].

[1] https://github.com/textmate/dialog/tree/master/Commands/popup

--
/Jacob Carlborg



_______________________________________________
textmate mailing list
[hidden email]
https://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: 10.14 / Mojave Dark Mode

Jacob Carlborg
In reply to this post by Allan Odgaard-4

On 5 Oct 2018, at 10:25, Allan Odgaard <[hidden email]> 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.


-- 
/Jacob Carlborg


_______________________________________________
textmate mailing list
[hidden email]
https://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: 10.14 / Mojave Dark Mode

jason
In reply to this post by Allan Odgaard-4
Yes, I built this with Xcode 10 toolchain on 10.14. If the crash reporter feature works you've probably gotten a lot of them from me :)

On Sat, Oct 6, 2018 at 2:24 AM Allan Odgaard <[hidden email]> wrote:

On 5 Oct 2018, at 13:37, jason wrote:

Great. I have also been trying to track down the crash in NSOutlineView
that I see via -[FSItem isEqual:]!

You saw this with Xcode 10? I have not yet tested for the issue with Xcode 10 myself, but if you saw it on Mojave, then that saves me the trouble.

I did go through basically removing all features of the file browser and yet still had the crash.

I’ve reached a point where rewriting the involved code is probably the most feasible way to try and fix this :(


_______________________________________________
textmate mailing list
[hidden email]
https://lists.macromates.com/listinfo/textmate


_______________________________________________
textmate mailing list
[hidden email]
https://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: 10.14 / Mojave Dark Mode

jason
In reply to this post by Jacob Carlborg
I usually run from HEAD of master, I have one minor (non source) tweak to the application icon because I miss the TextMate 1 icon.

On Fri, Oct 5, 2018 at 1:46 AM Jacob Carlborg <[hidden email]> wrote:

On 5 Oct 2018, at 02:05, jason <[hidden email]> wrote:

Are people using TextMate with Dark Mode? I see some issues with reading text (find input text is black until unfocused, then changes to white), but also curiously the icons in the outline view are also missing.

I’ve tried, but it doesn't look so good yet. For example my tabs are not dark as on your screen shot. Have you changed the source code?

-- 
/Jacob Carlborg


_______________________________________________
textmate mailing list
[hidden email]
https://lists.macromates.com/listinfo/textmate


_______________________________________________
textmate mailing list
[hidden email]
https://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: 10.14 / Mojave Dark Mode

Allan Odgaard-4
In reply to this post by Jacob Carlborg

On 6 Oct 2018, at 10:48, Jacob Carlborg wrote:

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.

It’s not that I do not know how to check for these things, but the thought of adding such checks each place we use a color (as the color itself cannot encapsulate this before 10.14) is just not very appealing, as far more colors are used than one would think from just looking at the UI.



_______________________________________________
textmate mailing list
[hidden email]
https://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: 10.14 / Mojave Dark Mode

Allan Odgaard-4
In reply to this post by jason

On 6 Oct 2018, at 18:26, jason wrote:

Yes, I built this with Xcode 10 toolchain on 10.14. If the crash reporter
feature works you've probably gotten a lot of them from me :)

It links the crashes to official builds (so I can easier link new crashes to a certain commits), hence I do not see crashes from custom builds.

As for the crash when building with new versions of Xcode, I started on the file browser rewrite, trying to do things a bit differently, hopefully that won’t trigger the issue, and I will finally be able to move beyond Xcode 7.



_______________________________________________
textmate mailing list
[hidden email]
https://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: 10.14 / Mojave Dark Mode

Allan Odgaard-4
In reply to this post by Ronald Wampler

On 5 Oct 2018, at 14:59, Ronald Wampler wrote:

I should mention that the current way we handle the styling for the tabs (as
NSImages) is not optimal since it doesn’t support desktop tint. The only way
I know how to properly support it is to add the tab bar as an accessory view
in the title bar (API 10.10) and change the `OakTabBarStyle` to use NSColor
instead of NSImage images.

I will drop 10.9 compatibility for the reworked file browser (next build), so I see no problem switching from images to colors for the tab bar (as you probably know, the images were to support the 10.9 tab look).



_______________________________________________
textmate mailing list
[hidden email]
https://lists.macromates.com/listinfo/textmate
12