Skip to content

Commit 2d7e310

Browse files
Merge pull request #3332 from nkomonen-amazon/iconFix
fix(icon): change custom unicode range
2 parents 0674adc + 7bdfb3a commit 2d7e310

File tree

6 files changed

+30
-24
lines changed

6 files changed

+30
-24
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Bug Fix",
3+
"description": "Incorrect offset icons in webviews"
4+
}

package.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3289,133 +3289,133 @@
32893289
"description": "AWS Contributed Icon",
32903290
"default": {
32913291
"fontPath": "./resources/fonts/aws-toolkit-icons.woff",
3292-
"fontCharacter": "\\e1a5"
3292+
"fontCharacter": "\\f1a5"
32933293
}
32943294
},
32953295
"aws-cdk-logo": {
32963296
"description": "AWS Contributed Icon",
32973297
"default": {
32983298
"fontPath": "./resources/fonts/aws-toolkit-icons.woff",
3299-
"fontCharacter": "\\e1a6"
3299+
"fontCharacter": "\\f1a6"
33003300
}
33013301
},
33023302
"aws-cloudformation-stack": {
33033303
"description": "AWS Contributed Icon",
33043304
"default": {
33053305
"fontPath": "./resources/fonts/aws-toolkit-icons.woff",
3306-
"fontCharacter": "\\e1a7"
3306+
"fontCharacter": "\\f1a7"
33073307
}
33083308
},
33093309
"aws-cloudwatch-log-group": {
33103310
"description": "AWS Contributed Icon",
33113311
"default": {
33123312
"fontPath": "./resources/fonts/aws-toolkit-icons.woff",
3313-
"fontCharacter": "\\e1a8"
3313+
"fontCharacter": "\\f1a8"
33143314
}
33153315
},
33163316
"aws-codecatalyst-logo": {
33173317
"description": "AWS Contributed Icon",
33183318
"default": {
33193319
"fontPath": "./resources/fonts/aws-toolkit-icons.woff",
3320-
"fontCharacter": "\\e1a9"
3320+
"fontCharacter": "\\f1a9"
33213321
}
33223322
},
33233323
"aws-ecr-registry": {
33243324
"description": "AWS Contributed Icon",
33253325
"default": {
33263326
"fontPath": "./resources/fonts/aws-toolkit-icons.woff",
3327-
"fontCharacter": "\\e1aa"
3327+
"fontCharacter": "\\f1aa"
33283328
}
33293329
},
33303330
"aws-ecs-cluster": {
33313331
"description": "AWS Contributed Icon",
33323332
"default": {
33333333
"fontPath": "./resources/fonts/aws-toolkit-icons.woff",
3334-
"fontCharacter": "\\e1ab"
3334+
"fontCharacter": "\\f1ab"
33353335
}
33363336
},
33373337
"aws-ecs-container": {
33383338
"description": "AWS Contributed Icon",
33393339
"default": {
33403340
"fontPath": "./resources/fonts/aws-toolkit-icons.woff",
3341-
"fontCharacter": "\\e1ac"
3341+
"fontCharacter": "\\f1ac"
33423342
}
33433343
},
33443344
"aws-ecs-service": {
33453345
"description": "AWS Contributed Icon",
33463346
"default": {
33473347
"fontPath": "./resources/fonts/aws-toolkit-icons.woff",
3348-
"fontCharacter": "\\e1ad"
3348+
"fontCharacter": "\\f1ad"
33493349
}
33503350
},
33513351
"aws-generic-attach-file": {
33523352
"description": "AWS Contributed Icon",
33533353
"default": {
33543354
"fontPath": "./resources/fonts/aws-toolkit-icons.woff",
3355-
"fontCharacter": "\\e1ae"
3355+
"fontCharacter": "\\f1ae"
33563356
}
33573357
},
33583358
"aws-iot-certificate": {
33593359
"description": "AWS Contributed Icon",
33603360
"default": {
33613361
"fontPath": "./resources/fonts/aws-toolkit-icons.woff",
3362-
"fontCharacter": "\\e1af"
3362+
"fontCharacter": "\\f1af"
33633363
}
33643364
},
33653365
"aws-iot-policy": {
33663366
"description": "AWS Contributed Icon",
33673367
"default": {
33683368
"fontPath": "./resources/fonts/aws-toolkit-icons.woff",
3369-
"fontCharacter": "\\e1b0"
3369+
"fontCharacter": "\\f1b0"
33703370
}
33713371
},
33723372
"aws-iot-thing": {
33733373
"description": "AWS Contributed Icon",
33743374
"default": {
33753375
"fontPath": "./resources/fonts/aws-toolkit-icons.woff",
3376-
"fontCharacter": "\\e1b1"
3376+
"fontCharacter": "\\f1b1"
33773377
}
33783378
},
33793379
"aws-lambda-function": {
33803380
"description": "AWS Contributed Icon",
33813381
"default": {
33823382
"fontPath": "./resources/fonts/aws-toolkit-icons.woff",
3383-
"fontCharacter": "\\e1b2"
3383+
"fontCharacter": "\\f1b2"
33843384
}
33853385
},
33863386
"aws-s3-bucket": {
33873387
"description": "AWS Contributed Icon",
33883388
"default": {
33893389
"fontPath": "./resources/fonts/aws-toolkit-icons.woff",
3390-
"fontCharacter": "\\e1b3"
3390+
"fontCharacter": "\\f1b3"
33913391
}
33923392
},
33933393
"aws-s3-create-bucket": {
33943394
"description": "AWS Contributed Icon",
33953395
"default": {
33963396
"fontPath": "./resources/fonts/aws-toolkit-icons.woff",
3397-
"fontCharacter": "\\e1b4"
3397+
"fontCharacter": "\\f1b4"
33983398
}
33993399
},
34003400
"aws-schemas-registry": {
34013401
"description": "AWS Contributed Icon",
34023402
"default": {
34033403
"fontPath": "./resources/fonts/aws-toolkit-icons.woff",
3404-
"fontCharacter": "\\e1b5"
3404+
"fontCharacter": "\\f1b5"
34053405
}
34063406
},
34073407
"aws-schemas-schema": {
34083408
"description": "AWS Contributed Icon",
34093409
"default": {
34103410
"fontPath": "./resources/fonts/aws-toolkit-icons.woff",
3411-
"fontCharacter": "\\e1b6"
3411+
"fontCharacter": "\\f1b6"
34123412
}
34133413
},
34143414
"aws-stepfunctions-preview": {
34153415
"description": "AWS Contributed Icon",
34163416
"default": {
34173417
"fontPath": "./resources/fonts/aws-toolkit-icons.woff",
3418-
"fontCharacter": "\\e1b7"
3418+
"fontCharacter": "\\f1b7"
34193419
}
34203420
}
34213421
}

