Skip to content

Commit 7d2db40

Browse files
committed
feat(workspace): add app-drawer icon to Quick Access tab title and enlarge SVG
Add the app-drawer grid icon to the Quick Access panel tab title for visual consistency with the toolbar button. Enlarge the SVG grid squares for better visibility at small sizes. Rename panel title from "Quick Access" to "Tools".
1 parent ec61bcf commit 7d2db40

3 files changed

Lines changed: 25 additions & 6 deletions

File tree

src/nls/root/strings.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1255,7 +1255,7 @@ define({
12551255
"BOTTOM_PANEL_MINIMIZE": "Minimize Panel",
12561256
"BOTTOM_PANEL_SHOW": "Show Bottom Panel",
12571257
"BOTTOM_PANEL_HIDE_TOGGLE": "Hide Bottom Panel",
1258-
"BOTTOM_PANEL_DEFAULT_TITLE": "Quick Access",
1258+
"BOTTOM_PANEL_DEFAULT_TITLE": "Tools",
12591259
"BOTTOM_PANEL_DEFAULT_HEADING": "Open a Panel",
12601260
"BOTTOM_PANEL_OPEN_PANEL": "Open a Panel",
12611261
"BOTTOM_PANEL_MAXIMIZE": "Maximize Panel",

src/styles/images/app-drawer.svg

Lines changed: 4 additions & 4 deletions
Loading

src/view/DefaultPanelView.js

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,26 @@ define(function (require, exports, module) {
178178
}
179179
});
180180

181-
// Create the app-drawer toolbar icon above the profile button
182181
const iconURL = ExtensionUtils.getModulePath(module, "../styles/images/app-drawer.svg");
182+
183+
/**
184+
* Inject the app-drawer icon into the Quick Access tab title.
185+
* Called each time the panel is shown because the tab DOM is rebuilt.
186+
*/
187+
function _addTabIcon() {
188+
const $tabTitle = $('#bottom-panel-tab-bar .bottom-panel-tab[data-panel-id="'
189+
+ WorkspaceManager.DEFAULT_PANEL_ID + '"] .bottom-panel-tab-title');
190+
if ($tabTitle.length && !$tabTitle.find(".app-drawer-tab-icon").length) {
191+
$tabTitle.prepend($('<img class="app-drawer-tab-icon">').attr("src", iconURL).css({
192+
"width": "12px",
193+
"height": "12px",
194+
"vertical-align": "middle",
195+
"margin-right": "4px"
196+
}));
197+
}
198+
}
199+
200+
// Create the app-drawer toolbar icon above the profile button
183201
const $drawerBtn = $("<a>")
184202
.attr({
185203
id: "app-drawer-button",
@@ -207,6 +225,7 @@ define(function (require, exports, module) {
207225
_panel.hide();
208226
} else {
209227
_updateButtonVisibility();
228+
_addTabIcon();
210229
}
211230
$drawerBtn.toggleClass("selected-button", panelID === WorkspaceManager.DEFAULT_PANEL_ID);
212231
});

0 commit comments

Comments
 (0)