debugger: Truncate long session and thread names (#33790)
Related to #33072 Release Notes: - debugger: Fixed long session and thread names eating up excessive space in the control strip.
This commit is contained in:
parent
4fdda8d5a1
commit
f9bd54b4b1
2 changed files with 10 additions and 0 deletions
|
@ -12,6 +12,7 @@ use rpc::proto;
|
|||
use running::RunningState;
|
||||
use std::{cell::OnceCell, sync::OnceLock};
|
||||
use ui::{Indicator, Tooltip, prelude::*};
|
||||
use util::truncate_and_trailoff;
|
||||
use workspace::{
|
||||
CollaboratorId, FollowableItem, ViewId, Workspace,
|
||||
item::{self, Item},
|
||||
|
@ -126,7 +127,10 @@ impl DebugSession {
|
|||
}
|
||||
|
||||
pub(crate) fn label_element(&self, depth: usize, cx: &App) -> AnyElement {
|
||||
const MAX_LABEL_CHARS: usize = 150;
|
||||
|
||||
let label = self.label(cx);
|
||||
let label = truncate_and_trailoff(&label, MAX_LABEL_CHARS);
|
||||
|
||||
let is_terminated = self
|
||||
.running_state
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue