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.

feat: 10pt display font and tighter vertical padding

Font size chosen by the user to visually match the notification-area
clock; DISPLAY_FONT_PT in VisualStyle.cpp is the single knob.

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) 53e443dd daf871a2

+24 -9
+1 -1
CalculatorWindow.cpp
··· 148 148 // Size so the CLIENT area fits the display, accounting for caption + borders. 149 149 POINTL ideal = CalcIdealSize(); 150 150 LONG clientW = ideal.x + 24; if (clientW < 160) clientW = 160; 151 - LONG clientH = ideal.y + 14; if (clientH < 28) clientH = 28; 151 + LONG clientH = ideal.y + 8; if (clientH < 28) clientH = 28; 152 152 RECT r = { 0, 0, clientW, clientH }; 153 153 AdjustWindowRectEx(&r, WS_POPUP | WS_CAPTION | WS_SYSMENU, FALSE, WS_EX_TOOLWINDOW); 154 154 SetWindowPos(NULL, 0, 0, r.right - r.left, r.bottom - r.top, SWP_NOMOVE | SWP_NOZORDER);
+15
VisualStyle.cpp
··· 4 4 #include "VisualStyle.h" 5 5 #include "Utils.h" 6 6 7 + // Point size of the calculator display; the one knob for readability tweaks. 8 + const int DISPLAY_FONT_PT = 10; 9 + 10 + static LONG DisplayFontHeight() 11 + { 12 + HDC hdc = ::GetDC(NULL); 13 + const LONG h = -::MulDiv(DISPLAY_FONT_PT, ::GetDeviceCaps(hdc, LOGPIXELSY), 72); 14 + ::ReleaseDC(NULL, hdc); 15 + return h; 16 + } 17 + 7 18 //////////////////////////////////////////////////////////////////////////////// 8 19 // Classic visual style 9 20 ··· 29 40 (::IsVistaOrHigher() ? 0 : sizeof(ncm.iPaddedBorderWidth)); 30 41 31 42 if(::SystemParametersInfo(SPI_GETNONCLIENTMETRICS, ncm.cbSize, &ncm, 0)) 43 + { 44 + ncm.lfMessageFont.lfHeight = DisplayFontHeight(); 32 45 m_hFont = ::CreateFontIndirect(&ncm.lfMessageFont); 46 + } 33 47 34 48 ATLASSERT(m_hFont); 35 49 ··· 76 90 77 91 if(SUCCEEDED(hr)) 78 92 { 93 + lf.lfHeight = DisplayFontHeight(); 79 94 lf.lfWeight = 600; 80 95 m_hFont = ::CreateFontIndirect(&lf); 81 96 ATLASSERT(m_hFont);
+3 -3
docs/superpowers/plans/2026-07-15-display-font-size.md
··· 2 2 3 3 > **For agentic workers:** Single-task plan; executed inline (superpowers:executing-plans). Steps use checkbox (`- [ ]`) syntax for tracking. 4 4 5 - **Goal:** Raise the display font to 14pt (single constant) and shrink the vertical padding so no white band remains under the digits. 5 + **Goal:** Raise the display font to 10pt (single constant) and shrink the vertical padding so no white band remains under the digits. 6 6 7 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 8 ··· 26 26 27 27 ```cpp 28 28 // Point size of the calculator display; the one knob for readability tweaks. 29 - const int DISPLAY_FONT_PT = 14; 29 + const int DISPLAY_FONT_PT = 10; 30 30 31 31 static LONG DisplayFontHeight() 32 32 { ··· 74 74 75 75 ```bash 76 76 git add VisualStyle.cpp CalculatorWindow.cpp 77 - git commit -m "feat: 14pt display font and tighter vertical padding" 77 + git commit -m "feat: 10pt display font and tighter vertical padding" 78 78 ```
+5 -5
docs/superpowers/specs/2026-07-15-display-font-size-design.md
··· 12 12 13 13 ## Behavior 14 14 15 - - **Font size:** a single constant `DISPLAY_FONT_PT = 14` in `VisualStyle.cpp`. 15 + - **Font size:** a single constant `DISPLAY_FONT_PT = 10` in `VisualStyle.cpp`. 16 16 Both styles override the height of the font they resolve 17 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). 18 + - Themed: theme REBAR band font family, weight 600 (unchanged), height forced to 10pt. 19 + - Classic: `lfMessageFont` family, height forced to 10pt (weight untouched). 20 20 The constant is the single knob for later size iterations. 21 21 - **Vertical padding:** in `CreateStandalone`, client height goes from `ideal.y + 14` to 22 22 `ideal.y + 8` (covers the EDIT's ~4px `WS_EX_CLIENTEDGE` borders plus minimal ··· 39 39 ## Testing 40 40 41 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 42 + - Manual (user): number readable at 10pt; no white band under the digits; window still 43 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. 44 + - Iteration expected: if 10pt doesn't convince, change `DISPLAY_FONT_PT` and rebuild. 45 45 46 46 ## Out of scope (YAGNI) 47 47