summaryrefslogtreecommitdiff
path: root/src/theming.py
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2012-01-24 15:17:54 +0100
committerFlorent Le Coz <louiz@louiz.org>2012-01-24 15:17:54 +0100
commit09f16804a3cec50316129a2a3cc0e64628b32fce (patch)
tree092a8a2827754b5643369f67da7318099ce9ffed /src/theming.py
parentc1dd012b7a92ae08a648814e46761802c5a92598 (diff)
downloadpoezio-09f16804a3cec50316129a2a3cc0e64628b32fce.tar.gz
poezio-09f16804a3cec50316129a2a3cc0e64628b32fce.tar.bz2
poezio-09f16804a3cec50316129a2a3cc0e64628b32fce.tar.xz
poezio-09f16804a3cec50316129a2a3cc0e64628b32fce.zip
Fix the comments in the theming.py file
Diffstat (limited to 'src/theming.py')
-rw-r--r--src/theming.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/theming.py b/src/theming.py
index 7e90a5a7..4e1f37ea 100644
--- a/src/theming.py
+++ b/src/theming.py
@@ -11,16 +11,17 @@ used when drawing the interface.
Colors are numbers from -1 to 7 (if only 8 colors are supported) or -1 to 255
if 256 colors are available.
-We check the number of available colors at startup, and we load a theme accordingly.
-A 8 color theme should NEVER use colors not in the -1 -> 7 range. We won't check that
-at run time. If the case occurs, the THEME should be fixed.
+If only 8 colors are available, all colors > 8 are converted using the
+table_256_to_16 dict.
+
XHTML-IM colors are converted to -1 -> 255 colors if available, or directly to
-1 -> 8 if we are in 8-color-mode.
A pair_color is a background-foreground pair. All possible pairs are not created
at startup, because that would create 256*256 pairs, and almost all of them
would never be used.
-So, a theme should define color tuples, like (200, -1), and when they are to
+
+A theme should define color tuples, like (200, -1), and when they are to
be used by poezio's interface, they will be created once, and kept in a list for
later usage.
A color tuple is of the form (foreground, background, optional)