@@ -38,7 +38,7 @@ const ACTIVE_REPAINT_INTERVAL: Duration = Duration::from_millis(100);
3838const IDLE_REPAINT_INTERVAL : Duration = Duration :: from_secs ( 5 ) ;
3939const TRAY_REPAINT_INTERVAL : Duration = Duration :: from_secs ( 15 ) ;
4040const EMBEDDED_CJK_FONT : & [ u8 ] = include_bytes ! ( "../assets/fonts/DroidSansFallbackFull.ttf" ) ;
41- const LAUNCHER_WINDOW_SIZE : [ f32 ; 2 ] = [ 720.0 , 290 .0] ;
41+ const LAUNCHER_WINDOW_SIZE : [ f32 ; 2 ] = [ 720.0 , 260 .0] ;
4242const DETAILS_WINDOW_SIZE : [ f32 ; 2 ] = [ 760.0 , 520.0 ] ;
4343const TITLE_BAR_HEIGHT : f32 = 52.0 ;
4444
@@ -654,18 +654,18 @@ impl AcceleratorApp {
654654 . stroke ( egui:: Stroke :: new ( 1.0 , egui:: Color32 :: from_rgb ( 60 , 66 , 74 ) ) )
655655 . inner_margin ( egui:: Margin {
656656 left : 18 ,
657- right : 16 ,
658- top : 16 ,
659- bottom : 16 ,
657+ right : 14 ,
658+ top : 12 ,
659+ bottom : 12 ,
660660 } )
661661 . corner_radius ( egui:: CornerRadius :: same ( 14 ) )
662662 . show ( ui, |ui| {
663- ui. set_min_size ( egui:: vec2 ( 0.0 , 84 .0) ) ;
664- ui. vertical_centered_justified ( |ui| {
663+ ui. set_min_size ( egui:: vec2 ( 0.0 , 44 .0) ) ;
664+ ui. vertical ( |ui| {
665665 ui. horizontal ( |ui| {
666666 ui. label (
667667 RichText :: new ( "●" )
668- . font ( FontId :: proportional ( 14 .0) )
668+ . font ( FontId :: proportional ( 12 .0) )
669669 . color ( accent) ,
670670 ) ;
671671 ui. label (
@@ -675,15 +675,15 @@ impl AcceleratorApp {
675675 "异常" => "加速异常" ,
676676 _ => "等待启动" ,
677677 } )
678- . font ( FontId :: proportional ( 18 .0) )
678+ . font ( FontId :: proportional ( 16 .0) )
679679 . strong ( )
680680 . color ( accent) ,
681681 ) ;
682682 } ) ;
683- ui. add_space ( 6 .0) ;
683+ ui. add_space ( 4 .0) ;
684684 ui. label (
685685 RichText :: new ( detail_text)
686- . font ( FontId :: proportional ( 12.4 ) )
686+ . font ( FontId :: proportional ( 12.0 ) )
687687 . color ( egui:: Color32 :: from_rgb ( 206 , 212 , 218 ) ) ,
688688 ) ;
689689 } ) ;
@@ -692,7 +692,7 @@ impl AcceleratorApp {
692692 // Draw accent color bar on the left edge
693693 let bar_rect = egui:: Rect :: from_min_size (
694694 outer_rect. min ,
695- egui:: vec2 ( 4.0 , ui. min_rect ( ) . height ( ) . max ( 84 .0) ) ,
695+ egui:: vec2 ( 4.0 , ui. min_rect ( ) . height ( ) . max ( 44 .0) ) ,
696696 ) ;
697697 ui. painter ( ) . rect_filled (
698698 bar_rect,
@@ -731,19 +731,19 @@ impl AcceleratorApp {
731731 )
732732 } ;
733733
734- ui. spacing_mut ( ) . item_spacing = egui:: vec2 ( 12 .0, 12 .0) ;
734+ ui. spacing_mut ( ) . item_spacing = egui:: vec2 ( 10 .0, 10 .0) ;
735735 ui. vertical ( |ui| {
736736 ui. columns ( 2 , |columns| {
737737 let left_width = columns[ 0 ] . available_width ( ) ;
738738 if columns[ 0 ]
739739 . add_sized (
740- [ left_width, 84 .0] ,
740+ [ left_width, 68 .0] ,
741741 launcher_primary_button (
742742 primary_label,
743743 primary_fill,
744744 primary_text,
745745 primary_stroke,
746- egui:: vec2 ( left_width, 84 .0) ,
746+ egui:: vec2 ( left_width, 68 .0) ,
747747 !self . busy ,
748748 ) ,
749749 )
@@ -761,11 +761,11 @@ impl AcceleratorApp {
761761 } ) ;
762762
763763 ui. horizontal ( |ui| {
764- let button_width = ( ( ui. available_width ( ) - 24 .0) / 3.0 ) . max ( 120.0 ) ;
764+ let button_width = ( ( ui. available_width ( ) - 20 .0) / 3.0 ) . max ( 120.0 ) ;
765765 if ui
766766 . add ( launcher_secondary_button (
767- "# 详情" ,
768- egui:: vec2 ( button_width, 54 .0) ,
767+ "详情" ,
768+ egui:: vec2 ( button_width, 38 .0) ,
769769 true ,
770770 ) )
771771 . clicked ( )
@@ -774,8 +774,8 @@ impl AcceleratorApp {
774774 }
775775 if ui
776776 . add ( launcher_secondary_button (
777- "* 设置" ,
778- egui:: vec2 ( button_width, 54 .0) ,
777+ "设置" ,
778+ egui:: vec2 ( button_width, 38 .0) ,
779779 true ,
780780 ) )
781781 . clicked ( )
@@ -784,8 +784,8 @@ impl AcceleratorApp {
784784 }
785785 if ui
786786 . add ( launcher_secondary_button (
787- "i 关于" ,
788- egui:: vec2 ( button_width, 54 .0) ,
787+ "关于" ,
788+ egui:: vec2 ( button_width, 38 .0) ,
789789 true ,
790790 ) )
791791 . clicked ( )
@@ -1951,7 +1951,7 @@ fn launcher_primary_button(
19511951
19521952 egui:: Button :: new (
19531953 RichText :: new ( label)
1954- . font ( FontId :: proportional ( 20 .0) )
1954+ . font ( FontId :: proportional ( 17 .0) )
19551955 . strong ( )
19561956 . color ( text) ,
19571957 )
@@ -1987,13 +1987,13 @@ fn launcher_secondary_button(
19871987
19881988 egui:: Button :: new (
19891989 RichText :: new ( label)
1990- . font ( FontId :: proportional ( 15.0 ) )
1990+ . font ( FontId :: proportional ( 13.5 ) )
19911991 . strong ( )
19921992 . color ( text) ,
19931993 )
19941994 . fill ( fill)
19951995 . stroke ( egui:: Stroke :: new ( 1.0 , stroke) )
1996- . corner_radius ( egui:: CornerRadius :: same ( 14 ) )
1996+ . corner_radius ( egui:: CornerRadius :: same ( 10 ) )
19971997 . min_size ( min_size)
19981998}
19991999
0 commit comments