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
16 changes: 16 additions & 0 deletions assets/wind-badge-taskbar.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 5 additions & 11 deletions assets/wind-badge.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 assets/wind.ico
Binary file not shown.
9 changes: 3 additions & 6 deletions installer/over.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,12 @@
<body>
<div class="pane k" id="k"></div><div class="pane w" id="w"></div>
<script>
// The app icon, from assets/wind-badge.svg: the indigo badge with the three wind strokes
// knocked out. Same mark the tray and the Settings window show, so setup and the app the
// The app icon, from assets/wind-badge.svg: the black badge with the three white wind strokes
// on it. Same mark the tray and the Settings window show, so setup and the app the
// user is about to run are recognisably the same thing.
const MARK = (s) => `
<svg width="${s}" height="${s}" viewBox="0 0 256 256" style="display:block;flex:none">
<defs><linearGradient id="wg" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stop-color="#6d6df0"/><stop offset="1" stop-color="#5151cb"/>
</linearGradient></defs>
<rect x="8" y="8" width="240" height="240" rx="56" fill="url(#wg)"/>
<rect x="8" y="8" width="240" height="240" rx="56" fill="#000"/>
<g transform="translate(50,50) scale(9.75)" fill="none" stroke="#fff"
stroke-width="1.55" stroke-linecap="round" stroke-linejoin="round">
<path d="M2 5.5h8.5a2 2 0 1 0-2-2"/>
Expand Down
5 changes: 3 additions & 2 deletions src/tray_app/tray_icon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ void AddIcon(HWND hwnd, HINSTANCE hInst) {
g_nid.uID = 1;
g_nid.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP;
g_nid.uCallbackMessage = WM_TRAY;
// Our logo badge at the shell's small-icon size (picks the 16px frame from the multi-size .ico
// for a crisp tray render). Fall back to the generic app icon if the resource can't be loaded.
// Our logo badge at the shell's small-icon size for this DPI (36 px at 225%); wind.ico carries an exact
// frame for every common scale, so nothing is resampled. Fall back to the generic app icon if the resource
// can't be loaded.
if (!hInst) hInst = GetModuleHandleW(nullptr);
if (!g_nid.hIcon)
g_nid.hIcon = (HICON)LoadImageW(hInst, MAKEINTRESOURCEW(IDI_WIND), IMAGE_ICON,
Expand Down
4 changes: 2 additions & 2 deletions src/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#define WIND_VER_MAJOR 0
#define WIND_VER_MINOR 21
#define WIND_VER_PATCH 0
#define WIND_VER_PATCH 1

// String form for logs/snapshot/UI. Keep in sync with the numeric parts above.
#define WIND_VERSION_STR "0.21.0"
#define WIND_VERSION_STR "0.21.1"
2 changes: 1 addition & 1 deletion src/wind.rc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "version.h"
#include <winver.h>
// Embeds the Wind logo (filled-badge variant) as the application icon. The .ico is
// generated from assets/wind-badge.svg by tools/make_icon.mjs and committed, so the
// generated from assets/wind-badge-taskbar.svg by tools/make_icon.mjs and committed, so the
// normal build only needs rc.exe (Windows SDK, already on PATH via vcvars).
IDI_WIND ICON "..\\assets\\wind.ico"

Expand Down
22 changes: 18 additions & 4 deletions tools/make_icon.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generate assets/wind.ico from assets/wind-badge.svg.
// Generate assets/wind.ico from assets/wind-badge-taskbar.svg.
//
// Renders the SVG at each icon size with Playwright's bundled Chromium (faithful
// stroke/arc rendering, transparent corners outside the rounded badge), then packs
Expand All @@ -21,8 +21,22 @@ const require = createRequire(import.meta.url);
// Resolve Playwright from the UI package (no top-level dependency on it).
const { chromium } = require(resolve(root, 'ui', 'node_modules', 'playwright'));

const SIZES = [256, 128, 64, 48, 40, 32, 24, 16];
const svg = readFileSync(resolve(root, 'assets', 'wind-badge.svg'), 'utf8');
// Every size the shell asks for between 100% and 300% scaling (small icon 16 x scale, taskbar 24 x scale,
// large icon 32 x scale), so Windows never resamples a neighbour frame: a 225% taskbar wants 54 px, the tray
// 36 px, and scaling 64 or 40 down made both soft (Max 2026-10-03, #332).
const SIZES = [256, 128, 96, 80, 72, 64, 60, 56, 54, 48, 42, 40, 36, 32, 30, 28, 24, 20, 16];
// Taskbar variant: black badge + a solid #202020 edge outline (see the SVG header). The outline
// is re-drawn per size at exactly 1 physical px, the thinnest line that never vanishes. The
// stroke sits inside the badge (centre inset by half its width from the 8..248 edge).
const src = readFileSync(resolve(root, 'assets', 'wind-badge-taskbar.svg'), 'utf8');
function svgFor(s) {
const w = 256 / s; // viewBox units: exactly 1 physical px at every size
const inset = 8 + w / 2, side = 240 - w, rx = 56 - w / 2;
const rect = `<rect x="${inset}" y="${inset}" width="${side}" height="${side}" rx="${rx}" fill="none" stroke="#202020" stroke-width="${w}"/>`;
const re = /<rect x="11"[^>]*\/>/;
if (!re.test(src)) throw new Error('outline rect not found in wind-badge-taskbar.svg');
return src.replace(re, rect);
}
const tmp = mkdtempSync(resolve(tmpdir(), 'windicon-'));

const browser = await chromium.launch();
Expand All @@ -33,7 +47,7 @@ for (const s of SIZES) {
const html = `<!doctype html><html><head><style>
html,body{margin:0;padding:0;background:transparent}
svg{display:block;width:${s}px;height:${s}px}
</style></head><body>${svg}</body></html>`;
</style></head><body>${svgFor(s)}</body></html>`;
await page.setViewportSize({ width: s, height: s });
await page.setContent(html, { waitUntil: 'networkidle' });
const out = resolve(tmp, `icon-${s}.png`);
Expand Down
2 changes: 1 addition & 1 deletion ui/src/controls/Preview.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
const visible = (r) => !r.showIf || String(values[r.showIf.key]) === String(r.showIf.eq);
const set = (key, val) => { values[key] = val; calls.push([key, val]); };
const extra = {
runningModel: 'hybrid', mpoNeedsRestart: false, version: '0.21.0',
runningModel: 'hybrid', mpoNeedsRestart: false, version: '0.21.1',
onRestart: () => calls.push('restart'), onAction: (a) => calls.push(['action', a]),
onRepo: () => calls.push('repo'),
pick: async () => 'RDR2.exe',
Expand Down
Loading