66import java .awt .*;
77
88public class DefaultBar implements BorderBar {
9+ public static final int bar_tin =30 ;
10+ public static final int button_width =40 ;
911 public Rect bar_rect ;
1012 public Color c ;
1113 public BorderLessDisplay display ;
@@ -14,19 +16,19 @@ public DefaultBar(BorderLessDisplay borderLessDisplay) {
1416 }
1517
1618 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 );
1820 this .c =c ;
1921 this .mouseinput =borderLessDisplay .mouseInputHandler ;
2022 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 );
2224 final int min_bar_rect_tin =1 ;
23- final int min_bar_rect_width =30 ;
25+ final int min_bar_rect_width =20 ;
2426 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 );
2628 final int max_bar_rect_tin =20 ;
2729 final int max_bar_rect_width =20 ;
2830 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 );
3032 final int close_bar_rect_tin =20 ;
3133 final int close_bar_rect_width =20 ;
3234 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