Re: Multi-Pixmap Titlebars (patch)
On 07 Oct 2001 04:53:33 -0400, Suzanne Britton wrote: > > > * Currently a titlebar text noticeably flickers in some configurations. > > How is a flickery with your patch? > > I haven't noticed any...of course, I don't use opaque move. Please try opaque move from time to time, it is one command, you know. :) > > * Use named parameters for pixmaps with only one mandatory Main? > > Not sure what you mean by this... I mean instead of 6 ordered pixmaps to have named parameters like: Main decor/title-main.xpm, TextUnder decor/title-textunder.xpm, ... > > * Use optionally Main pixmap as resizable instead of tiled. > > Doable. > > > * Add optionally Button (LeftButton/RightButton) pixmaps that would be > > used instead of Main in ButtonStyle UseTitleStyle. This is needed if > > buttons are configured separately from a titlebar like in fvwm-themes. > > At that point, why not just use pixmap buttons with the desired background > already built in? Because this does not work well for frameworks where buttons are configured separately from titlebar, i.e. the same MAC-like or OS2-like buttons are used with different titlebar configs, see for example http://fvwm-themes.sf.net/windowdecors/ . For all (well most) mixes to work well, titlebar colors (pixmaps in our case) should dictate window button background. If you want to learn more about what I said, get fvwm-themes and try different mixes of colors@ and [EMAIL PROTECTED] You may also see what commands these 2 components use. Of course, this is an extra functionality, but it would solve us some problems we have now with fancy decors. For example, take a look at the url above, currently buttons@ in @brushedmetal, @mech and @nanogui are not transparent just like you suggest, but then they can't be mixed at all. If it is possible to specify non-Main pixmap to be used in ButtonStyle UseTitleStyle, these buttons in all 3 themes would be transparent and all possible mixes of colors@ and buttons@ would look nicely. > > * Use optionally LeftMain and RightMain instead of Main. Probably > > only useful with Centered text. > > Could be done, but I don't know of many themes that would need it... Actually this would be useful when TitleStyle Centered|Right/LeftJustified is configured separately from titlebar colors (pixmaps). Yes, this is configured in another component windowlook@ in fvwm-themes. :) For example, in your glenwood try to change text alignment, you will see what I mean. > > * Optionally undefined pixmap is skipped (like other > > non-main pixmaps) instead of retiled. > > Doable. Thank you very much for your work. Regards, Mikhael. -- Visit the official FVWM web page at http://www.fvwm.org/>. To unsubscribe from the list, send "unsubscribe fvwm-workers" in the body of a message to [EMAIL PROTECTED] To report problems, send mail to [EMAIL PROTECTED]
Fancy Titlebars: Updated Patch
Okay, here's a somewhat cleaned-up patch for nifty titlebars. I still wouldn't call it ready for general use (not enough testing, not enough review by the people who know what they're doing ;-), but the titleunder bug seems to be fixed and the config syntax is much more reasonable. Bonus: the patch is smaller! The syntax is now: MultiPixmap [main] [under text] [left of text] [right of text] [far left] [far right] e.g.: TitleStyle ActiveUp MultiPixmap main.xpm under.xpm lt.xpm rt.xpm - - The read code has been integrated into ReadDecorFace, so now this can be combined with pretty much anything else TitleStyle supports (flags, defining multiple states at once, etc.) Suzanne -- [EMAIL PROTECTED] - http://www.igs.net/~tril/ "I'm aware of that, sweetheart. It's just that when I wake up to a hissing goat skull on my nightstand, and it hops off and runs across the floor on spider legs, I sleep a lot better knowing where it ran off to." - Ted (Red Meat) --- ChangeLog.orig Wed Oct 3 20:36:03 2001 +++ ChangeLog Sun Oct 7 04:04:43 2001 @@ -1,3 +1,29 @@ +2001-10-07 Suzanne Britton <[EMAIL PROTECTED]> + + * config.h.in: Added FANCY_TITLEBARS option, off by default + + * fvwm/screen.h: + [All changes #ifdeffed FANCY_TITLEBARS] + Added TITLE_PADDING define for fancy titlebar rendering + Added tb_pixmap_enum + Added MultiPixmap to DecorFaceType enum + Added Picture **extra_pictures to DecorFace structure + + * fvwm/borders.c: + [All changes #ifdeffed FANCY_TITLEBARS] + (DrawButton): Handle UseTitleStyle where TitleStyle is MultiPixmap + (DrawMultiPixmapTitlebar): [new] + (RedrawTitle): + Call DrawFancyTitlebar for MultiPixmap style + Skip DrawString calls for MultiPixmap style (title is drawn inside + DrawMultiPixmapTitlebar) + + * fvwm/builtins.c: + [All changes #ifdeffed FANCY_TITLEBARS] + (FreeDecorFace): Free up all pictures for a MultiPixmap decor + (ReadDecorFace): Call ReadMultiPixmapDecor for a MultiPixmap TitleStyle + (ReadMultiPixmapDecor): [new] + 2001-09-16 Dominik Vogt <[EMAIL PROTECTED]> * configure.in: --- AUTHORS.origWed Oct 3 20:59:12 2001 +++ AUTHORS Wed Oct 3 20:58:41 2001 @@ -182,6 +182,8 @@ Echo. Improve modules: Make FvwmM4 pass args on to m4, font-related seg-fault bug fix in FvwmButtons. +Suzanne Britton: +Multi-pixmap titlebars patch. Along with a cast of thousands (well, dozens) mentioned in old ChangeLog entries. If you find your name below, please send an entry --- config.h.in.origWed Oct 3 20:05:40 2001 +++ config.h.in Sat Sep 29 20:59:34 2001 @@ -2,6 +2,9 @@ /* Suffix for config filenames */ #define FVWMRC ".fvwm2rc" +/* Define for fancy, multi-pixmap-themeable titlebars */ +#undef FANCY_TITLEBARS + /* Define if gdk-imlib is used */ #undef GDK_IMLIB --- fvwm/screen.h.orig Wed Oct 3 20:06:01 2001 +++ fvwm/screen.h Sun Oct 7 04:30:01 2001 @@ -54,6 +54,11 @@ #define COLORMAP_FOLLOWS_MOUSE 1 /* default */ #define COLORMAP_FOLLOWS_FOCUS 2 +#ifdef FANCY_TITLEBARS +#define TITLE_PADDING 5 +enum tb_pixmap_enum {TBP_MAIN, TBP_UNDER, TBP_LTEXT, TBP_RTEXT, TBP_LEFT, + TBP_RIGHT, NUM_TB_PIXMAPS}; +#endif typedef struct { @@ -70,6 +75,9 @@ GradientButton , PixmapButton, TiledPixmapButton , +#ifdef FANCY_TITLEBARS +MultiPixmap , +#endif #ifdef MINI_ICONS MiniIconButton , #endif @@ -123,6 +131,9 @@ struct { Picture *p; +#ifdef FANCY_TITLEBARS +Picture **extra_pictures; +#endif Pixel back; struct { --- fvwm/borders.c.orig Wed Oct 3 20:06:21 2001 +++ fvwm/borders.c Sun Oct 7 05:32:43 2001 @@ -271,7 +271,14 @@ case MiniIconButton: case PixmapButton: case TiledPixmapButton: -if (type == PixmapButton || type == TiledPixmapButton) +#ifdef FANCY_TITLEBARS + case MultiPixmap: /* in case of UseTitleStyle */ +#endif +if (type == PixmapButton || type == TiledPixmapButton +#ifdef FANCY_TITLEBARS +|| type == MultiPixmap +#endif + ) { p = df->u.p; } @@ -448,6 +455,161 @@ return; } +#ifdef FANCY_TITLEBARS +/ + * + * Redraws multi-pixmap titlebar ([EMAIL PROTECTED]) + * + / +static void DrawMultiPixmapTitlebar(FvwmWindow *window, TitleButton *decor) +{ + Window title_win; + GC gc; + const char *title; + int title_width, title_height, text_width, text_offset, text_y_pos; + int left_space, right_space, under_offset, under_width; + int state; + mwm_flagsstate_flags; + Bool toggled; + Picture *main_pic, **extra_pic
Re: A small question regarding titles and borders
On 07 Oct 2001 12:29:49 +0700, Dmitry Yu. Bolkhovityanov wrote: > > How to specify a shadow thickness for raised/sunk titles and > borders? There's no "shadow thickness" flag in TitleStyle/BorderStyle > commands, and there's no "thickness" attribute in colorsets. On the other > hand, at least Kendrick Vargas' screenshot shows a sunk title with > thickness of 1 instead of default 2. So, how? You can't, it is hardcoded to 2 when raised/sunk. I didn't see Kendrick's config, but it is clear to me that he uses flat, not sunk title, everything is pixmap based. I.e. it only works with TitleStyle Height 19 in his case. As for borders, the shadow/hilite colors depend on the border width and some more flags, also hardcoded. And it is not symmetrical at different sides. Borders are hardly configurable. Regards, Mikhael. -- Visit the official FVWM web page at http://www.fvwm.org/>. To unsubscribe from the list, send "unsubscribe fvwm-workers" in the body of a message to [EMAIL PROTECTED] To report problems, send mail to [EMAIL PROTECTED]
Re: Multi-Pixmap Titlebars (patch)
> Should not the order for consistency be the following: > > TitleStyle Fancy ... Definitely. And I should be recognizing -- flags, "all state" styles, etc. Now that I've actually got this working as a "proof of concept" thing, I'm going to go back and rework the code to try to integrate it better with the other TitleStyles. > I can't apply your patch right now. I wouldn't recommend applying it yet unless you're brave :-) Especially since the config format will probably change considerably... > * In http://www.igs.net/~tril/fvwm/glenwood.jpg do you use transparent > pixmaps for <* text>? Nope...the patch doesn't use transparency currently. > * Currently a titlebar text noticeably flickers in some configurations. > How is a flickery with your patch? I haven't noticed any...of course, I don't use opaque move. > * Use named parameters for pixmaps with only one mandatory Main? Not sure what you mean by this... > * Use optionally Main pixmap as resizable instead of tiled. Doable. > * Add optionally Button (LeftButton/RightButton) pixmaps that would be > used instead of Main in ButtonStyle UseTitleStyle. This is needed if > buttons are configured separately from a titlebar like in fvwm-themes. At that point, why not just use pixmap buttons with the desired background already built in? > * Use optionally LeftMain and RightMain instead of Main. Probably > only useful with Centered text. Could be done, but I don't know of many themes that would need it... > * Optionally undefined pixmap is skipped (like other > non-main pixmaps) instead of retiled. Doable. Suzanne -- [EMAIL PROTECTED] - http://www.igs.net/~tril/ "I'm aware of that, sweetheart. It's just that when I wake up to a hissing goat skull on my nightstand, and it hops off and runs across the floor on spider legs, I sleep a lot better knowing where it ran off to." - Ted (Red Meat) -- Visit the official FVWM web page at http://www.fvwm.org/>. To unsubscribe from the list, send "unsubscribe fvwm-workers" in the body of a message to [EMAIL PROTECTED] To report problems, send mail to [EMAIL PROTECTED]
A small question regarding titles and borders
Hi! How to specify a shadow thickness for raised/sunk titles and borders? There's no "shadow thickness" flag in TitleStyle/BorderStyle commands, and there's no "thickness" attribute in colorsets. On the other hand, at least Kendrick Vargas' screenshot shows a sunk title with thickness of 1 instead of default 2. So, how? TIA, Dmitry _ Dmitry Yu. Bolkhovityanov [EMAIL PROTECTED] The Budker Institute of Nuclear Physics -- Visit the official FVWM web page at http://www.fvwm.org/>. To unsubscribe from the list, send "unsubscribe fvwm-workers" in the body of a message to [EMAIL PROTECTED] To report problems, send mail to [EMAIL PROTECTED]