sidebar: Improve toggle button placement when fullscreen on macOS (#49524)
Finn Evers
created
| Before | After |
| --- | --- |
| <img width="173" height="66" alt="grafik"
src="https://github.com/user-attachments/assets/9e406cf7-67bc-45d9-97dc-6e18515d0206"
/> | <img width="189" height="70" alt="grafik"
src="https://github.com/user-attachments/assets/b37a0c64-4130-4521-be7e-084a69c5a9c8"
/> |
Release Notes:
- N/A
Change summary
crates/sidebar/src/sidebar.rs | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
Detailed changes
@@ -1092,10 +1092,11 @@ impl Render for Sidebar {
.mt_px()
.pb_px()
.pr_1()
- .when(cfg!(target_os = "macos"), |this| {
- this.pl(px(TRAFFIC_LIGHT_PADDING))
- })
- .when(cfg!(not(target_os = "macos")), |this| this.pl_2())
+ .when_else(
+ cfg!(target_os = "macos") && !window.is_fullscreen(),
+ |this| this.pl(px(TRAFFIC_LIGHT_PADDING)),
+ |this| this.pl_2(),
+ )
.justify_between()
.border_b_1()
.border_color(cx.theme().colors().border)