FVWM: 2.0.42 Title Height Patch

From: Andrew Veliath <veliaa_at_rpi.edu>
Date: Sat, 25 May 1996 02:59:17 -0400

This could be of interest... it is somewhat small, so I figured I'd
post it separately...

It lets you do something like:
Titlestyle Height 24

This patch lets you specify an alternate height other than the default
calculated from WindowFont (this is part of my title-bar patch, but is
better in a small version):

diff -cr ../orig/fvwm-2.0.42/fvwm/builtins.c fvwm-2.0.42/fvwm/builtins.c
*** ../orig/fvwm-2.0.42/fvwm/builtins.c Wed Apr 10 13:38:25 1996
--- fvwm-2.0.42/fvwm/builtins.c Sat May 25 02:23:40 1996
***************
*** 1326,1331 ****
--- 1326,1352 ----
      {
        Scr.TitleStyle.appearance = TITLE_MWM;
      }
+ else if (mystrncasecmp(parm,"height",6)==0)
+ {
+ int height, next;
+ if ( sscanf(action, "%d%n", &height, &next) > 0
+ && height > 4
+ && height <= 256)
+ {
+ int height_area = Scr.WindowFont.font->ascent
+ + Scr.WindowFont.font->descent + 3;
+
+ Scr.TitleHeight = height;
+ Scr.WindowFont.y = Scr.WindowFont.font->ascent
+ + (height - height_area) / 2;
+ if (Scr.WindowFont.y < Scr.WindowFont.font->ascent)
+ Scr.WindowFont.y = Scr.WindowFont.font->ascent;
+ }
+ else
+ fvwm_msg(ERR,"SetTitleStyle", "bad height argument (height must be from 5 to 256)");
+
+ action += next;
+ }
  
      action = GetNextToken(action,&parm);
    }
diff -cr ../orig/fvwm-2.0.42/fvwm/fvwm2.man fvwm-2.0.42/fvwm/fvwm2.man
*** ../orig/fvwm-2.0.42/fvwm/fvwm2.man Fri Apr 12 14:05:15 1996
--- fvwm-2.0.42/fvwm/fvwm2.man Sat May 25 02:31:07 1996
***************
*** 1236,1249 ****
  Does nothing. This is used to insert a title line in a popup or menu.
  
  
! .IP "TitleStyle \fI[justification] [appearance]\fP"
  Sets the title bar style. Justifications can be "Centered",
  "RightJustified", or "LeftJustified" and Appearance can be "Raised",
! "Sunk", or "Flat". Defaults to Centered and Raised. One or both
! values can be specified when used. Examples:
  .EX
  TitleStyle Centered Raised
! TitleStyle LeftJustified Flat
  .EE
  
  
--- 1236,1252 ----
  Does nothing. This is used to insert a title line in a popup or menu.
  
  
! .IP "TitleStyle \fI[justification] [appearance] [height pixels]\fP"
  Sets the title bar style. Justifications can be "Centered",
  "RightJustified", or "LeftJustified" and Appearance can be "Raised",
! "Sunk", or "Flat". Height can be given to override the default
! title-bar height in pixels (text remains vertically centered).
! Defaults are Centered and Raised. One or both values can be specified
! when used. The WindowFont command overrides the value of Height, so
! typically WindowFont should be specified before this. Examples:
  .EX
  TitleStyle Centered Raised
! TitleStyle LeftJustified Flat Height 16
  .EE
  
  
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Sat May 25 1996 - 02:40:06 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:59 BST