Mercurial > fife-parpg
changeset 218:724f3a5f3e96
Added selection_color, and darkened the default for it a bit.
author | phoku@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Thu, 19 Mar 2009 17:14:56 +0000 |
parents | 68ae8f4234ca |
children | 852da06fc922 |
files | engine/extensions/pychan/__init__.py engine/extensions/pychan/internal.py engine/extensions/pychan/widgets.py |
diffstat | 3 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/engine/extensions/pychan/__init__.py Thu Mar 19 01:40:51 2009 +0000 +++ b/engine/extensions/pychan/__init__.py Thu Mar 19 17:14:56 2009 +0000 @@ -153,6 +153,7 @@ } A new style is added to pychan with L{internal.Manager.addStyle}. +You can set a new default style by adding a style with the name 'default'. The font is set via a string identifier pulled from a font definition in a PyChan configuration file. You have to load these by calling
--- a/engine/extensions/pychan/internal.py Thu Mar 19 01:40:51 2009 +0000 +++ b/engine/extensions/pychan/internal.py Thu Mar 19 17:14:56 2009 +0000 @@ -166,6 +166,7 @@ 'base_color' : guichan.Color(28,28,28), 'foreground_color' : guichan.Color(255,255,255), 'background_color' : guichan.Color(50,50,50), + 'selection_color' : guichan.Color(80,80,80), }, 'Button' : { 'border_size': 2,
--- a/engine/extensions/pychan/widgets.py Thu Mar 19 01:40:51 2009 +0000 +++ b/engine/extensions/pychan/widgets.py Thu Mar 19 17:14:56 2009 +0000 @@ -56,6 +56,7 @@ - base_color: Color - background_color: Color - foreground_color: Color + - selection_color: Color - font: String: This should identify a font that was loaded via L{loadFonts} before. - border_size: Integer: The size of the border in pixels. - position_technique: This can be either "automatic" or "explicit" - only L{Window} has this set to "automatic" which @@ -84,7 +85,7 @@ ATTRIBUTES = [ Attr('name'), PointAttr('position'), PointAttr('min_size'), PointAttr('size'), PointAttr('max_size'), - ColorAttr('base_color'),ColorAttr('background_color'),ColorAttr('foreground_color'), + ColorAttr('base_color'),ColorAttr('background_color'),ColorAttr('foreground_color'),ColorAttr('selection_color'), Attr('style'), Attr('font'),IntAttr('border_size') ]