From 02d34fa5dda14f0977b24ff87de4d274b9aab84b Mon Sep 17 00:00:00 2001 From: TheMorc Date: Sun, 7 Mar 2021 11:38:52 +0100 Subject: [PATCH 1/2] Borders: Fix stripes and whitespace around titlebar buttons & text --- mlvwm/borders.c | 31 ++++++++++--------------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/mlvwm/borders.c b/mlvwm/borders.c index 16484c7..a04cade 100644 --- a/mlvwm/borders.c +++ b/mlvwm/borders.c @@ -334,7 +334,7 @@ void DrawCloseBox( MlvwmWindow *t, Bool on ) if( Scr.flags&SYSTEM8 ){ XFillRectangle( dpy, t->title_w, Scr.Gray4GC, 4, (TITLE_HEIGHT-BOXSIZE)/2-2, - BOXSIZE+7, BOXSIZE+2 ); + BOXSIZE+2, BOXSIZE+2 ); FillGradation( t->close_b ); } else{ @@ -376,7 +376,7 @@ void DrawMinMax( MlvwmWindow *t, Bool on ) if( on ){ if( Scr.flags&SYSTEM8 ){ XFillRectangle( dpy, t->title_w, Scr.Gray4GC, - t->frame_w-BOXSIZE-15- + t->frame_w-BOXSIZE-9- (t->flags&SHADER?BOXSIZE+6:0), (TITLE_HEIGHT-BOXSIZE)/2-1, BOXSIZE+8, BOXSIZE+2 ); @@ -488,30 +488,19 @@ void SetTitleBar( MlvwmWindow *t, Bool on_off ) while( w+20>drawable && titlelength>0 ); if( on_off ){ - for( lp=4; lp<14; lp+=3 ){ + for( lp=4; lp<16; lp+=2 ){ if( Scr.d_depth>1 ){ - if( Scr.flags&SYSTEM8 ) - DrawShadowBox( 4, lp-2, t->frame_w-15, 2, t->title_w, 1, + if( Scr.flags&SYSTEM8 ) + DrawShadowBox( 4, lp-1, t->frame_w-14, 2, t->title_w, 1, Scr.WhiteGC, Scr.Gray1GC, SHADOW_ALL ); - else - DrawShadowBox( 4, lp-1, t->frame_w-11, 2, t->title_w, 1, - Scr.Gray1GC, Scr.WhiteGC, SHADOW_ALL ); + else + XDrawLine( dpy, t->title_w, Scr.Gray1GC, 0, lp, t->frame_w, lp ); } else XDrawLine( dpy, t->title_w, Scr.BlackGC, 4, lp-1, t->frame_w-7, lp-1 ); - } - if( Scr.d_depth>1 ){ - if( Scr.flags&SYSTEM8 ) - DrawShadowBox( 4, 14, t->frame_w-15, 2, t->title_w, 1, - Scr.WhiteGC, Scr.Gray1GC, SHADOW_ALL ); - else - XDrawLine( dpy, t->title_w, Scr.Gray1GC, - 4, 15, t->frame_w-9, 15 ); - } - else - XDrawLine( dpy, t->title_w, Scr.BlackGC, - 4, 15, t->frame_w-7, 15 ); + } + if( Scr.flags&SYSTEM8 ){ DrawShadowBox( 0, 0, t->frame_w-2, TITLE_HEIGHT, t->title_w, 1, Scr.WhiteGC, Scr.Gray2GC, SHADOW_TOP ); @@ -523,7 +512,7 @@ void SetTitleBar( MlvwmWindow *t, Bool on_off ) DrawShadowBox( 0, 0, t->frame_w-2, TITLE_HEIGHT, t->title_w, 1, Scr.WhiteGC, Scr.Gray2GC, SHADOW_ALL ); XFillRectangle( dpy, t->title_w, Scr.Gray4GC, - (t->frame_w-w)/2-10, 1, w+20, TITLE_HEIGHT-2 ); + (t->frame_w-w)/2-5, 1, w+10, TITLE_HEIGHT-2 ); dispgc = Scr.BlackGC; } else{ From 464b322653a76241b6bd41d7c7c22dceb71d69dc Mon Sep 17 00:00:00 2001 From: TheMorc Date: Sun, 7 Mar 2021 20:23:55 +0100 Subject: [PATCH 2/2] MLVWM: change the default font size from 14 to 12 --- mlvwm/mlvwm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mlvwm/mlvwm.h b/mlvwm/mlvwm.h index 5739634..0b5de52 100644 --- a/mlvwm/mlvwm.h +++ b/mlvwm/mlvwm.h @@ -178,9 +178,9 @@ extern Atom _XA_WM_DESKTOP; extern void Done( int, char * ); #ifdef USE_LOCALE -#define DEFAULTFS "-adobe-*-*-r-*-*-14-*-*-*-p-*-*-*,\ +#define DEFAULTFS "-adobe-*-*-r-*-*-12-*-*-*-p-*-*-*,\ -*-*-*-r-*-*-14-*-*-*-*-*-*-*" #else -#define DEFAULTFONT "-adobe-*-*-r-*-*-14-*-*-*-p-*-*-*" +#define DEFAULTFONT "-adobe-*-*-r-*-*-12-*-*-*-p-*-*-*" #endif #endif