1. I made blue theme as default theme, so you don’t need to set yourself now. And if you want to use it as default color theme, you should remove all the files in conf/stx, including Python.stx.

  2. With this new implemention, there is still a [default_style] session can be configured in config.ini, and here is the options which you can configure now:

    [default_style]
    STC_STYLE_TEXT = u"fore:#8DB0D3"
    STC_STYLE_NUMBER = u"fore:#FF00FF"
    STC_STYLE_STRING = u"fore:#00FF80"
    STC_STYLE_COMMENT = u"italic,fore:#008040"
    STC_STYLE_KEYWORD1 = u"fore:#FFFF00"
    STC_STYLE_KEYWORD2 = u"fore:#AFFFEE"
    STC_STYLE_IDENTIFIER = u"fore:#8DB0D3"
    STC_STYLE_OPERATOR = u"fore:#F0804F"
    STC_STYLE_CHARACTER = u"fore:#E19618"
    STC_STYLE_REGEX = u"fore:#FFFF80"
    STC_STYLE_DEFAULT = u"fore:#FFFFFF,back:#112435,face:%(mono)s,size:%(size)d"
    STC_STYLE_LINENUMBER = u"fore:#FFFFFF,back:#1F4661,face:%(mono)s,size:%(lnsize)d"
    STC_STYLE_CONTROLCHAR = u"fore:#FFFFFF"
    STC_STYLE_BRACELIGHT = u"bold,fore:#FF0000"
    STC_STYLE_BRACEBAD = u"bold,fore:#0000FF"
    STC_STYLE_CARET_FORE = u"fore:#FF0000"
    STC_STYLE_CARETLINE_BACK = u"back:#5F0054"
    STC_STYLE_SELECTION_BACK = u"back:#000080"
    STC_STYLE_FOLDER = u"back:#3476A3"
    STC_STYLE_MARKER = u"fore:#F0804F,back:#FFFFFF"
    STC_STYLE_TAG = u"fore:#15852B"
    STC_STYLE_TAG1 = u"fore:#2CEF50"
    STC_STYLE_TAGKEY = u"fore:#FFFF00"
    STC_STYLE_ATTRNAME = u"fore:#F0804F"
    STC_STYLE_ATTRVALUE = u"fore:#156EB2"
    STC_STYLE_CLASSNAME = u"fore:#BBFF4F"
    STC_STYLE_DEFNAME = u"fore:#4179C5"
    STC_STYLE_LINK = u"fore:#FEFF8F,underline"
    STC_STYLE_STRINGEOL = u"fore:#FF6F82,back:#E0C0E0,eol"

  3. For STC_STYLE_DEFAULT and STC_STYLE_LINENUMBER, you should notice there are string place holderes, and you can set fontname and fontsize in [default] session, just like:

    [default]
    editor_font = "fontname"
    editor_fontsize = 12
    editor_linesize = 10

And of cause you can directly set the fontname and fontsize in STC_STYLE_DEFAULT and STC_STYLE_LINENUMBER. If you don’t directly set fontname and fontsize in style string, then UliPad will use default Mono font and the font size will be 12, linesize will be 10.

So if you want to custom a new theme, but not limit a single language, you should define [default_style] in config.ini, just like above example. And the old white theme you will be:

[default_style]
STC_STYLE_TEXT = "fore:#000000"
STC_STYLE_NUMBER = "fore:#6B238E"
STC_STYLE_STRING = "fore:#2A2AA5"
STC_STYLE_COMMENT = "italic,fore:#238E23,back:#E8FFE8"
STC_STYLE_KEYWORD1 = "bold,fore:#0000FF"
STC_STYLE_KEYWORD2 = "bold,fore:#2F032A"
STC_STYLE_IDENTIFIER = "fore:#000000"
STC_STYLE_OPERATOR = "fore:#000000"
STC_STYLE_CHARACTER = "fore:#9F9F9F"
STC_STYLE_REGEX = "fore:#DB70DB"
STC_STYLE_DEFAULT = "face:%(mono)s,size:%(size)d"
STC_STYLE_LINENUMBER = "back:#AAFFAA,size:%(lnsize)d" #back:#C0C0C0
STC_STYLE_CONTROLCHAR = "fore:#000000" #xxxxxxx
STC_STYLE_BRACELIGHT = "fore:#FF0000,bold" #fore:#0000FF,back:#AAFFAA,bold
STC_STYLE_BRACEBAD = "fore:#0000FF,bold" #fore:#FF0000,back:#FFFF00,bold
STC_STYLE_CARET_FORE = "fore:#FF0000"
STC_STYLE_CARETLINE_BACK = "back:#EEEEEE"
STC_STYLE_SELECTION_BACK = "back:#000080"
STC_STYLE_FOLDER = "back:#FFFFFF"
STC_STYLE_MARKER = "fore:#FFFFFF,back:#000000"
STC_STYLE_TAG = ‘fore:#15852B’
STC_STYLE_TAG1 = ‘fore:#2CEF50′
STC_STYLE_TAGKEY = ‘bold,fore:#0000FF’
STC_STYLE_ATTRNAME = ‘bold,fore:#F0804F’
STC_STYLE_ATTRVALUE = ‘fore:#156EB2′
STC_STYLE_CLASSNAME = "bold,fore:#FF0000"
STC_STYLE_DEFNAME = "bold,fore:#007F7F"
STC_STYLE_LINK = "fore:#0000FF,underline"
STC_STYLE_STRINGEOL = "fore:#000000,back:#E0C0E0,eol" #"fore:#2A2AA5,eol"

Remeber, this setting will only effect default configuration, but not existed *.stx file .


5条评论

  1. 抱歉….因為在作者聯繫這那裡寄不出信息,所以在這貼…

    hock870426@hotmail.com這是我的Email…

    我是阿福,新手,PYTHON是我第一個程式..剛學兩三個月,就要做個案了,都還沒搞清楚,在網路遇到了你,希望你能幫忙…感激不盡….謝謝…

    請文製作大富翁遊戲的房屋:判斷購買土地、判斷購買房屋升級、過路費,是如何做的??

    我學校最近期末專案,做小遊戲….

    不知如何房屋:判斷購買土地、判斷購買房屋升級、過路費….的程式碼問題….

    可否大概告訴我程式碼如何寫嗎?

    希望能儘快得到答覆…

    謝謝…

  2. 你好,看了你写的博客,非常受启发,我最近在用wxPython做一个web浏览器,但是遇到了些问题,一直无法解决,不知你有没有什么解决方案,就是如何将控件做成透明背景,比如statictext,panel等等,十分感谢!!

  3. 你是自已实现浏览器,没有使用现成的html或ie控件?透明控件还真没有做过,是不是设置一下 wxTRANSPARENT_WINDOW样式呢?

  4. wxTRANSPARENT_WINDOW 不行,我也试过,后来用erasebackground消息,背景图片可以,但是透明不知道如何处理;

    我做的东西不是ie浏览器,而是类似与ria的东西,script用的是类python语言;

    现在有几个东西还没有完成:

    1.层的实现

    2.activex控件的实现

    3.css实现

    4.datawindow的实现

    5.透明控件的实现

    6.打印功能

    7.script语言的本地安全性

    其中透明控件还没有找到解决方案,在网上找了很久都没有找到,郁闷之至

  5. 这个东西我没有做过。建议可以去wxpython邮件列表问一下。

发表评论

评论也有版权!