Add_Window&Borders: Move placement of titlebar buttons

These changes don't seem to break the System7 theme at all.
This commit is contained in:
TheMorc 2021-03-07 11:16:42 +01:00
parent 0a3517159f
commit 882e556d35
2 changed files with 7 additions and 7 deletions

View File

@ -204,7 +204,7 @@ void create_titlebar( MlvwmWindow *tmp_win )
if( tmp_win->flags&CLOSER ){ if( tmp_win->flags&CLOSER ){
attributes.cursor = Scr.MlvwmCursors[DESTROY]; attributes.cursor = Scr.MlvwmCursors[DESTROY];
tmp_win->close_b = XCreateWindow( dpy, tmp_win->title_w, tmp_win->close_b = XCreateWindow( dpy, tmp_win->title_w,
Scr.flags&SYSTEM8?4:BOXSIZE+1, Scr.flags&SYSTEM8?2:BOXSIZE+1,
(TITLE_HEIGHT-BOXSIZE)/2, (TITLE_HEIGHT-BOXSIZE)/2,
BOXSIZE, BOXSIZE, 0, BOXSIZE, BOXSIZE, 0,
CopyFromParent, InputOutput, CopyFromParent, InputOutput,

View File

@ -55,13 +55,13 @@ void DrawShadowBox( int x, int y, int w, int h, Window win, int d, GC hilight, G
h--; h--;
for( lp=0; lp<d; lp++ ){ for( lp=0; lp<d; lp++ ){
if( mode&SHADOW_BOTTOM ) if( mode&SHADOW_BOTTOM )
XDrawLine( dpy, win, shadow, x+lp, y+h-lp, x+w-lp, y+h-lp ); XDrawLine( dpy, win, shadow, x+lp+1, y+h-lp, x+w-lp, y+h-lp );
if( mode&SHADOW_LEFT ) if( mode&SHADOW_LEFT )
XDrawLine( dpy, win, hilight, x+lp, y+lp, x+lp, y+h-lp ); XDrawLine( dpy, win, hilight, x+lp, y+lp, x+lp, y+h-lp-1 );
if( mode&SHADOW_TOP ) if( mode&SHADOW_TOP )
XDrawLine( dpy, win, hilight, x+lp, y+lp, x+w-lp, y+lp ); XDrawLine( dpy, win, hilight, x+lp, y+lp, x+w-lp-1, y+lp );
if( mode&SHADOW_RIGHT ) if( mode&SHADOW_RIGHT )
XDrawLine( dpy, win, shadow, x+w-lp, y+lp, x+w-lp, y+h-lp ); XDrawLine( dpy, win, shadow, x+w-lp, y+lp+1, x+w-lp, y+h-lp-1 );
} }
} }
@ -129,7 +129,7 @@ void SetUpFrame( MlvwmWindow *t, int x, int y, int w, int h, Bool sendEvent )
if( t->flags&MINMAXR ){ if( t->flags&MINMAXR ){
if( Scr.flags&SYSTEM8 ) if( Scr.flags&SYSTEM8 )
XMoveWindow(dpy, t->minmax_b, XMoveWindow(dpy, t->minmax_b,
w-BOXSIZE-9-(t->flags&SHADER?BOXSIZE+4:0), w-BOXSIZE-7-(t->flags&SHADER?BOXSIZE+4:0),
(TITLE_HEIGHT-BOXSIZE)/2); (TITLE_HEIGHT-BOXSIZE)/2);
else else
XMoveWindow(dpy, t->minmax_b, XMoveWindow(dpy, t->minmax_b,
@ -137,7 +137,7 @@ void SetUpFrame( MlvwmWindow *t, int x, int y, int w, int h, Bool sendEvent )
(TITLE_HEIGHT-BOXSIZE)/2); (TITLE_HEIGHT-BOXSIZE)/2);
} }
if( t->flags&SHADER ) if( t->flags&SHADER )
XMoveWindow(dpy, t->shade_b, w-BOXSIZE-9, XMoveWindow(dpy, t->shade_b, w-BOXSIZE-8,
(TITLE_HEIGHT-BOXSIZE)/2); (TITLE_HEIGHT-BOXSIZE)/2);
if( !(t->flags&SHADE) ){ if( !(t->flags&SHADE) ){
if( t->flags & ( TITLE | SBARV | SBARH | RESIZER ) ){ if( t->flags & ( TITLE | SBARV | SBARH | RESIZER ) ){