From: Vladimir A. P. <pv...@bk...> - 2012-07-21 19:31:25
|
> any suggestions on how to deal with this? I think it would be great if you could (probably later) release fluxbox 1.4.0 without the hilite defaulting to frame. Because now, for example, if menu.frame.font is unset it doesn't default to menu.title or toolbar.iconbar.focused.font. Please, consider this. Backward compatibility has killed many projects :) But for 1.3 branch you can try the attached fluxbox-1.3.2-menu_hilite_fallback.patch. It's small and obvious, we just use MenuTheme::fallback(). During investigating how it's better to implement it I found some other places that probably should be fixed too (not generally related to the current thread though, but the last patch changes the menu_hilite_fallback patch behavior a little, see below). The following two patches seem logical for me but feel free to reject them if unsure whether they are valid. It would be interesting for me to know the reasons for the reject (if you do) though. fluxbox-1.3.2-theme_item_font_default.patch fixes the strange behavior in ThemeItem<Font>::setDefaultValue(). I think the "default" should not be read from theme.cfg but should be static and as simple as possible. fluxbox-1.3.2-theme_item_font_load_logic.patch moves the setting font.* resources from setFromString() to load(). It seems better since they are _not_ set from string anyway and they should be read using resource names which are passed to load() and not passed to setFromString(). After applying all the 3 patches the behavior is as follows: 1. if menu.hilite.font is set then it's used and menu.hilite.font.* get default values, 2. otherwise if menu.frame.font is set then it's used for menu.hilite.font and menu.frame.font.* are used for menu.hilite.font.* even if menu.hilite.font.* are specified. Without applying the 3rd patch in 2. if menu.hilite.font.* are specified they're used even if no menu.hilite.font is set. This could seem better but from the POV of the fluxbox code font resources are part of font itself, so there should be no "partial" inheritance of styles. I recommend applying all the 3 patches unless there are reasons not to do so (my understanding of how fluxbox works is far from 100% so I could miss anything important). |