Terminus
Terminus copied to clipboard
user_light_theme_colors and user_dark_theme_colors not working
Hi, This changes for my not working 192870b
Sublime Text 4 (4134) MacOS 12.4 Terminus 0.3.27)
Code in file theme.py:70
current_style = sublime.ui_info()['theme']['style']
should return a 'dark' or 'light' score but return a 'system' to me. I guess this place should be like this:
current_style = sublime.ui_info()['system']['style']
@timfjord
Hm, that's strange
And what does sublime.load_settings('Preferences.sublime-settings').get('theme')
return?
Hm, that's strange
And what does
sublime.load_settings('Preferences.sublime-settings').get('theme')
return?
in my case returns 'auto'.
Hm, that's strange
And what does
sublime.load_settings('Preferences.sublime-settings').get('theme')
return?
if i change from 'auto' to "Default Theme" then it returns 'Default.sublime-theme' and:
- MacOS Appearance in System Preferences 'Auto':
sublime.ui_info()['theme']['style'] # return 'light'
sublime.ui_info()['system']['style'] # return 'light'
- MacOS Appearance in System Preferences 'Dark':
sublime.ui_info()['theme']['style'] # return 'light'
sublime.ui_info()['system']['style'] # return 'dark'
Probably need to add if sublime.ui_info()['theme']['style']
is 'system' than choose current_style = sublime.ui_info()['system']['style']
I personally think it is a sublime bug, because the style
should always be either light
or dark
, and there is the value
key that can be auto
. I also use auto
but the style
is always either light
or dark
for me
There are no specs for the ui_info
method on the API Reference page so it is hard to say what is the expected behaviour. But I guess it is safe to apply the suggested fix