Skip to content

Commit 91a5e82

Browse files
committed
feat: show only icon in the bottom panel quick access
1 parent b5a297b commit 91a5e82

3 files changed

Lines changed: 22 additions & 15 deletions

File tree

src/nls/root/strings.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1560,7 +1560,7 @@ define({
15601560
"BOTTOM_PANEL_MINIMIZE": "Minimize Panel",
15611561
"BOTTOM_PANEL_SHOW": "Show Bottom Panel",
15621562
"BOTTOM_PANEL_HIDE_TOGGLE": "Hide Bottom Panel",
1563-
"BOTTOM_PANEL_DEFAULT_TITLE": "Quick Access",
1563+
"BOTTOM_PANEL_DEFAULT_TITLE": "Quick Access - Tools",
15641564
"BOTTOM_PANEL_DEFAULT_HEADING": "Open a Panel",
15651565
"BOTTOM_PANEL_OPEN_PANEL": "Open a Panel",
15661566
"BOTTOM_PANEL_MAXIMIZE": "Maximize Panel",

src/styles/Extn-BottomPanelTabs.less

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,12 @@
166166
display: none;
167167
}
168168

169-
/* Default panel (Tools) tab: always show the icon alongside the title,
170-
in both expanded and collapsed modes, active or inactive. */
169+
/* Pinned Quick Access tab: icon-only, always visible */
171170
.bottom-panel-tab.bottom-panel-tab-default .bottom-panel-tab-icon {
172171
display: inline-flex;
173-
margin-right: 0.4rem;
172+
width: 1.1rem;
173+
height: 1.1rem;
174+
margin: 0;
174175
}
175176

176177
.default-panel-btn .panel-titlebar-icon {
@@ -246,14 +247,9 @@
246247
.bottom-panel-tab:not(.active) .bottom-panel-tab-close-btn {
247248
display: none;
248249
}
249-
/* Pinned Quick Access tab: keep natural width and show its title
250-
even in collapsed mode (other tabs collapse to icon-only). */
250+
/* Pinned Quick Access tab: icon-only, keeps its natural width */
251251
.bottom-panel-tab.bottom-panel-tab-default {
252252
min-width: auto;
253-
justify-content: flex-start;
254-
}
255-
.bottom-panel-tab.bottom-panel-tab-default .bottom-panel-tab-title {
256-
display: inline;
257253
}
258254
}
259255

@@ -303,13 +299,17 @@
303299
}
304300
}
305301

306-
/* Pinned Quick Access tab: subtle separator to distinguish it from regular tabs */
302+
/* Pinned Quick Access tab: icon-only with separator */
307303
.bottom-panel-tab.bottom-panel-tab-default {
308-
padding-right: 0.8rem;
304+
padding: 0 0.6rem;
305+
min-width: auto;
306+
justify-content: center;
309307
border-right: 1px solid rgba(0, 0, 0, 0.15);
308+
background-color: transparent;
310309

311310
.dark & {
312311
border-right: 1px solid rgba(255, 255, 255, 0.1);
312+
background-color: transparent;
313313
}
314314
}
315315

src/view/PanelView.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,11 @@ define(function (require, exports, module) {
159159
$icon[0].style.maskImage = maskUrl;
160160
$icon[0].style.webkitMaskImage = maskUrl;
161161
$tab.append($icon);
162-
$tab.append($('<span class="bottom-panel-tab-title"></span>').text(title));
163-
if (!isDefault) {
162+
if (isDefault) {
163+
// Icon-only tab with tooltip
164+
$tab.attr('title', title);
165+
} else {
166+
$tab.append($('<span class="bottom-panel-tab-title"></span>').text(title));
164167
$tab.append($('<span class="bottom-panel-tab-close-btn">&times;</span>').attr('title', Strings.CLOSE));
165168
}
166169
return $tab;
@@ -391,9 +394,13 @@ define(function (require, exports, module) {
391394
_$overflowBtn.toggle(stillOverflowing);
392395
}
393396

394-
// Show tooltip on hover only in collapsed mode (title text is hidden)
397+
// Show tooltip on hover only in collapsed mode (title text is hidden).
398+
// The pinned Quick Access tab always keeps its tooltip (icon-only).
395399
_$tabBar.find(".bottom-panel-tab").each(function () {
396400
const $tab = $(this);
401+
if ($tab.data("panel-id") === _defaultPanelId) {
402+
return;
403+
}
397404
if (isOverflowing) {
398405
$tab.attr("title", $tab.find(".bottom-panel-tab-title").text());
399406
} else {

0 commit comments

Comments
 (0)