Enable panel switching
This commit is contained in:
parent
7f70712dac
commit
0a9fb3978b
15 changed files with 203 additions and 131 deletions
|
@ -97,7 +97,7 @@ use text::{OffsetUtf16, Rope};
|
|||
use theme::{
|
||||
ActiveTheme, DiagnosticStyle, PlayerColor, SyntaxTheme, Theme, ThemeColors, ThemeSettings,
|
||||
};
|
||||
use ui::{v_stack, HighlightedLabel, IconButton, StyledExt, TextTooltip};
|
||||
use ui::{v_stack, HighlightedLabel, IconButton, StyledExt, Tooltip};
|
||||
use util::{post_inc, RangeExt, ResultExt, TryFutureExt};
|
||||
use workspace::{
|
||||
item::{ItemEvent, ItemHandle},
|
||||
|
@ -9985,7 +9985,7 @@ pub fn diagnostic_block_renderer(diagnostic: Diagnostic, is_valid: bool) -> Rend
|
|||
.on_click(move |_, _, cx| {
|
||||
cx.write_to_clipboard(ClipboardItem::new(message.clone()));
|
||||
})
|
||||
.tooltip(|_, cx| cx.build_view(|cx| TextTooltip::new("Copy diagnostic message")))
|
||||
.tooltip(|_, cx| Tooltip::text("Copy diagnostic message", cx))
|
||||
.render()
|
||||
})
|
||||
}
|
||||
|
|
|
@ -12,8 +12,8 @@ use crate::{
|
|||
},
|
||||
scroll::scroll_amount::ScrollAmount,
|
||||
CursorShape, DisplayPoint, Editor, EditorMode, EditorSettings, EditorSnapshot, EditorStyle,
|
||||
HalfPageDown, HalfPageUp, LineDown, LineUp, MoveDown, PageDown, PageUp, Point, SelectPhase,
|
||||
Selection, SoftWrap, ToPoint, MAX_LINE_LEN,
|
||||
HalfPageDown, HalfPageUp, LineDown, LineUp, MoveDown, OpenExcerpts, PageDown, PageUp, Point,
|
||||
SelectPhase, Selection, SoftWrap, ToPoint, MAX_LINE_LEN,
|
||||
};
|
||||
use anyhow::Result;
|
||||
use collections::{BTreeMap, HashMap};
|
||||
|
@ -45,7 +45,7 @@ use std::{
|
|||
};
|
||||
use sum_tree::Bias;
|
||||
use theme::{ActiveTheme, PlayerColor};
|
||||
use ui::{h_stack, IconButton};
|
||||
use ui::{h_stack, IconButton, Tooltip};
|
||||
use util::ResultExt;
|
||||
use workspace::item::Item;
|
||||
|
||||
|
@ -2036,7 +2036,9 @@ impl EditorElement {
|
|||
.on_click(move |editor: &mut Editor, cx| {
|
||||
editor.jump(jump_path.clone(), jump_position, jump_anchor, cx);
|
||||
})
|
||||
.tooltip("Jump to Buffer") // todo!(pass an action as well to show key binding)
|
||||
.tooltip(move |_, cx| {
|
||||
Tooltip::for_action("Jump to Buffer", &OpenExcerpts, cx)
|
||||
})
|
||||
});
|
||||
|
||||
let element = if *starts_new_buffer {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue