Simplify and pythonize.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36072 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2010-11-04 16:15:46 +00:00
parent 890b4b419a
commit 5e6173b7e2

View File

@ -1175,9 +1175,7 @@ def revert_notefontcolor(document):
['% Commands inserted by lyx2lyx to set the font color',
'% for greyed-out notes',
'\\@ifundefined{definecolor}{\\usepackage{color}}{}'
'\\definecolor{note_fontcolor}{rgb}{'
+ str(red) + ', ' + str(green)
+ ', ' + str(blue) + '}',
'\\definecolor{note_fontcolor}{rgb}{%s,%s,%s}' % (red, green, blue),
'\\renewenvironment{lyxgreyedout}',
' {\\textcolor{note_fontcolor}\\bgroup}{\\egroup}'])
@ -1218,8 +1216,7 @@ def revert_fontcolor(document):
insert_to_preamble(0, document,
['% Commands inserted by lyx2lyx to set the font color',
'\\@ifundefined{definecolor}{\\usepackage{color}}{}',
'\\definecolor{document_fontcolor}{rgb}{'
+ str(red) + ', ' + str(green) + ', ' + str(blue) + '}',
'\\definecolor{document_fontcolor}{rgb}{%s,%s,%s}' % (red, green, blue),
'\\color{document_fontcolor}'])