# HG changeset patch # User phoku@33b003aa-7bff-0310-803a-e67f0ece8222 # Date 1237482896 0 # Node ID 724f3a5f3e96266c3f329608678453477cec5121 # Parent 68ae8f4234ca2ab2b498cf9aa252ba8d34b27ca0 Added selection_color, and darkened the default for it a bit. diff -r 68ae8f4234ca -r 724f3a5f3e96 engine/extensions/pychan/__init__.py --- 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 diff -r 68ae8f4234ca -r 724f3a5f3e96 engine/extensions/pychan/internal.py --- 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, diff -r 68ae8f4234ca -r 724f3a5f3e96 engine/extensions/pychan/widgets.py --- 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') ]