Merge branch 'worktree-agent-ae2606773b822491f'
Browse files at this commit1 changed file +48 -38
- crates/app/src/ui/dock_stance.rs +48 -38
crates/app/src/ui/dock_stance.rsmodified+48 -38
| @@ -95,6 +95,15 @@ impl DockSort { | ||
| 95 | 95 | DockSort::Unused => "Unused", |
| 96 | 96 | } |
| 97 | 97 | } |
| 98 | + | |
| 99 | + /// The next chip in the cycle, wrapping back to `Recent` -- the whole | |
| 100 | + /// row collapsed to one ghost control that cycles on click instead of | |
| 101 | + /// four chips fighting for the same line (user 2026-08-27: "too much | |
| 102 | + /// chrome"). | |
| 103 | + fn next(self) -> DockSort { | |
| 104 | + let idx = Self::ALL.iter().position(|s| *s == self).unwrap_or(0); | |
| 105 | + Self::ALL[(idx + 1) % Self::ALL.len()] | |
| 106 | + } | |
| 98 | 107 | } |
| 99 | 108 | |
| 100 | 109 | /// A ghost verb (DESIGN §4): borderless glyph/label in `ink2`, its chord in |
| @@ -880,10 +889,18 @@ fn sources_tab( | ||
| 880 | 889 | .gap(px(6.)) |
| 881 | 890 | .p(px(8.)) |
| 882 | 891 | .overflow_y_scroll() |
| 883 | - .child(section_head(format!( | |
| 884 | - "{} · {total} · {unused_count} UNUSED", | |
| 885 | - player.library_tab.label().to_uppercase() | |
| 886 | - ))) | |
| 892 | + .child({ | |
| 893 | + let style = head(); | |
| 894 | + let hint: SharedString = format!("{total} total · {unused_count} unused").into(); | |
| 895 | + div() | |
| 896 | + .id("dock-header") | |
| 897 | + .flex_none() | |
| 898 | + .font(style.font) | |
| 899 | + .text_size(style.size) | |
| 900 | + .text_color(rgb(INK3())) | |
| 901 | + .tooltip(move |_, cx| cx.new(|_| Tip(hint.clone())).into()) | |
| 902 | + .child(player.library_tab.label().to_uppercase()) | |
| 903 | + }) | |
| 887 | 904 | .child({ |
| 888 | 905 | let style = mono(type_scale::CHORD_METADATA_MAX_PX, FontWeight::MEDIUM); |
| 889 | 906 | div() |
| @@ -943,42 +960,35 @@ fn sources_tab( | ||
| 943 | 960 | .child(tab.label()) |
| 944 | 961 | })), |
| 945 | 962 | ) |
| 946 | - .child( | |
| 963 | + .child({ | |
| 964 | + let current = player.dock_sort; | |
| 965 | + let style = label(type_scale::FLOOR_PX, FontWeight::MEDIUM); | |
| 947 | 966 | div() |
| 967 | + .id("dock-sort-cycle") | |
| 948 | 968 | .flex_none() |
| 949 | - .flex() | |
| 950 | - .gap(px(4.)) | |
| 951 | - .children(DockSort::ALL.map(|sort| { | |
| 952 | - let on = sort == player.dock_sort; | |
| 953 | - let style = label(type_scale::FLOOR_PX, FontWeight::MEDIUM); | |
| 954 | - div() | |
| 955 | - .id(("dock-sort", sort as usize)) | |
| 956 | - .flex_none() | |
| 957 | - .px(px(6.)) | |
| 958 | - .py(px(2.)) | |
| 959 | - .rounded(px(3.)) | |
| 960 | - .font(style.font) | |
| 961 | - .text_size(style.size) | |
| 962 | - .when(on, |d| d.bg(rgb(DARK_RAISED())).text_color(rgb(INK1()))) | |
| 963 | - .when(!on, |d| d.text_color(rgb(INK3()))) | |
| 964 | - .cursor_pointer() | |
| 965 | - .hover(|s| s.bg(rgb(DARK_RAISED()))) | |
| 966 | - .on_click(cx.listener(move |this, _: &ClickEvent, _, cx| { | |
| 967 | - this.dock_sort = sort; | |
| 968 | - cx.notify(); | |
| 969 | - })) | |
| 970 | - .children(hitmap::dynamic( | |
| 971 | - move || { | |
| 972 | - ( | |
| 973 | - format!("dock.sort.{}", sort.label()), | |
| 974 | - format!("Sort {}", sort.label()), | |
| 975 | - ) | |
| 976 | - }, | |
| 977 | - true, | |
| 978 | - )) | |
| 979 | - .child(sort.label()) | |
| 980 | - })), | |
| 981 | - ) | |
| 969 | + .px(px(6.)) | |
| 970 | + .py(px(2.)) | |
| 971 | + .rounded(px(3.)) | |
| 972 | + .font(style.font) | |
| 973 | + .text_size(style.size) | |
| 974 | + .text_color(rgb(INK2())) | |
| 975 | + .cursor_pointer() | |
| 976 | + .hover(|s| s.bg(rgb(DARK_RAISED())).text_color(rgb(INK1()))) | |
| 977 | + .on_click(cx.listener(|this, _: &ClickEvent, _, cx| { | |
| 978 | + this.dock_sort = this.dock_sort.next(); | |
| 979 | + cx.notify(); | |
| 980 | + })) | |
| 981 | + .children(hitmap::dynamic( | |
| 982 | + move || { | |
| 983 | + ( | |
| 984 | + "dock.sort.cycle".to_string(), | |
| 985 | + format!("Sort: {} — click to cycle", current.label()), | |
| 986 | + ) | |
| 987 | + }, | |
| 988 | + true, | |
| 989 | + )) | |
| 990 | + .child(format!("↕ {}", current.label())) | |
| 991 | + }) | |
| 982 | 992 | .child( |
| 983 | 993 | div() |
| 984 | 994 | .id("dock-source-rows") |