diff --git a/man/twmruined.man b/man/twmruined.man index 717b5f1..e12e47b 100644 --- a/man/twmruined.man +++ b/man/twmruined.man @@ -576,9 +576,6 @@ may only be specified inside of a The optional \fIwin-list\fP is a list of window names and colors so that per-window colors may be specified. The default is "black". -.IP "\fBTitlePadding\fP \fIpixels\fP" 8 -This variable specifies the distance between the various buttons, text, and -highlight areas in the titlebar. The default is 8 pixels. .IP "\fBUnknownIcon\fP \fIstring\fP" 8 This variable specifies the filename of a bitmap file to be used as the default icon. This bitmap will be used as the icon of all diff --git a/src/add_window.c b/src/add_window.c index 87d1944..60b6e20 100644 --- a/src/add_window.c +++ b/src/add_window.c @@ -769,7 +769,7 @@ void ComputeCommonTitleOffsets (void) Scr->TBInfo.leftx += Scr->ButtonIndent; Scr->TBInfo.titlex = (Scr->TBInfo.leftx + (Scr->TBInfo.nleft * buttonwidth) - Scr->TBInfo.pad + - Scr->TitlePadding); + TITLE_PADDING); if (Scr->TBInfo.nright > 0) Scr->TBInfo.rightoff += (Scr->ButtonIndent + ((Scr->TBInfo.nright * buttonwidth) - @@ -780,13 +780,13 @@ void ComputeWindowTitleOffsets (TwmWindow *tmp_win, int width, Bool squeeze) { tmp_win->highlightx = (Scr->TBInfo.titlex + tmp_win->name_width); if (tmp_win->hilite_w || Scr->TBInfo.nright > 0) - tmp_win->highlightx += Scr->TitlePadding; + tmp_win->highlightx += TITLE_PADDING; tmp_win->rightx = width - Scr->TBInfo.rightoff; if (squeeze && tmp_win->squeeze) { int rx = (tmp_win->highlightx + (tmp_win->hilite_w ? Scr->TBInfo.width * 2 : 0) + - (Scr->TBInfo.nright > 0 ? Scr->TitlePadding : 0) + + (Scr->TBInfo.nright > 0 ? TITLE_PADDING : 0) + Scr->FramePadding); if (rx < tmp_win->rightx) tmp_win->rightx = rx; diff --git a/src/menus.c b/src/menus.c index a6f65fd..f398c6f 100644 --- a/src/menus.c +++ b/src/menus.c @@ -301,8 +301,7 @@ void InitTitlebarButtons (void) */ Scr->TBInfo.width = (Scr->TitleHeight - 2 * (Scr->FramePadding + Scr->ButtonIndent)); - Scr->TBInfo.pad = ((Scr->TitlePadding > 1) - ? ((Scr->TitlePadding + 1) / 2) : 1); + Scr->TBInfo.pad = (TITLE_PADDING + 1) / 2; h = Scr->TBInfo.width - 2 * Scr->TBInfo.border; /* diff --git a/src/parse.c b/src/parse.c index 7b1b5f1..3491f6c 100644 --- a/src/parse.c +++ b/src/parse.c @@ -339,7 +339,6 @@ typedef struct _TwmKeyword { #define kwn_MoveDelta 2 #define kwn_XorValue 3 #define kwn_FramePadding 4 -#define kwn_TitlePadding 5 #define kwn_ButtonIndent 6 #define kwn_Priority 10 @@ -517,7 +516,6 @@ static TwmKeyword keytable[] = { { "titlebackground", CLKEYWORD, kwcl_TitleBackground }, { "titlefont", SKEYWORD, kws_TitleFont }, { "titleforeground", CLKEYWORD, kwcl_TitleForeground }, - { "titlepadding", NKEYWORD, kwn_TitlePadding }, { "unknownicon", SKEYWORD, kws_UnknownIcon }, { "w", WINDOW, 0 }, { "wait", WAIT, 0 }, @@ -709,10 +707,6 @@ int do_number_keyword (int keyword, int num) if (Scr->FirstTime) Scr->FramePadding = num; return 1; - case kwn_TitlePadding: - if (Scr->FirstTime) Scr->TitlePadding = num; - return 1; - case kwn_ButtonIndent: if (Scr->FirstTime) Scr->ButtonIndent = num; return 1; diff --git a/src/resize.c b/src/resize.c index f66842d..da2ec23 100644 --- a/src/resize.c +++ b/src/resize.c @@ -848,7 +848,7 @@ void SetupFrame (TwmWindow *tmp_win, int x, int y, int w, int h, int bw, Bool se if (tmp_win->title_height && tmp_win->hilite_w) { xwc.width = (tmp_win->rightx - tmp_win->highlightx); - if (Scr->TBInfo.nright > 0) xwc.width -= Scr->TitlePadding; + if (Scr->TBInfo.nright > 0) xwc.width -= TITLE_PADDING; if (xwc.width <= 0) { xwc.x = Scr->MyDisplayWidth; /* move offscreen */ xwc.width = 1; diff --git a/src/screen.h b/src/screen.h index 4dac595..3db1c64 100644 --- a/src/screen.h +++ b/src/screen.h @@ -49,6 +49,8 @@ typedef struct _StdCmap { #define SIZE_HINDENT 10 #define SIZE_VINDENT 2 +/* distance between items in titlebar */ +#define TITLE_PADDING 8 typedef struct _TitlebarPixmaps { Pixmap xlogo; @@ -186,7 +188,6 @@ typedef struct ScreenInfo TwmWindow *Focus; /* the twm window that has focus */ int EntryHeight; /* menu entry height */ int FramePadding; /* distance between decorations and border */ - int TitlePadding; /* distance between items in titlebar */ int ButtonIndent; /* amount to shrink buttons on each side */ int NumAutoRaises; /* number of autoraise windows on screen */ short NoDefaults; /* do not add in default UI stuff */ diff --git a/src/twm.c b/src/twm.c index 8b804ef..d04ccef 100644 --- a/src/twm.c +++ b/src/twm.c @@ -693,8 +693,7 @@ InitVariables(void) &Scr->PointerBackground); Scr->FramePadding = 2; /* values that look "nice" on */ - Scr->TitlePadding = 8; /* 75 and 100dpi displays */ - Scr->ButtonIndent = 0; + Scr->ButtonIndent = 0; /* 75 and 100dpi displays */ Scr->SizeStringOffset = 0; Scr->UnknownWidth = 0; Scr->UnknownHeight = 0;