diff --git a/.vscodeignore b/.vscodeignore index cbc4d1f..96b7461 100644 --- a/.vscodeignore +++ b/.vscodeignore @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index 8eefaed..6c93962 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/package.json b/package.json index f050cc0..b6b9ab4 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/resources/GemDB.png b/resources/GemDB.png deleted file mode 100644 index 5f8cc65..0000000 Binary files a/resources/GemDB.png and /dev/null differ diff --git a/resources/GemDB_Favicon.png b/resources/GemDB_Favicon.png new file mode 100644 index 0000000..6a5a04c Binary files /dev/null and b/resources/GemDB_Favicon.png differ diff --git a/resources/GemDB_Icon.svg b/resources/GemDB_Icon.svg index 01acd09..4a3430c 100644 --- a/resources/GemDB_Icon.svg +++ b/resources/GemDB_Icon.svg @@ -1,17 +1 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file + diff --git a/resources/GemDB_Wordmark_Black.svg b/resources/GemDB_Wordmark_Black.svg new file mode 100644 index 0000000..1eaf6ca --- /dev/null +++ b/resources/GemDB_Wordmark_Black.svg @@ -0,0 +1 @@ + diff --git a/resources/GemDB_Wordmark_White.svg b/resources/GemDB_Wordmark_White.svg new file mode 100644 index 0000000..10bde58 --- /dev/null +++ b/resources/GemDB_Wordmark_White.svg @@ -0,0 +1 @@ + diff --git a/resources/gemdb-sidebar.svg b/resources/gemdb-sidebar.svg index 0004c36..30fc66a 100644 --- a/resources/gemdb-sidebar.svg +++ b/resources/gemdb-sidebar.svg @@ -3,17 +3,13 @@ Activity-bar icon: GemDB_Icon.svg as a single-colour mask. VS Code treats an activity-bar icon as a mask and recolours it to match the - theme, so the mark's shades cannot survive; what carries it instead is its - negative space — the open top of the box, the band splitting it from the - chevron below, and a gap around the gem. The coordinates are GemDB_Icon.svg's - own, with the faces of each part merged; the gem is scaled to 0.45 and raised - 2 units, because in the source its corners sit on the wall and a mask would - fuse them. The viewBox is widened to a square about the mark's centre. + theme, so the mark's two shades cannot survive as colours. They survive as + alpha instead: the mask keeps opacity, so the right half carries the source's + own 0.6 and reads as the lighter face whatever colour the theme paints it. + The coordinates are GemDB_Icon.svg's own; the viewBox is widened to a square + about the mark's centre. --> - - - - + + + diff --git a/resources/icon.png b/resources/icon.png index 8517a5a..5cc8586 100644 Binary files a/resources/icon.png and b/resources/icon.png differ diff --git a/scripts/render-icon.sh b/scripts/render-icon.sh index 2c9dd1b..27e8235 100755 --- a/scripts/render-icon.sh +++ b/scripts/render-icon.sh @@ -1,22 +1,21 @@ #!/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 @@ -24,26 +23,20 @@ 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})"