@@ -43,7 +43,7 @@ use gpui::{
Bounds, ClickEvent, ClipboardItem, ContentMask, Context, Corner, Corners, CursorStyle,
DispatchPhase, Edges, Element, ElementInputHandler, Entity, Focusable as _, FontId,
GlobalElementId, Hitbox, HitboxBehavior, Hsla, InteractiveElement, IntoElement, IsZero,
- KeybindingKeystroke, Length, ModifiersChangedEvent, MouseButton, MouseClickEvent,
+ KeybindingKeystroke, Length, Modifiers, ModifiersChangedEvent, MouseButton, MouseClickEvent,
MouseDownEvent, MouseMoveEvent, MouseUpEvent, PaintQuad, ParentElement, Pixels, ScrollDelta,
ScrollHandle, ScrollWheelEvent, ShapedLine, SharedString, Size, StatefulInteractiveElement,
Style, Styled, TextRun, TextStyleRefinement, WeakEntity, Window, anchored, deferred, div, fill,
@@ -86,7 +86,7 @@ use theme::{ActiveTheme, Appearance, BufferLineHeight, PlayerColor};
use ui::utils::ensure_minimum_contrast;
use ui::{
ButtonLike, ContextMenu, Indicator, KeyBinding, POPOVER_Y_PADDING, Tooltip, h_flex, prelude::*,
- right_click_menu, scrollbars::ShowScrollbar,
+ right_click_menu, scrollbars::ShowScrollbar, text_for_keystroke,
};
use unicode_segmentation::UnicodeSegmentation;
use util::post_inc;
@@ -3844,11 +3844,14 @@ impl EditorElement {
Tooltip::with_meta_in(
"Toggle Excerpt Fold",
Some(&ToggleFold),
- if cfg!(target_os = "macos") {
- "Option+click to toggle all"
- } else {
- "Alt+click to toggle all"
- },
+ format!(
+ "{} to toggle all",
+ text_for_keystroke(
+ &Modifiers::alt(),
+ "click",
+ cx
+ )
+ ),
&focus_handle,
window,
cx,