Avoid accessing private class variable in StyledTextTagType.
svn: r10655
This commit is contained in:
parent
cd47c05c48
commit
86a4566abf
@ -54,8 +54,15 @@ from gen.lib import (StyledText, StyledTextTag, StyledTextTagType)
|
|||||||
# Constants
|
# Constants
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
# FIXME
|
ALLOWED_STYLES = (
|
||||||
ALLOWED_STYLES = [i for (i, s, e) in StyledTextTagType._DATAMAP]
|
StyledTextTagType.BOLD,
|
||||||
|
StyledTextTagType.ITALIC,
|
||||||
|
StyledTextTagType.UNDERLINE,
|
||||||
|
StyledTextTagType.FONTCOLOR,
|
||||||
|
StyledTextTagType.HIGHLIGHT,
|
||||||
|
StyledTextTagType.FONTFACE,
|
||||||
|
StyledTextTagType.FONTSIZE,
|
||||||
|
)
|
||||||
|
|
||||||
STYLE_TO_PROPERTY = {
|
STYLE_TO_PROPERTY = {
|
||||||
StyledTextTagType.BOLD: 'weight', # permanent tag is used instead
|
StyledTextTagType.BOLD: 'weight', # permanent tag is used instead
|
||||||
@ -65,7 +72,6 @@ STYLE_TO_PROPERTY = {
|
|||||||
StyledTextTagType.HIGHLIGHT: 'background',
|
StyledTextTagType.HIGHLIGHT: 'background',
|
||||||
StyledTextTagType.FONTFACE: 'family',
|
StyledTextTagType.FONTFACE: 'family',
|
||||||
StyledTextTagType.FONTSIZE: 'size-points',
|
StyledTextTagType.FONTSIZE: 'size-points',
|
||||||
StyledTextTagType.SUPERSCRIPT: 'rise',
|
|
||||||
}
|
}
|
||||||
|
|
||||||
(MATCH_START,
|
(MATCH_START,
|
||||||
|
Loading…
Reference in New Issue
Block a user