A simple, small calculator placed discreetly near the Windows Taskbar or anywhere on the screen
0

Configure Feed

Select the types of activity you want to include in your feed.

docs: spec + plan for 14pt display font and tighter padding

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

authored by

Marco Maroni
Claude Fable 5
and committed by
Tangled
(Jul 15, 2026, 1:16 PM +0300) daf871a2 edb3dabf

+126
+78
docs/superpowers/plans/2026-07-15-display-font-size.md
··· 1 + # Display Font Size Implementation Plan 2 + 3 + > **For agentic workers:** Single-task plan; executed inline (superpowers:executing-plans). Steps use checkbox (`- [ ]`) syntax for tracking. 4 + 5 + **Goal:** Raise the display font to 14pt (single constant) and shrink the vertical padding so no white band remains under the digits. 6 + 7 + **Architecture:** `DISPLAY_FONT_PT` constant + points→logical helper in `VisualStyle.cpp`, applied in both `CreateFont`s; vertical padding in `CreateStandalone` drops from 14 to 8. 8 + 9 + **Spec:** `docs/superpowers/specs/2026-07-15-display-font-size-design.md` 10 + 11 + ## Global Constraints 12 + 13 + - Build the `.vcxproj` directly: `msbuild TaskbarCalculator.vcxproj /p:Configuration=Debug /p:Platform=x64`. 14 + - Only `VisualStyle.cpp` and `CalculatorWindow.cpp` change. 15 + - Testing: build + `tests\build-and-run.cmd` 16/16 + user visual check (size iteration expected). 16 + 17 + --- 18 + 19 + ### Task 1: Font size constant + padding 20 + 21 + **Files:** 22 + - Modify: `VisualStyle.cpp` (top of file + both `CreateFont` methods) 23 + - Modify: `CalculatorWindow.cpp` (`CreateStandalone`, clientH line) 24 + 25 + - [ ] **Step 1: Add constant + helper in `VisualStyle.cpp`** (after the includes) 26 + 27 + ```cpp 28 + // Point size of the calculator display; the one knob for readability tweaks. 29 + const int DISPLAY_FONT_PT = 14; 30 + 31 + static LONG DisplayFontHeight() 32 + { 33 + HDC hdc = ::GetDC(NULL); 34 + const LONG h = -::MulDiv(DISPLAY_FONT_PT, ::GetDeviceCaps(hdc, LOGPIXELSY), 72); 35 + ::ReleaseDC(NULL, hdc); 36 + return h; 37 + } 38 + ``` 39 + 40 + - [ ] **Step 2: Apply in both styles** 41 + 42 + Classic (`CClassicVisualStyle::CreateFont`), before `CreateFontIndirect`: 43 + 44 + ```cpp 45 + if(::SystemParametersInfo(SPI_GETNONCLIENTMETRICS, ncm.cbSize, &ncm, 0)) 46 + { 47 + ncm.lfMessageFont.lfHeight = DisplayFontHeight(); 48 + m_hFont = ::CreateFontIndirect(&ncm.lfMessageFont); 49 + } 50 + ``` 51 + 52 + Themed (`CThemedVisualStyle::CreateFont`), in the `SUCCEEDED(hr)` block: 53 + 54 + ```cpp 55 + if(SUCCEEDED(hr)) 56 + { 57 + lf.lfHeight = DisplayFontHeight(); 58 + lf.lfWeight = 600; 59 + m_hFont = ::CreateFontIndirect(&lf); 60 + ATLASSERT(m_hFont); 61 + } 62 + ``` 63 + 64 + - [ ] **Step 3: Shrink vertical padding in `CalculatorWindow.cpp` (`CreateStandalone`)** 65 + 66 + ```cpp 67 + LONG clientH = ideal.y + 8; if (clientH < 28) clientH = 28; 68 + ``` 69 + 70 + - [ ] **Step 4: Build** — `msbuild TaskbarCalculator.vcxproj /p:Configuration=Debug /p:Platform=x64` → 0 errors. 71 + - [ ] **Step 5: Engine regression** — `tests\build-and-run.cmd` → 16/16. 72 + - [ ] **Step 6: User visual check** — launch, judge size/spacing; iterate on `DISPLAY_FONT_PT` if needed. 73 + - [ ] **Step 7: Commit** 74 + 75 + ```bash 76 + git add VisualStyle.cpp CalculatorWindow.cpp 77 + git commit -m "feat: 14pt display font and tighter vertical padding" 78 + ```
+48
docs/superpowers/specs/2026-07-15-display-font-size-design.md
··· 1 + # Display Font Size + Vertical Padding — Design 2 + 3 + **Date:** 2026-07-15 4 + **Status:** Approved (brainstorming) 5 + 6 + ## Goal 7 + 8 + Make the number display easier to read and remove the white gap below it: the themed 9 + font inherited from the DeskBand era (~9pt toolbar/REBAR theme font) is small for a 10 + standalone window, and the client area adds 14px of vertical padding that the top-aligned 11 + single-line EDIT leaves as white space at the bottom. 12 + 13 + ## Behavior 14 + 15 + - **Font size:** a single constant `DISPLAY_FONT_PT = 14` in `VisualStyle.cpp`. 16 + Both styles override the height of the font they resolve 17 + (`lfHeight = -MulDiv(DISPLAY_FONT_PT, LOGPIXELSY, 72)` via a small shared helper): 18 + - Themed: theme REBAR band font family, weight 600 (unchanged), height forced to 14pt. 19 + - Classic: `lfMessageFont` family, height forced to 14pt (weight untouched). 20 + The constant is the single knob for later size iterations. 21 + - **Vertical padding:** in `CreateStandalone`, client height goes from `ideal.y + 14` to 22 + `ideal.y + 8` (covers the EDIT's ~4px `WS_EX_CLIENTEDGE` borders plus minimal 23 + breathing room). Horizontal padding (+24) and the min-size guards stay. 24 + - Window width/height adapt automatically: sizing is already computed from the text 25 + extent of the sample string `99.999,99` in the display font. 26 + 27 + ## Accepted side effects 28 + 29 + - Window grows with the font; saved position anchors the client origin, so the bottom 30 + edge sits a few px lower than before — one manual re-drag fixes it if it bothers. 31 + - The app is DPI-virtualized (no DPI-aware manifest), so `LOGPIXELSY` is 96 and the 32 + point size is logical; this matches all existing metrics in the app. 33 + 34 + ## Components touched 35 + 36 + - `VisualStyle.cpp`: `DISPLAY_FONT_PT` constant + height override in both `CreateFont`s. 37 + - `CalculatorWindow.cpp`: vertical padding constant in `CreateStandalone`. 38 + 39 + ## Testing 40 + 41 + - Engine regression: `tests\build-and-run.cmd` → 16/16 (UI-only). 42 + - Manual (user): number readable at 14pt; no white band under the digits; window still 43 + compact above the tray; caption auto-hide and position persistence unaffected. 44 + - Iteration expected: if 14pt doesn't convince, change `DISPLAY_FONT_PT` and rebuild. 45 + 46 + ## Out of scope (YAGNI) 47 + 48 + - Font family changes, user-configurable size, DPI-awareness work.