mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-11-06 08:15:35 +00:00
fix(ui): tidy the v4 merge with Search Everywhere and pinned groups
- The changed-files filter keeps its view toggle inside the panel's content inset, beside the field, so it lines up with the commit row above. - A group heading's hover buttons are backed with the rail's own fill and centred on the v4 heading line, instead of a white patch over the counts. - Shorten the prompt cursor and SSH tab title descriptions to one line.
This commit is contained in:
+2
-6
@@ -212,9 +212,7 @@ pub fn translate_en(key: L10nKey) -> &'static str {
|
||||
L10nKey::SettingsCursorShape => "Cursor shape",
|
||||
L10nKey::SettingsCursorShapeDesc => "How the terminal cursor is drawn.",
|
||||
L10nKey::SettingsPromptCursorShape => "Prompt cursor shape",
|
||||
L10nKey::SettingsPromptCursorShapeDesc => {
|
||||
"The cursor at the shell prompt. Follow uses the cursor shape above everywhere."
|
||||
}
|
||||
L10nKey::SettingsPromptCursorShapeDesc => "The cursor at the shell prompt.",
|
||||
L10nKey::SettingsCursorBlink => "Cursor blink",
|
||||
L10nKey::SettingsCursorBlinkDesc => "Pulse the cursor while the terminal is focused.",
|
||||
L10nKey::SettingsLanguage => "Language",
|
||||
@@ -656,9 +654,7 @@ pub fn translate_en(key: L10nKey) -> &'static str {
|
||||
L10nKey::SettingsDiffPreviewFromCounts => "Open diff preview from sidebar counts",
|
||||
L10nKey::SettingsDiffPreviewFromCountsDesc => "Click a row's +N −N to open its diff.",
|
||||
L10nKey::SettingsSshTabTitle => "SSH tab title",
|
||||
L10nKey::SettingsSshTabTitleDesc => {
|
||||
"Dynamic follows the remote title; the others pin it to the host."
|
||||
}
|
||||
L10nKey::SettingsSshTabTitleDesc => "What an SSH tab is named after.",
|
||||
L10nKey::SettingsSshTabTitleDynamic => "Dynamic",
|
||||
L10nKey::SettingsSshTabTitleProfileName => "Profile name",
|
||||
L10nKey::SettingsSshTabTitleHostname => "Hostname",
|
||||
|
||||
+2
-6
@@ -217,9 +217,7 @@ pub fn translate_ja(key: L10nKey) -> Option<&'static str> {
|
||||
L10nKey::SettingsCursorShape => "カーソルの形状",
|
||||
L10nKey::SettingsCursorShapeDesc => "ターミナルカーソルの描画方法",
|
||||
L10nKey::SettingsPromptCursorShape => "プロンプトのカーソル形状",
|
||||
L10nKey::SettingsPromptCursorShapeDesc => {
|
||||
"シェルプロンプトでのカーソル。「追従」は上のカーソル形状をどこでも使う"
|
||||
}
|
||||
L10nKey::SettingsPromptCursorShapeDesc => "シェルプロンプトでのカーソル",
|
||||
L10nKey::SettingsCursorBlink => "カーソルの点滅",
|
||||
L10nKey::SettingsCursorBlinkDesc => {
|
||||
"ターミナルがフォーカスされている間、カーソルを点滅させる"
|
||||
@@ -651,9 +649,7 @@ pub fn translate_ja(key: L10nKey) -> Option<&'static str> {
|
||||
L10nKey::SettingsDiffPreviewFromCounts => "サイドバーのカウントから Diff プレビューを開く",
|
||||
L10nKey::SettingsDiffPreviewFromCountsDesc => "行の +N −N をクリックして Diff を開きます",
|
||||
L10nKey::SettingsSshTabTitle => "SSH タブのタイトル",
|
||||
L10nKey::SettingsSshTabTitleDesc => {
|
||||
"「動的」はリモートのタイトルに従い、ほかはホストに固定します"
|
||||
}
|
||||
L10nKey::SettingsSshTabTitleDesc => "SSH タブの名前の付け方",
|
||||
L10nKey::SettingsSshTabTitleDynamic => "動的",
|
||||
L10nKey::SettingsSshTabTitleProfileName => "プロファイル名",
|
||||
L10nKey::SettingsSshTabTitleHostname => "ホスト名",
|
||||
|
||||
+2
-4
@@ -199,9 +199,7 @@ pub fn translate_zh(key: L10nKey) -> Option<&'static str> {
|
||||
L10nKey::SettingsCursorShape => "光标形状",
|
||||
L10nKey::SettingsCursorShapeDesc => "终端光标的绘制方式。",
|
||||
L10nKey::SettingsPromptCursorShape => "提示符光标形状",
|
||||
L10nKey::SettingsPromptCursorShapeDesc => {
|
||||
"shell 提示符处的光标。跟随表示各处都用上面的光标形状。"
|
||||
}
|
||||
L10nKey::SettingsPromptCursorShapeDesc => "shell 提示符处的光标。",
|
||||
L10nKey::SettingsCursorBlink => "光标闪烁",
|
||||
L10nKey::SettingsCursorBlinkDesc => "终端获得焦点时让光标闪烁。",
|
||||
L10nKey::SettingsLanguage => "语言",
|
||||
@@ -579,7 +577,7 @@ pub fn translate_zh(key: L10nKey) -> Option<&'static str> {
|
||||
L10nKey::SettingsDiffPreviewFromCounts => "从侧栏计数打开 diff 预览",
|
||||
L10nKey::SettingsDiffPreviewFromCountsDesc => "点击行上的 +N −N 打开 diff。",
|
||||
L10nKey::SettingsSshTabTitle => "SSH 标签页标题",
|
||||
L10nKey::SettingsSshTabTitleDesc => "“动态”跟随远端标题;另外两项固定为主机。",
|
||||
L10nKey::SettingsSshTabTitleDesc => "SSH 标签页以什么命名。",
|
||||
L10nKey::SettingsSshTabTitleDynamic => "动态",
|
||||
L10nKey::SettingsSshTabTitleProfileName => "配置名称",
|
||||
L10nKey::SettingsSshTabTitleHostname => "主机名",
|
||||
|
||||
@@ -11,7 +11,6 @@ use crate::core::config::{Config, RightPanelTab};
|
||||
use crate::daemon::protocol::{ManagedForward, PaneProcs, PortProbe};
|
||||
use crate::ui::app::{
|
||||
CONTENT_INSET, TILE_GLYPH_XS, TILE_SIZE_SM, TILE_SIZE_XS, Tty7App, tile_trailing_inset,
|
||||
tile_trailing_inset_sm,
|
||||
};
|
||||
use crate::ui::i18n::{L10nKey, t, t_fmt};
|
||||
use crate::ui::scrollbar::with_vertical_scrollbar;
|
||||
@@ -811,8 +810,9 @@ impl Tty7App {
|
||||
self.panel_search_with(input, None, cx)
|
||||
}
|
||||
|
||||
/// [`Self::panel_search`] with a tile at its far end, inset the way the
|
||||
/// branch row's tile is so the two stack in one column.
|
||||
/// [`Self::panel_search`] with a tile at its far end. The tile sits
|
||||
/// inside the same `CONTENT_INSET` as the well, so its edge lines up with
|
||||
/// the commit row's above it.
|
||||
pub(crate) fn panel_search_with(
|
||||
&self,
|
||||
input: &gpui::Entity<gpui_component::input::InputState>,
|
||||
@@ -856,7 +856,7 @@ impl Tty7App {
|
||||
.child(Input::new(input).appearance(false).xsmall().cleanable(true)),
|
||||
),
|
||||
)
|
||||
.when(has_trailing, |row| row.pr(px(tile_trailing_inset_sm())))
|
||||
.when(has_trailing, |row| row.gap(px(6.)))
|
||||
.children(trailing)
|
||||
.into_any_element()
|
||||
}
|
||||
|
||||
+12
-3
@@ -1484,7 +1484,13 @@ impl Tty7App {
|
||||
.when(folded, |bar| {
|
||||
bar.child(div().flex_shrink_0().child(count_label))
|
||||
})
|
||||
.children(self.header_actions(group_ix, group_key.clone(), hover_group, cx));
|
||||
.children(self.header_actions(
|
||||
group_ix,
|
||||
group_key.clone(),
|
||||
hover_group,
|
||||
rail_fill,
|
||||
cx,
|
||||
));
|
||||
// Renaming is offered on a menu rather than a double click:
|
||||
// the first click of a double would fold the group, so the
|
||||
// name would be edited on a box that just shut. An auto group
|
||||
@@ -1939,10 +1945,12 @@ impl Tty7App {
|
||||
group_ix: usize,
|
||||
key: Option<GroupKey>,
|
||||
hover: SharedString,
|
||||
// The rail's own fill, so the buttons cover what they sit over
|
||||
// without a patch of another grey around them.
|
||||
backing: gpui::Hsla,
|
||||
cx: &mut Context<Self>,
|
||||
) -> Option<AnyElement> {
|
||||
let key = key?;
|
||||
let backing = crate::ui::theme::workspace_surface_color(cx);
|
||||
let mut fade = backing;
|
||||
fade.a = 0.;
|
||||
let muted = cx.theme().muted_foreground;
|
||||
@@ -2013,7 +2021,8 @@ impl Tty7App {
|
||||
h_flex()
|
||||
.absolute()
|
||||
.right(px(4.))
|
||||
.bottom(px(2.))
|
||||
// Centred on the heading's line: 16px of buttons in `HEADER_HEIGHT`.
|
||||
.top(px((HEADER_HEIGHT - 16.) / 2.))
|
||||
.opacity(0.)
|
||||
.group_hover(hover, |s| s.opacity(1.))
|
||||
.child(div().w(px(10.)).h(px(16.)).bg(linear_gradient(
|
||||
|
||||
Reference in New Issue
Block a user