@@ -27,9 +27,11 @@ extern crate dirs;
2727extern crate winapi;
2828
2929mod styling {
30+ pub mod _general_styles;
3031 pub mod button_styles;
3132 pub mod slider_styles;
3233}
34+ use styling:: _general_styles:: text_sizes;
3335use styling:: button_styles;
3436use styling:: slider_styles;
3537
@@ -379,7 +381,7 @@ impl Application for RustCraft {
379381 let mut minecraft_dir_button = Button :: new (
380382 Text :: new ( "Select Minecraft Directory" )
381383 . font ( MONOCRAFT )
382- . size ( 20 ) ,
384+ . size ( text_sizes :: PRIMARY ) ,
383385 )
384386 . padding ( 10 )
385387 . width ( Length :: Fixed ( 370f32 ) )
@@ -396,12 +398,12 @@ impl Application for RustCraft {
396398 . clone ( ) ,
397399 )
398400 . font ( MONOCRAFT )
399- . size ( 18 ) ;
401+ . size ( text_sizes :: SECONDARY ) ;
400402
401403 let mut backup_dir_button = Button :: new (
402404 Text :: new ( "Select Backup Directory" )
403405 . font ( MONOCRAFT )
404- . size ( 20 ) ,
406+ . size ( text_sizes :: PRIMARY ) ,
405407 )
406408 . padding ( 10 )
407409 . width ( Length :: Fixed ( 370f32 ) )
@@ -418,7 +420,7 @@ impl Application for RustCraft {
418420 . clone ( ) ,
419421 )
420422 . font ( MONOCRAFT )
421- . size ( 18 ) ;
423+ . size ( text_sizes :: SECONDARY ) ;
422424
423425 let schedule_slider = Slider :: new ( 0 ..=24 , self . schedule_hours , Message :: ScheduleChanged )
424426 . step ( 1 )
@@ -428,11 +430,11 @@ impl Application for RustCraft {
428430 let schedule_text = if self . schedule_hours == 0 {
429431 Text :: new ( "Perform a one-time backup" )
430432 . font ( MONOCRAFT )
431- . size ( 18 )
433+ . size ( text_sizes :: SECONDARY )
432434 } else {
433435 Text :: new ( format ! ( "Schedule every {} hours" , self . schedule_hours) )
434436 . font ( MONOCRAFT )
435- . size ( 18 )
437+ . size ( text_sizes :: SECONDARY )
436438 } ;
437439
438440 let minecraft_dir_column = Column :: new ( )
@@ -457,13 +459,6 @@ impl Application for RustCraft {
457459 . push ( schedule_slider)
458460 . push ( schedule_text) ;
459461
460- let image = Image :: new ( self . image_path . clone ( ) ) . width ( Length :: Fill ) ;
461-
462- let image_column = Column :: new ( )
463- . align_items ( Alignment :: Center )
464- . width ( Length :: FillPortion ( 1 ) )
465- . push ( image) ;
466-
467462 let timer_display: Element < Message > = if self . active_schedule {
468463 if let Some ( last_backup_time) = self . last_backup_time {
469464 let elapsed = last_backup_time. elapsed ( ) . as_secs ( ) ;
@@ -488,9 +483,17 @@ impl Application for RustCraft {
488483 Text :: new ( "" ) . into ( )
489484 } ;
490485
486+ let image = Image :: new ( self . image_path . clone ( ) ) . width ( Length :: Fill ) ;
487+
488+ let image_column = Column :: new ( )
489+ . align_items ( Alignment :: Center )
490+ . width ( Length :: FillPortion ( 1 ) )
491+ . push ( image) ;
492+
491493 let buttons_column = Column :: new ( )
492494 . align_items ( Alignment :: Center )
493495 . spacing ( 20 )
496+ . padding ( 20 )
494497 . push ( minecraft_dir_column)
495498 . push ( backup_dir_column)
496499 . push ( schedule_slider_column)
0 commit comments