Skip to content

Commit 2005f2e

Browse files
authored
fix(icons): clean up icon font usage and update the font (#1990)
1 parent 19c555f commit 2005f2e

File tree

28 files changed

+319
-606
lines changed

28 files changed

+319
-606
lines changed

src/cm/lsp/codeActions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ const CODE_ACTION_ICONS: Record<string, string> = {
3939
};
4040

4141
function getCodeActionIcon(kind?: CodeActionKind): string {
42-
if (!kind) return "licons zap";
42+
if (!kind) return "icon zap";
4343
for (const [prefix, icon] of Object.entries(CODE_ACTION_ICONS)) {
4444
if (kind.startsWith(prefix)) return icon;
4545
}
46-
return "licons zap";
46+
return "icon zap";
4747
}
4848

4949
function formatCodeActionKind(kind?: CodeActionKind): string {

src/components/lspInfoDialog/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ function showLspInfoDialog() {
338338
const $dialog = (
339339
<div className="prompt lsp-info-dialog">
340340
<div className="title">
341-
<span className="licons zap" style={{ marginRight: "8px" }} />
341+
<span className="icon zap" style={{ marginRight: "8px" }} />
342342
Language Servers
343343
</div>
344344
<div className="lsp-dialog-body" />

src/components/settingsPage.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,6 @@ function normalizeSettings(settings) {
253253
return false;
254254
}
255255

256-
ensureSettingInfo(setting);
257256
return true;
258257
});
259258

@@ -263,16 +262,6 @@ function normalizeSettings(settings) {
263262
};
264263
}
265264

266-
function ensureSettingInfo(setting) {
267-
if (setting.info) return;
268-
269-
Object.defineProperty(setting, "info", {
270-
get() {
271-
return strings[`info-${this.key.toLocaleLowerCase()}`];
272-
},
273-
});
274-
}
275-
276265
function shouldEnableSearch(type, settingsCount) {
277266
return type === "united" || (type === "separate" && settingsCount > 5);
278267
}

src/components/terminal/terminalManager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ class TerminalManager {
322322
const terminalFile = new EditorFile(terminalName, {
323323
type: "terminal",
324324
content: terminalContainer,
325-
tabIcon: "licons terminal",
325+
tabIcon: "icon square-terminal",
326326
pinned,
327327
render: shouldRender,
328328
});

src/components/tile/style.scss

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,15 @@ header {
3636
font-size: 0.8em;
3737
z-index: 9999;
3838

39+
.file,
40+
.icon {
41+
height: 24px;
42+
width: 24px;
43+
font-size: 1em;
44+
background-size: 22px;
45+
flex-shrink: 0;
46+
}
47+
3948
.file {
4049
padding: 0 !important;
4150
}
@@ -98,4 +107,4 @@ header {
98107
transform: scale(0.95) translateZ(0);
99108
}
100109
}
101-
}
110+
}

src/lib/editorFile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1528,7 +1528,7 @@ export default class EditorFile {
15281528
}
15291529

15301530
return tag("span", {
1531-
className: "licons pin",
1531+
className: "icon pin",
15321532
title: strings["unpin tab"] || "Unpin tab",
15331533
dataset: {
15341534
action: "toggle-pin",

src/lib/openFolder.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ async function handleContextmenu(type, url, name, $target) {
356356
const OPEN_IN_TERMINAL = [
357357
"open-in-terminal",
358358
strings["open in terminal"] || "Open in Terminal",
359-
"licons terminal",
359+
"terminal",
360360
];
361361
options.push(OPEN_IN_TERMINAL);
362362
}
@@ -373,7 +373,7 @@ async function handleContextmenu(type, url, name, $target) {
373373
const OPEN_IN_TERMINAL = [
374374
"open-in-terminal",
375375
strings["open in terminal"] || "Open in Terminal",
376-
"licons terminal",
376+
"terminal",
377377
];
378378
options.push(OPEN_IN_TERMINAL);
379379
}

src/lib/selectionMenu.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export default function selectionMenu() {
4949
),
5050
item(
5151
() => showCodeActions(),
52-
<span className="licons lightbulb" title="Code Actions"></span>,
52+
<span className="icon lightbulb" title="Code Actions"></span>,
5353
"all",
5454
true,
5555
),

src/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,7 @@ function createFileMenu({ top, bottom, toggler }) {
760760
toggle_pin_tab_text: file.pinned
761761
? strings["unpin tab"] || "Unpin tab"
762762
: strings["pin tab"] || "Pin tab",
763-
toggle_pin_tab_icon: file.pinned ? "licons pin-off" : "licons pin",
763+
toggle_pin_tab_icon: file.pinned ? "icon pin-off" : "icon pin",
764764
// Use CodeMirror mode stored on EditorFile (set in setMode)
765765
file_mode: isEditorFile ? file.currentMode || "" : "",
766766
file_encoding: isEditorFile ? encoding : "",

src/pages/plugin/plugin.scss

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,18 @@
7171
font-size: 14px;
7272
margin-bottom: 12px;
7373

74-
.author-name {
74+
.meta-item {
7575
display: inline-flex;
7676
align-items: center;
7777
gap: 4px;
78+
vertical-align: middle;
79+
80+
.icon {
81+
flex-shrink: 0;
82+
}
83+
}
7884

85+
.author-name {
7986
a {
8087
text-decoration: none;
8188
color: inherit;

0 commit comments

Comments
 (0)