Discussion:
[TxMt] 10.14 / Mojave Dark Mode
jason
2018-10-05 00:05:37 UTC
Permalink
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.

[image: Screen Shot 2018-10-04 at 8.04.30 PM.png]
Bernhard Minatti
2018-10-05 05:07:34 UTC
Permalink
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 :-)
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
https://lists.macromates.com/listinfo/textmate
Michael Sheets
2018-10-05 05:45:36 UTC
Permalink
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.
Jacob Carlborg
2018-10-05 05:45:43 UTC
Permalink
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
Allan Odgaard
2018-10-05 07:38:37 UTC
Permalink
Post by Jacob Carlborg
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
Jacob Carlborg
2018-10-05 07:47:03 UTC
Permalink
Dark mode is supported for the tabs when building from master: https://github.com/textmate/textmate/commit/cf06fb3d947e7aee56a5ef76c93ac6c2fa96b89d <https://github.com/textmate/textmate/commit/cf06fb3d947e7aee56a5ef76c93ac6c2fa96b89>
Ok, cool. I haven’t looked at the git repository in a while.
--
/Jacob Carlborg
Ronald Wampler
2018-10-05 12:59:36 UTC
Permalink
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
https://lists.macromates.com/listinfo/textmate
Allan Odgaard
2018-10-17 04:52:45 UTC
Permalink
Post by Ronald Wampler
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).
Jacob Carlborg
2018-10-17 08:43:41 UTC
Permalink
I will drop 10.9 compatibility for the reworked file browser (next build)
Please do, 10.9 is quite old now. I’m on 10.13 and 10.14.
--
/Jacob Carlborg
じょいすじょん
2018-10-17 08:47:11 UTC
Permalink
Post by Jacob Carlborg
I will drop 10.9 compatibility for the reworked file browser (next build)
Please do, 10.9 is quite old now. I’m on 10.13 and 10.14.
Even from a perspective of what machines can even run 10.9 that Apple doesn't even support.
Not even sure you could find a modern web browser that would work there anymore.
Marc Wilson
2018-10-17 22:52:53 UTC
Permalink
Does this mean that TM2 will now have the tab disaster that Finder and Safari have post-Mavericks? Please say it's not so. Apple's idea of how tabs should look was designed by an idiot.

Finder's tabs are unusable and Safari's are as well, but you really have no choice with Safari. At least in Finder you can turn them off/disable them.

Mavericks wasn't great but at least they actually look like tabs rather than an UI element disconnected from the layer they're supposedly on.
--
Marc Wilson
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
https://lists.macromates.com/listinfo/textmate
じょいすじょん
2018-10-18 00:06:38 UTC
Permalink
That tabbing mechanism is available system wide, provided by AppKit.
It might not be ideal to everybody but it is at least consistent.
Sometimes it's easier to just roll with it and adopt.
Does this mean that TM2 will now have the tab disaster that Finder and Safari have post-Mavericks? Please say it's not so. Apple's idea of how tabs should look was designed by an idiot.
Finder's tabs are unusable and Safari's are as well, but you really have no choice with Safari. At least in Finder you can turn them off/disable them.
Mavericks wasn't great but at least they actually look like tabs rather than an UI element disconnected from the layer they're supposedly on.
--
Marc Wilson
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
https://lists.macromates.com/listinfo/textmate
_______________________________________________
textmate mailing list
https://lists.macromates.com/listinfo/textmate <https://lists.macromates.com/listinfo/textmate>
Allan Odgaard
2018-10-21 06:35:48 UTC
Permalink
Post by じょいすじょん
That tabbing mechanism is available system wide, provided by AppKit.
It might not be ideal to everybody but it is at least consistent.
Sometimes it's easier to just roll with it and adopt.
It’s actually not a UI component that can be freely used, but rather
tabs is something the system can add to document-based applications.

I think there are still too many issues with Cocoa’s document-based
application structure for us to adopt it, so the custom tabs will stay
for the foreseeable future, which means we can keep the current look
where it bleeds into the title bar, although there is something to be
said for system-wide consistency.

I agree though that active tab shouldn’t be a button; ideally it would
melt together with the document view (as TextMate 1.x did and Chrome
currently does).
Marc Wilson
2018-10-17 23:09:56 UTC
Permalink
Example attached, showing "good" (TM), and "bad" (Apple).
--
Marc Wilson
Post by Marc Wilson
Does this mean that TM2 will now have the tab disaster that Finder and Safari have post-Mavericks? Please say it's not so. Apple's idea of how tabs should look was designed by an idiot.
Finder's tabs are unusable and Safari's are as well, but you really have no choice with Safari. At least in Finder you can turn them off/disable them.
Mavericks wasn't great but at least they actually look like tabs rather than an UI element disconnected from the layer they're supposedly on.
--
Marc Wilson
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
https://lists.macromates.com/listinfo/textmate
jason
2018-10-06 16:28:12 UTC
Permalink
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.
Post by 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.
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
https://lists.macromates.com/listinfo/textmate
Allan Odgaard
2018-10-05 07:35:52 UTC
Permalink
Post by 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.
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.
Jacob Carlborg
2018-10-05 07:49:21 UTC
Permalink
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
Allan Odgaard
2018-10-05 08:25:20 UTC
Permalink
Post by Jacob Carlborg
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).
Jacob Carlborg
2018-10-06 08:48:12 UTC
Permalink
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
Allan Odgaard
2018-10-07 10:17:18 UTC
Permalink
Post by Jacob Carlborg
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
“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.
jason
2018-10-05 11:37:57 UTC
Permalink
Great. I have also been trying to track down the crash in NSOutlineView
that I see via -[FSItem isEqual:]!
Post by 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.
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
https://lists.macromates.com/listinfo/textmate
Allan Odgaard
2018-10-06 06:24:31 UTC
Permalink
Post by jason
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 :(
じょいすじょん
2018-10-06 07:09:28 UTC
Permalink
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.
Jacob Carlborg
2018-10-06 08:39:24 UTC
Permalink
Post by じょいすじょん
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
jason
2018-10-06 16:26:53 UTC
Permalink
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 :)
Post by jason
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
https://lists.macromates.com/listinfo/textmate
Allan Odgaard
2018-10-07 10:22:24 UTC
Permalink
Post by jason
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.
jason
2018-11-29 23:50:45 UTC
Permalink
I've been running the newest build for a while (new outline view?) and I
haven't had that naughty crash. Nice work Allan!
Post by jason
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
https://lists.macromates.com/listinfo/textmate
Loading...