Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,16 @@ CONTRIBUTING.md
# become the Marketplace's Overview and Changelog tabs — but nothing in docs/
# is written for someone who installed the extension.
docs/**
# The full lockup is source art and a README banner, not something the running
# extension ever loads. Shipping it would put 25 KB of unreferenced image in
# every install. GemDB_Icon.svg is the mark's vector source: resources/icon.png
# is rendered from it by scripts/render-icon.sh (regenerate it there, not by
# hand), and resources/gemdb-sidebar.svg is traced from it.
resources/GemDB.png
# Source art, not something the running extension ever loads. The wordmarks
# are the brand's primary logo, black for light backgrounds and white for dark,
# kept for READMEs and banners. GemDB_Favicon.png is the brand's dark-mode
# favicon at full size, 120 KB that would otherwise ride in every install:
# resources/icon.png is rendered from it by scripts/render-icon.sh (regenerate
# it there, not by hand). GemDB_Icon.svg is the gem, and
# resources/gemdb-sidebar.svg is traced from it.
resources/GemDB_Favicon.png
resources/GemDB_Icon.svg
resources/GemDB_Wordmark_*.svg
**/*.map
**/*.ts
!out/**/*.js
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
write a change into the saved stack, which then no longer holds the values it was saved with. Closing the stack
with changes pending asks whether to commit them; otherwise they are discarded.

### Changed

- **The new GemDB brand.** The Marketplace and Extensions view icon is GemDB's dark-mode favicon, the
gem on a blue gradient, and the activity bar shows the gem, recoloured to fit your theme with its
right face lighter as in the logo. The Marketplace page's banner is the brand's Core Purple.

### Fixed

- **A classmethod's or staticmethod's frame is named by its class.** The Call Stack read
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"homepage": "https://github.com/GemTalk/GemDB_Code#readme",
"qna": "https://github.com/GemTalk/GemDB_Code/issues",
"galleryBanner": {
"color": "#1E2A38",
"color": "#0B0F38",
"theme": "dark"
},
"engines": {
Expand Down
Binary file removed resources/GemDB.png
Binary file not shown.
Binary file added resources/GemDB_Favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 1 addition & 17 deletions resources/GemDB_Icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions resources/GemDB_Wordmark_Black.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions resources/GemDB_Wordmark_White.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 8 additions & 12 deletions resources/gemdb-sidebar.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 20 additions & 27 deletions scripts/render-icon.sh
Original file line number Diff line number Diff line change
@@ -1,49 +1,42 @@
#!/bin/bash
# Render the Marketplace icon, resources/icon.png, from the mark's vector
# source, resources/GemDB_Icon.svg.
# Render the Marketplace icon, resources/icon.png, from the brand's dark-mode
# favicon, resources/GemDB_Favicon.png.
#
# The Marketplace will not take an SVG for `icon`, so the PNG is a derived
# file, and this is how it is derived. Regenerate it here rather than by hand:
# the white bars this replaced were a raster padded out to a square with
# opaque white instead of transparency.
# The favicon is a raster at roughly 1667 px a side and the brand publishes no
# vector of it, so the PNG is a derived file, and this is how it is derived.
# Regenerate it here rather than by hand.
#
# 256x256, because the Marketplace shows the icon at 128 CSS pixels and a
# 128 px raster is soft on a high-DPI screen. Transparent, because the page
# behind it is dark. The mark is 240 px tall, centred, which leaves 8 px of
# margin above and below; its width follows from its aspect ratio.
# 128 px raster is soft on a high-DPI screen. The favicon is a full-bleed tile,
# so there is no margin to add. Its sides differ by a pixel, so it is cropped
# square about its centre before scaling, rather than scaled out of proportion.
#
# The activity-bar icon, resources/gemdb-sidebar.svg, is not generated: it is
# a single-colour redrawing of this mark, and its header says how.
# a single-colour redrawing of the gem, resources/GemDB_Icon.svg, and its
# header says how.
#
# Needs rsvg-convert 2.52 or later, for --page-width and friends
# (macOS: `brew install librsvg`; Debian/Ubuntu: `apt install librsvg2-bin`).
# Needs sips, which ships with macOS.
#
# Usage:
# scripts/render-icon.sh

set -euo pipefail

REPO="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
SRC="$REPO/resources/GemDB_Icon.svg"
SRC="$REPO/resources/GemDB_Favicon.png"
OUT="$REPO/resources/icon.png"

command -v rsvg-convert >/dev/null || {
echo "rsvg-convert not found; see the header of $0 for how to install it." >&2
command -v sips >/dev/null || {
echo "sips not found; it ships with macOS, so run $0 on a Mac." >&2
exit 1
}

PAGE=256
HEIGHT=240
# Width and left offset from the source's viewBox, so the mark stays centred if
# the artwork's proportions ever change.
read -r VB_W VB_H < <(sed -n 's/.*viewBox="[^ ]* [^ ]* \([^ ]*\) \([^"]*\)".*/\1 \2/p' "$SRC")
read -r WIDTH LEFT TOP < <(awk -v w="$VB_W" -v h="$VB_H" -v H="$HEIGHT" -v P="$PAGE" \
'BEGIN { W = H * w / h; printf "%.2f %.2f %.2f\n", W, (P - W) / 2, (P - H) / 2 }')
read -r SRC_W SRC_H < <(sips -g pixelWidth -g pixelHeight "$SRC" |
awk '/pixelWidth/ { w = $2 } /pixelHeight/ { h = $2 } END { print w, h }')
SIDE=$((SRC_W < SRC_H ? SRC_W : SRC_H))

rsvg-convert "$SRC" \
--width "${WIDTH}px" --height "${HEIGHT}px" \
--page-width "${PAGE}px" --page-height "${PAGE}px" \
--left "${LEFT}px" --top "${TOP}px" \
--format png --output "$OUT"
sips --cropToHeightWidth "$SIDE" "$SIDE" --resampleHeightWidth "$PAGE" "$PAGE" \
--setProperty format png "$SRC" --out "$OUT" >/dev/null

echo "Wrote $OUT (${PAGE}x${PAGE}, mark ${WIDTH}x${HEIGHT} at ${LEFT},${TOP})"
echo "Wrote $OUT (${PAGE}x${PAGE}, from a ${SIDE}x${SIDE} crop of ${SRC_W}x${SRC_H})"
Loading