@@ -18,22 +18,31 @@ use iced::{
1818 } ,
1919} ;
2020
21+ /* Since in Linux the 12th font was too large, and therefore the window did
22+ * not fit the “OK” button, we change this value to 10. In Windows, the 12th
23+ * font is also quite comfortable.
24+ */
25+ #[ cfg( windows) ]
26+ const SMALL_TEXT_SIZE : u16 = 12 ;
27+ #[ cfg( unix) ]
28+ const SMALL_TEXT_SIZE : u16 = 10 ;
29+
2130impl TimeKeeper {
2231 pub fn about_page ( & self ) -> Element < Message > {
2332 let about_devs = column ! [
2433 column![
2534 row![ text( "Идея и реализация" ) , horizontal_rule( 0 ) ]
2635 . spacing( 5 )
2736 . align_y( Center ) ,
28- text( "Михаил Краснов <https://github.com/mskrasnov>" ) . size( 12 ) ,
37+ text( "Михаил Краснов <https://github.com/mskrasnov>" ) . size( SMALL_TEXT_SIZE ) ,
2938 ]
3039 . spacing( 3 ) ,
3140 column![
3241 row![ text( "Другие участники" ) , horizontal_rule( 0 ) ]
3342 . spacing( 5 )
3443 . align_y( Center ) ,
35- text( "Данила Макаров: дизайн, текст проекта" ) . size( 12 ) ,
36- text( "Максим Марушин: тестирование, текст проекта" ) . size( 12 ) ,
44+ text( "Данила Макаров: дизайн, текст проекта" ) . size( SMALL_TEXT_SIZE ) ,
45+ text( "Максим Марушин: тестирование, текст проекта" ) . size( SMALL_TEXT_SIZE ) ,
3746 ]
3847 . spacing( 3 ) ,
3948 column![
@@ -42,11 +51,11 @@ impl TimeKeeper {
4251 . align_y( Center ) ,
4352 row![
4453 url_button( "Сайт" , PROG_SITE ) . on_press( Message :: OpenSiteUrl ) ,
45- text( "|" ) . size( 12 ) ,
54+ text( "|" ) . size( SMALL_TEXT_SIZE ) ,
4655 url_button( "Репозиторий" , PROG_REPO ) . on_press( Message :: OpenRepoUrl ) ,
47- text( "|" ) . size( 12 ) ,
56+ text( "|" ) . size( SMALL_TEXT_SIZE ) ,
4857 url_button( "crates.io" , PROG_CRATES_URL ) . on_press( Message :: OpenCratesUrl ) ,
49- text( "|" ) . size( 12 ) ,
58+ text( "|" ) . size( SMALL_TEXT_SIZE ) ,
5059 url_button( "Telegram" , PROG_TELEGRAM ) . on_press( Message :: OpenTelegramUrl ) ,
5160 ]
5261 . spacing( 5 ) ,
0 commit comments