Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
fix: refit the picker when Option changes the menu width
Ilyaa367dcdc423f
diff --git a/apps/desktop-gpui/src/tray.rs b/apps/desktop-gpui/src/tray.rsindex a4b2381d4..e9407276a 100644--- a/apps/desktop-gpui/src/tray.rs+++ b/apps/desktop-gpui/src/tray.rs@@ -1508,6 +1508,7 @@ mod mac {&& let Some(mode) = CURRENT_MODE.get(){apply(mode, held);+ refit_picker_to_menu();}});let timer = unsafe { NSTimer::timerWithTimeInterval_repeats_block(0.05, true, &block) };@@ -1519,6 +1520,20 @@ mod mac {});}+ pub(super) fn refit_picker_to_menu() {+ ROWS.with(|rows| {+ let rows = rows.borrow();+ let Some(row) = rows.first() else {+ return;+ };+ let Some(menu) = (unsafe { row.item.menu() }) else {+ return;+ };+ menu.update();+ super::mac_mode_picker::fit_to_menu_width(menu.size().width);+ });+ }+pub(super) fn stop_option_tracking() {OPTION_TIMER.with(|slot| {if let Some(timer) = slot.borrow_mut().take() {