Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

improved conversion for scopes colors which background use alpha blen…

…ding
  • Loading branch information...
commit 24c30a39c073635210e62b959ef06b4a7f7bb21b 1 parent 830548b
@iromeo authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 colorSchemeTool.py
View
8 colorSchemeTool.py
@@ -572,14 +572,14 @@ def font_style_from_textmate(style):
if 'italic' in style: result += 2
return result
-def attr_from_textmate(settings, old_value):
+def attr_from_textmate(settings, old_value, background):
result = AttributeValue()
if ('foreground' in settings) and ((old_value == None) or (old_value.default_fore != IGNORE_COLOR_VALUE)):
result.foreground = color_from_textmate(settings['foreground'])
if ('background' in settings) and ((old_value == None) or (old_value.default_back != IGNORE_COLOR_VALUE)):
- result.background = color_from_textmate(settings['background'])
+ result.background = color_from_textmate(settings['background'], background)
if 'fontStyle' in settings:
tm_font_style = settings['fontStyle']
@@ -665,7 +665,7 @@ def load_textmate_scheme(tmtheme):
return
default_settings = default_settings['settings']
- text.value = attr_from_textmate(default_settings, None)
+ text.value = attr_from_textmate(default_settings, None, None)
background = default_settings['background']
@@ -695,7 +695,7 @@ def load_textmate_scheme(tmtheme):
if the_scope:
print "converting attribute " + attr.id + " from TextMate scope " + the_scope
used_scopes.add(the_scope)
- attr.value = attr_from_textmate(settings['settings'], attr.value)
+ attr.value = attr_from_textmate(settings['settings'], attr.value, background)
else:
print "[!] scope not found: " + attr.scope
return all_settings, used_scopes
Please sign in to comment.
Something went wrong with that request. Please try again.