6
6
import java .awt .*;
7
7
8
8
public class DefaultBar implements BorderBar {
9
+ public static final int bar_tin =30 ;
10
+ public static final int button_width =40 ;
9
11
public Rect bar_rect ;
10
12
public Color c ;
11
13
public BorderLessDisplay display ;
@@ -14,19 +16,19 @@ public DefaultBar(BorderLessDisplay borderLessDisplay) {
14
16
}
15
17
16
18
public DefaultBar (BorderLessDisplay borderLessDisplay ,Color c ) {
17
- this .bar_rect =new Rect (0 ,0 ,borderLessDisplay .getWidth (),40 );
19
+ this .bar_rect =new Rect (0 ,0 ,borderLessDisplay .getWidth (),bar_tin );
18
20
this .c =c ;
19
21
this .mouseinput =borderLessDisplay .mouseInputHandler ;
20
22
this .display =borderLessDisplay ;
21
- final Rect min_rect =new Rect (borderLessDisplay .getWidth ()-60 *3 ,0 ,borderLessDisplay .getWidth ()-60 *2 ,40 );
23
+ final Rect min_rect =new Rect (borderLessDisplay .getWidth ()-button_width *3 ,0 ,borderLessDisplay .getWidth ()-button_width *2 ,bar_tin );
22
24
final int min_bar_rect_tin =1 ;
23
- final int min_bar_rect_width =30 ;
25
+ final int min_bar_rect_width =20 ;
24
26
this .minButton =new MinimumButton (min_rect ,new Rect (min_rect .left_up .x +(min_rect .getWidth ()-min_bar_rect_width )/2 ,min_rect .left_up .y +(min_rect .getHeight ()-min_bar_rect_tin )/2 ,min_rect .left_up .x +(min_rect .getWidth ()+min_bar_rect_width )/2 ,min_rect .left_up .y +(min_rect .getHeight ()+min_bar_rect_tin )/2 ),new Color (255 ,255 ,255 ),new Color (53 , 104 , 255 ));
25
- final Rect max_rect = new Rect (borderLessDisplay .getWidth ()-60 *2 ,0 ,borderLessDisplay .getWidth ()-60 *1 ,40 );
27
+ final Rect max_rect = new Rect (borderLessDisplay .getWidth ()-button_width *2 ,0 ,borderLessDisplay .getWidth ()-button_width *1 ,bar_tin );
26
28
final int max_bar_rect_tin =20 ;
27
29
final int max_bar_rect_width =20 ;
28
30
this .maxButton =new MaximumButton (max_rect ,new Rect (max_rect .left_up .x +(max_rect .getWidth ()/2 -max_bar_rect_width /2 ),max_rect .left_up .y +(max_rect .getHeight ()/2 -max_bar_rect_tin /2 ),max_rect .left_up .x +(max_rect .getWidth ()/2 +max_bar_rect_width /2 ),max_rect .left_up .y +(max_rect .getHeight ()/2 +max_bar_rect_tin /2 )),new Color (255 ,255 ,255 ),new Color (53 , 104 , 255 ));
29
- final Rect close_rect = new Rect (borderLessDisplay .getWidth ()-60 *1 ,0 ,borderLessDisplay .getWidth ()/*-60 *0*/ ,40 );
31
+ final Rect close_rect = new Rect (borderLessDisplay .getWidth ()-button_width *1 ,0 ,borderLessDisplay .getWidth ()/*-button_width *0*/ ,bar_tin );
30
32
final int close_bar_rect_tin =20 ;
31
33
final int close_bar_rect_width =20 ;
32
34
this .closeButton =new CloseButton (close_rect ,new Rect (close_rect .left_up .x +(close_rect .getWidth ()/2 -close_bar_rect_width /2 ),close_rect .left_up .y +(close_rect .getHeight ()/2 -close_bar_rect_tin /2 ),close_rect .left_up .x +(close_rect .getWidth ()/2 +close_bar_rect_width /2 ),close_rect .left_up .y +(close_rect .getHeight ()/2 +close_bar_rect_tin /2 )),new Color (255 ,255 ,255 ),new Color (255 , 19 , 19 ));
0 commit comments