Skip to content

Commit 46da03f

Browse files
committed
fix(terminal): inline shell dropdown into New Terminal button row
Move the shell selector chevron from a separate stacked button to an inline element on the right side of the New Terminal button. The chevron is only visible when the flyout is expanded on hover.
1 parent 86b4ef4 commit 46da03f

2 files changed

Lines changed: 43 additions & 18 deletions

File tree

src/extensionsIntegrated/Terminal/terminal-panel.html

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@
55
<div class="terminal-tab-flyout">
66
<div class="terminal-flyout-list"></div>
77
<div class="terminal-flyout-actions">
8-
<button class="terminal-flyout-new-btn" title="{{Strings.CMD_NEW_TERMINAL}}">
9-
<span class="terminal-flyout-btn-icon"><i class="fa-solid fa-plus"></i></span>
10-
<span class="terminal-btn-label">New Terminal</span>
11-
</button>
12-
<button class="terminal-flyout-dropdown-btn" title="Select Default Shell">
13-
<span class="terminal-flyout-btn-icon"><i class="fa-solid fa-chevron-up"></i></span>
14-
</button>
8+
<div class="terminal-flyout-new-row">
9+
<button class="terminal-flyout-new-btn" title="{{Strings.CMD_NEW_TERMINAL}}">
10+
<span class="terminal-flyout-btn-icon"><i class="fa-solid fa-plus"></i></span>
11+
<span class="terminal-btn-label">New Terminal</span>
12+
</button>
13+
<button class="terminal-flyout-dropdown-btn" title="Select Default Shell">
14+
<i class="fa-solid fa-chevron-down"></i>
15+
</button>
16+
</div>
1517
<div class="terminal-shell-dropdown forced-hidden"></div>
1618
</div>
1719
</div>

src/styles/Extn-Terminal.less

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -228,14 +228,20 @@
228228
position: relative;
229229
}
230230

231-
.terminal-flyout-new-btn,
232-
.terminal-flyout-dropdown-btn {
231+
/* New terminal row: + button fills, dropdown chevron on the right */
232+
.terminal-flyout-new-row {
233+
display: flex;
234+
align-items: center;
235+
height: 28px;
236+
}
237+
238+
.terminal-flyout-new-btn {
233239
display: flex;
234240
align-items: center;
235241
justify-content: center;
236242
gap: 6px;
237-
height: 28px;
238-
width: 100%;
243+
flex: 1;
244+
height: 100%;
239245
padding: 0;
240246
cursor: pointer;
241247
color: var(--terminal-tab-text);
@@ -246,14 +252,35 @@
246252
white-space: nowrap;
247253
}
248254

249-
.terminal-flyout-new-btn:hover,
250-
.terminal-flyout-dropdown-btn:hover {
255+
.terminal-flyout-new-btn:hover {
251256
background: rgba(255, 255, 255, 0.05);
252257
color: var(--terminal-tab-active-text);
253258
}
254259

260+
/* Dropdown chevron: hidden in collapsed mode, shown inline when expanded */
255261
.terminal-flyout-dropdown-btn {
256-
border-top: 1px solid var(--terminal-border);
262+
display: none;
263+
align-items: center;
264+
justify-content: center;
265+
width: 24px;
266+
height: 100%;
267+
padding: 0;
268+
cursor: pointer;
269+
color: var(--terminal-tab-text);
270+
font-size: 9px;
271+
background: transparent;
272+
border: none;
273+
border-left: 1px solid var(--terminal-border);
274+
flex-shrink: 0;
275+
}
276+
277+
.terminal-tab-flyout:hover .terminal-flyout-dropdown-btn {
278+
display: flex;
279+
}
280+
281+
.terminal-flyout-dropdown-btn:hover {
282+
background: rgba(255, 255, 255, 0.05);
283+
color: var(--terminal-tab-active-text);
257284
}
258285

259286
/* Icon in action buttons */
@@ -262,10 +289,6 @@
262289
flex-shrink: 0;
263290
}
264291

265-
.terminal-flyout-dropdown-btn .terminal-flyout-btn-icon {
266-
font-size: 10px;
267-
}
268-
269292
/* Hide button labels in collapsed mode; show when expanded */
270293
.terminal-tab-flyout .terminal-btn-label {
271294
display: none;

0 commit comments

Comments
 (0)