Skip to content

Commit 852639c

Browse files
committed
fix(icons): clean up icon font usage and update the font
- normalize icon references after merging li icons into icons.ttf - restore inline alignment for plugin meta icons - keep dragged tab icons at the correct size - bust icons.ttf cache after glyph updates - attached the icomoon project for easily adding new icons in future
1 parent 19c555f commit 852639c

File tree

27 files changed

+320
-596
lines changed

27 files changed

+320
-596
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/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;

src/pages/plugin/plugin.view.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export default (props) => {
109109
</div>
110110
<div className="plugin-meta">
111111
<span className="meta-item">
112-
<i className="licons tag" style={{ fontSize: "12px" }}></i>
112+
<i className="icon tag" style={{ fontSize: "12px" }}></i>
113113
<Version
114114
{...props}
115115
packageUpdatedAt={packageUpdatedAt}
@@ -126,17 +126,14 @@ export default (props) => {
126126
on:click={() => {
127127
toast(strings["verified publisher"]);
128128
}}
129-
className="licons verified verified-tick"
129+
className="icon verified verified-tick"
130130
></i>
131131
) : (
132132
""
133133
)}
134134
</span>
135135
<span className="meta-item">
136-
<span
137-
className="licons scale"
138-
style={{ fontSize: "12px" }}
139-
></span>
136+
<span className="icon scale" style={{ fontSize: "12px" }}></span>
140137
{license || "Unknown"}
141138
</span>
142139
</div>
@@ -335,7 +332,7 @@ function Buttons({
335332
if (isPaid && !purchased && price) {
336333
return (
337334
<button data-type="buy" className="btn btn-install" onclick={buy}>
338-
<i className="licons cart"></i>
335+
<i className="icon cart"></i>
339336
{price}
340337
</button>
341338
);

0 commit comments

Comments
 (0)