Full pages get a back arrow beside the title (Esc still works)
Browse files at this commit4aba987a6474d1cf3e154149ea719a69a30e1b7cParent: 9f9d719- style
- full pages get a back arrow beside the title (Esc still works)
3 changed files +35 -15
- crates/client/lang/en/settings_page.txt +1 -1
- crates/client/lang/tr/settings_page.txt +1 -1
- crates/client/src/gui/settings_page.rs +33 -13
crates/client/lang/en/settings_page.txtmodified+1 -1
| @@ -24,4 +24,4 @@ quality = Quality | |||
| 24 | frame_rate = Frame rate | 24 | frame_rate = Frame rate |
| 25 | codec = Codec | 25 | codec = Codec |
| 26 | share_audio = Share audio | 26 | share_audio = Share audio |
| 27 | -back_esc = esc · back to chat | 27 | +back_esc = Back (esc) |
crates/client/lang/tr/settings_page.txtmodified+1 -1
| @@ -24,4 +24,4 @@ quality = Kalite | |||
| 24 | frame_rate = Kare hızı | 24 | frame_rate = Kare hızı |
| 25 | codec = Kodek | 25 | codec = Kodek |
| 26 | share_audio = Sesi paylaş | 26 | share_audio = Sesi paylaş |
| 27 | -back_esc = esc · sohbete dön | 27 | +back_esc = Geri (esc) |
crates/client/src/gui/settings_page.rsmodified+33 -13
| @@ -626,22 +626,42 @@ pub(super) fn frame( | |||
| 626 | .child( | 626 | .child( |
| 627 | div() | 627 | div() |
| 628 | .pb(px(space::XL)) | 628 | .pb(px(space::XL)) |
| 629 | - .text_size(text(text::TITLE)) | 629 | + .flex() |
| 630 | - .text_color(palette.tokens.paper()) | 630 | + .items_center() |
| 631 | - .child(title), | 631 | + .gap(px(space::XS)) |
| 632 | + .ml(px(-space::SM)) | ||
| 633 | + .child( | ||
| 634 | + clickable("page_back", palette, move |window, cx| { | ||
| 635 | + back.update(cx, |yumush, cx| { | ||
| 636 | + yumush.show_view(View::Chat, window, cx) | ||
| 637 | + }); | ||
| 638 | + }) | ||
| 639 | + .tip(w().settings_page.back_esc) | ||
| 640 | + .size(px(size::CONTROL_SM)) | ||
| 641 | + .flex_shrink_0() | ||
| 642 | + .flex() | ||
| 643 | + .items_center() | ||
| 644 | + .justify_center() | ||
| 645 | + .rounded_full() | ||
| 646 | + .text_color(palette.muted) | ||
| 647 | + .child( | ||
| 648 | + gpui_kit::component::Icon::new( | ||
| 649 | + gpui_kit::assets::IconName::ArrowLeft, | ||
| 650 | + ) | ||
| 651 | + .size(px(size::ICON)), | ||
| 652 | + ), | ||
| 653 | + ) | ||
| 654 | + .child( | ||
| 655 | + div() | ||
| 656 | + .min_w_0() | ||
| 657 | + .text_size(text(text::TITLE)) | ||
| 658 | + .text_color(palette.tokens.paper()) | ||
| 659 | + .child(title), | ||
| 660 | + ), | ||
| 632 | ) | 661 | ) |
| 633 | .children(index) | 662 | .children(index) |
| 634 | .child(div().flex_1()) | 663 | .child(div().flex_1()) |
| 635 | - .children(footer) | 664 | + .children(footer), |
| 636 | - .child( | ||
| 637 | - clickable("page_back", palette, move |window, cx| { | ||
| 638 | - back.update(cx, |yumush, cx| yumush.show_view(View::Chat, window, cx)); | ||
| 639 | - }) | ||
| 640 | - .pt(px(space::MD)) | ||
| 641 | - .text_size(text(text::CAPTION)) | ||
| 642 | - .text_color(palette.tokens.faint()) | ||
| 643 | - .child(w().settings_page.back_esc), | ||
| 644 | - ), | ||
| 645 | ) | 665 | ) |
| 646 | .child( | 666 | .child( |
| 647 | div() | 667 | div() |