On Thu, Sep 18, 2008 at 9:55 AM, Corey O'Connor <[EMAIL PROTECTED]> wrote: > On Thu, Sep 18, 2008 at 12:15 AM, Jean-Philippe Bernardy > <[EMAIL PROTECTED]> wrote: >> >> "default" indicates the default color settings as defined by the >> toolkit or terminal. >> (Note that this makes sense for both foreground and background, >> separately.) >> >> > I think this would resolve the issues with the darkBlueTheme. However >> > this >> > complicates the conversion of a Color to a GTK Color or VTY Color as now >> > the >> > conversion depends on the window style attributes. >> >> If you want to define styles in terms of the "window" style, you should do >> so >> in the theme, by referencing "window self" > > This does make sense. Now I'm thinking that the dark theme, in effect, needs > to redefine the "default" colors to be, well, dark. For a white xterm the > default foreground is black while the default background is white. When > using the darkBlueTheme it looks like all the unstyled regions use the > default colors. Which, in the case of the darkBlueThem, end up looking > incorrect.
After checking it in detail, the drawing was just done wrong: the window color was not used as "ground" style. (See patch). > To resolve this issue a theme needs to be able to define what the default > colors should be for the tooklit or terminal. I think the window style could > be used for this. If the defaults cannot reasonably be changed for the > toolkit or terminal then a stroke with the default style would need to be > defined for all regions not otherwise styled by the highlighter. I really meant this the other way around. If a theme wants to blend in with the toolkit defaults, as defined by the user in they "gnome control center" (or whatever), it can do so by referring to "Default" color. There are many things that are unclear in the code at the moment. 1a. Some of the style names are bad. (eg. window) 1b. The type name "Style" is misleading. It is actually an attribute transformation. (endomorphism). However I have no idea what this should be called. 2. Some styleNames are used in combination with others, some are not. eg: window, modeline, ..., eof are never combined with other styleNames; they are just applied to the (defaultAttributes = Atrributes Default Default) value. All the others assume that there is a "good ground color" and modify it. This difference should probably be reflected in the type: it should be window :: Attributes hintStyle :: Style (But then it is not clear what should be the type of eg. numberStyle) 4. The code for defaultTheme is misleading: most styleNames depend on the definition for window; but they actually are combined with it somewhere else (in theme-independent code). 5. the Reverse color does not make much sense; it should perhaps be called SelectionDefault. (A reverse video "Style" can be implemented by swapping BG and FG) Additionally, the meaning of Reverse and Default depends on whether they are used as FG or BG. This is bad. Hopefully we'll be able to clarify this mess soon :) -- JP --~--~---------~--~----~------------~-------~--~----~ Yi development mailing list [email protected] http://groups.google.com/group/yi-devel -~----------~----~----~----~------~----~------~--~---