resources/css/base.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,6 @@ textarea {
237237
display: inline;
238238
height: 16px;
239239
width: 16px;
240-
padding: 8px;
241240
background-repeat: no-repeat;
242241
background-position: center;
243242
}

scripts/build/generateIcons.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ async function generate(mappings: Record<string, number | undefined> = {}) {
102102
files: iconSources,
103103
fontName: fontId,
104104
formats: ['woff'],
105-
startUnicode: 0xe000,
105+
startUnicode: 0xf000,
106106
verbose: true,
107107
normalize: true,
108108
sort: true,
@@ -203,7 +203,11 @@ async function loadCodiconMappings(): Promise<Record<string, number | undefined>
203203
const mappings: Record<string, number | undefined> = {}
204204
for (const [k, v] of Object.entries(data)) {
205205
if (typeof k === 'string' && typeof v === 'number') {
206-
mappings[`vscode-${k}`] = v - 0xd000
206+
if (v < 0xe000 || v >= 0xf000) {
207+
// Will warn us if the codepoint moves outside the expected range
208+
throw new Error(`Codicon "${k}" has unexpected codepoint: ${v}`)
209+
}
210+
mappings[`vscode-${k}`] = v
207211
}
208212
}
209213

src/codecatalyst/vue/create/source.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,6 @@ body.vscode-light .mode-container[data-disabled='true'] .config-item {
344344
}
345345
346346
.edit-icon {
347-
margin-left: 10px;
348347
color: #0078d7;
349348
}
350349
</style>

src/codecatalyst/vue/summary.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ export default defineComponent({
157157
158158
#stop-icon {
159159
color: var(--vscode-debugIcon-stopForeground);
160-
padding: 4px;
160+
margin-right: 5px;
161161
vertical-align: -0.2em;
162162
}
163163
</style>

0 commit comments

Comments
 (0)