From 2f9eb0703b17f2dbf8f9514d309317ac5a1644a7 Mon Sep 17 00:00:00 2001 From: id Date: Thu, 24 Feb 2000 22:31:00 +0000 Subject: [PATCH] remove default for titlebar_extend_space ( I've removed it so I am not sure what I just removed ) and change to #define DEF_WINDOW_TITLE_EXTEND_SPACE "4" #define DEF_MENU_TITLE_EXTEND_SPACE "4" #define DEF_MENU_TEXT_EXTEND_SPACE "0" --- src/framewin.c | 10 +++++----- src/moveres.c | 6 +++--- src/placement.c | 2 +- src/wconfig.h.in | 8 +++----- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/framewin.c b/src/framewin.c index a75b13cb..367f7875 100644 --- a/src/framewin.c +++ b/src/framewin.c @@ -138,7 +138,7 @@ wFrameWindowUpdateBorders(WFrameWindow *fwin, int flags) height = fwin->core->height - fwin->top_width - fwin->bottom_width; if (flags & WFF_TITLEBAR) - theight = WMFontHeight(*fwin->font) + TITLEBAR_EXTRA_HEIGHT + *fwin->title_clearance * 2; + theight = WMFontHeight(*fwin->font) + *fwin->title_clearance * 2; else theight = 0; @@ -476,7 +476,7 @@ updateTitlebar(WFrameWindow *fwin) int x, w; int theight; - theight = WMFontHeight(*fwin->font) + TITLEBAR_EXTRA_HEIGHT + *fwin->title_clearance * 2; + theight = WMFontHeight(*fwin->font) + *fwin->title_clearance * 2; x = 0; w = fwin->core->width + 1; @@ -1087,16 +1087,16 @@ wFrameWindowPaint(WFrameWindow *fwin) proc.drawString(scr->drawstring_func[fwin->flags.state + fwin->drawstring_proc_offset]->arg, fwin->titlebar->window, *fwin->title_gc, - *fwin->font, x, *fwin->title_clearance + TITLEBAR_EXTRA_HEIGHT/2, + *fwin->font, x, *fwin->title_clearance, fwin->titlebar->width, fwin->top_width, title, titlelen); } else { WMDrawString(scr->wmscreen, fwin->titlebar->window, - *fwin->title_gc, *fwin->font, x, *fwin->title_clearance + TITLEBAR_EXTRA_HEIGHT/2, + *fwin->title_gc, *fwin->font, x, *fwin->title_clearance, title, titlelen); } #else WMDrawString(scr->wmscreen, fwin->titlebar->window, - *fwin->title_gc, *fwin->font, x, *fwin->title_clearance + TITLEBAR_EXTRA_HEIGHT/2, + *fwin->title_gc, *fwin->font, x, *fwin->title_clearance, title, titlelen); #endif /* DRAWSTRING_PLUGIN */ diff --git a/src/moveres.c b/src/moveres.c index f1eab060..e8b9771e 100644 --- a/src/moveres.c +++ b/src/moveres.c @@ -427,7 +427,7 @@ drawTransparentFrame(WWindow *wwin, int x, int y, int width, int height) int bottom = 0; if (!WFLAGP(wwin, no_titlebar) && !wwin->flags.shaded) { - h = WMFontHeight(wwin->screen_ptr->title_font) + TITLEBAR_EXTRA_HEIGHT; + h = WMFontHeight(wwin->screen_ptr->title_font) + wPreferences.window_title_clearance * 2; } if (!WFLAGP(wwin, no_resizebar) && !wwin->flags.shaded) { /* Can't use wwin-frame->bottom_width because, in some cases @@ -1852,7 +1852,7 @@ wMouseResizeWindow(WWindow *wwin, XEvent *ev) shiftl = XKeysymToKeycode(dpy, XK_Shift_L); shiftr = XKeysymToKeycode(dpy, XK_Shift_R); if (!WFLAGP(wwin, no_titlebar)) - h = WMFontHeight(wwin->screen_ptr->title_font) + TITLEBAR_EXTRA_HEIGHT; + h = WMFontHeight(wwin->screen_ptr->title_font) + wPreferences.window_title_clearance * 2; else h = 0; while (1) { @@ -2155,7 +2155,7 @@ InteractivePlaceWindow(WWindow *wwin, int *x_ret, int *y_ret, return; } if (!WFLAGP(wwin, no_titlebar)) { - h = WMFontHeight(scr->title_font) + TITLEBAR_EXTRA_HEIGHT; + h = WMFontHeight(scr->title_font) + wPreferences.window_title_clearance * 2; height += h; } if (!WFLAGP(wwin, no_resizebar)) { diff --git a/src/placement.c b/src/placement.c index 425826fb..6b1820b8 100644 --- a/src/placement.c +++ b/src/placement.c @@ -553,7 +553,7 @@ PlaceWindow(WWindow *wwin, int *x_ret, int *y_ret, unsigned width, unsigned height) { WScreen *scr = wwin->screen_ptr; - int h = WMFontHeight(scr->title_font) + TITLEBAR_EXTRA_HEIGHT; + int h = WMFontHeight(scr->title_font) + wPreferences.window_title_clearance * 2; switch (wPreferences.window_placement) { case WPM_MANUAL: diff --git a/src/wconfig.h.in b/src/wconfig.h.in index f00b7492..66992b87 100644 --- a/src/wconfig.h.in +++ b/src/wconfig.h.in @@ -311,9 +311,9 @@ #define DEF_FRAME_THICKNESS 1 /* linewidth of the move/resize frame */ -#define DEF_WINDOW_TITLE_EXTEND_SPACE 0 -#define DEF_MENU_TITLE_EXTEND_SPACE 0 -#define DEF_MENU_TEXT_EXTEND_SPACE 0 +#define DEF_WINDOW_TITLE_EXTEND_SPACE "4" +#define DEF_MENU_TITLE_EXTEND_SPACE "4" +#define DEF_MENU_TEXT_EXTEND_SPACE "0" #define DEF_XPM_CLOSENESS 40000 @@ -534,8 +534,6 @@ #define RESIZEBAR_MIN_WIDTH 20 /* min. width of handles-corner_width */ #define RESIZEBAR_CORNER_WIDTH 28 /* width of the corner of resizebars */ -#define TITLEBAR_EXTRA_HEIGHT 8 - #define MENU_INDICATOR_SPACE 12 /* minimum size for windows */