mirror of
https://github.com/morgant/mlvwm.git
synced 2024-11-22 01:31:16 +00:00
More accurate rendering & positioning of close & min/max title bar buttons, esp. for default System7 theme. Issue #16
This commit is contained in:
parent
708a30f602
commit
5fd232652b
@ -204,7 +204,7 @@ void create_titlebar( MlvwmWindow *tmp_win )
|
||||
if( tmp_win->flags&CLOSER ){
|
||||
attributes.cursor = Scr.MlvwmCursors[DESTROY];
|
||||
tmp_win->close_b = XCreateWindow( dpy, tmp_win->title_w,
|
||||
Scr.flags&SYSTEM8?2:BOXSIZE+1,
|
||||
Scr.flags&SYSTEM8?2:BOXSIZE-3,
|
||||
(TITLE_HEIGHT-BOXSIZE)/2,
|
||||
BOXSIZE, BOXSIZE, 0,
|
||||
CopyFromParent, InputOutput,
|
||||
@ -215,7 +215,7 @@ void create_titlebar( MlvwmWindow *tmp_win )
|
||||
if( tmp_win->flags&MINMAXR ){
|
||||
attributes.cursor = Scr.MlvwmCursors[SELECT];
|
||||
tmp_win->minmax_b = XCreateWindow( dpy, tmp_win->title_w,
|
||||
tmp_win->frame_w-BOXSIZE*2-1,
|
||||
tmp_win->frame_w-(BOXSIZE*2-3),
|
||||
(TITLE_HEIGHT-BOXSIZE)/2,
|
||||
BOXSIZE, BOXSIZE, 0,
|
||||
CopyFromParent, InputOutput,
|
||||
|
@ -133,7 +133,7 @@ void SetUpFrame( MlvwmWindow *t, int x, int y, int w, int h, Bool sendEvent )
|
||||
(TITLE_HEIGHT-BOXSIZE)/2);
|
||||
else
|
||||
XMoveWindow(dpy, t->minmax_b,
|
||||
w-BOXSIZE*2-1,
|
||||
w-(BOXSIZE*2-2),
|
||||
(TITLE_HEIGHT-BOXSIZE)/2);
|
||||
}
|
||||
if( t->flags&SHADER )
|
||||
@ -339,8 +339,8 @@ void DrawCloseBox( MlvwmWindow *t, Bool on )
|
||||
}
|
||||
else{
|
||||
XFillRectangle( dpy, t->title_w, Scr.Gray4GC,
|
||||
BOXSIZE-1, (TITLE_HEIGHT-BOXSIZE)/2-1,
|
||||
BOXSIZE+4, BOXSIZE+1 );
|
||||
BOXSIZE-4, (TITLE_HEIGHT-BOXSIZE)/2-1,
|
||||
BOXSIZE+2, BOXSIZE+1 );
|
||||
DrawShadowBox( 0, 0, BOXSIZE, BOXSIZE, t->close_b, 1,
|
||||
Scr.BlackGC, Scr.WhiteGC, SHADOW_ALL );
|
||||
DrawShadowBox( 1, 1, BOXSIZE-2, BOXSIZE-2, t->close_b, 1,
|
||||
@ -386,13 +386,13 @@ void DrawMinMax( MlvwmWindow *t, Bool on )
|
||||
}
|
||||
else{
|
||||
XFillRectangle( dpy, t->title_w, Scr.Gray4GC,
|
||||
t->frame_w-BOXSIZE*2-3,(TITLE_HEIGHT-BOXSIZE)/2-1,
|
||||
BOXSIZE+4, BOXSIZE+1 );
|
||||
t->frame_w-(BOXSIZE*2-1),(TITLE_HEIGHT-BOXSIZE)/2-1,
|
||||
BOXSIZE+2, BOXSIZE+1 );
|
||||
DrawShadowBox( 0, 0, BOXSIZE, BOXSIZE, t->minmax_b, 1,
|
||||
Scr.BlackGC, Scr.WhiteGC, SHADOW_ALL );
|
||||
DrawShadowBox( 1, 1, BOXSIZE-2, BOXSIZE-2, t->minmax_b, 1,
|
||||
Scr.WhiteGC, Scr.BlackGC, SHADOW_ALL );
|
||||
DrawShadowBox( 1, 1, BOXSIZE-6, BOXSIZE-6, t->minmax_b, 1,
|
||||
DrawShadowBox( 1, 1, BOXSIZE-5, BOXSIZE-5, t->minmax_b, 1,
|
||||
Scr.WhiteGC, Scr.BlackGC, SHADOW_ALL );
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
#define TITLE_HEIGHT 20
|
||||
#define BOXSIZE 13
|
||||
#define BOXSIZE (Scr.flags&SYSTEM8?13:11)
|
||||
#define SBAR_WH Scr.bar_width
|
||||
|
||||
extern Display *dpy;
|
||||
|
Loading…
Reference in New Issue
Block a user