Bring Windows XP themes to your KDE Plasma environment! xplasma.hotsocket.fyi
xplasma docs start-button-sizing.md
2.8 kB · 57 lines
Markdown

The taskbar and the Start button: how big XP makes them #

Measured 2026-10-26 on the XP SP3 reference VM (1024 x 768, 96 DPI), nine styles applied in turn from the patched snapshot: Luna, Royale, Zune, Embedded, XP Live Bluerise, Mac Lion, Aero Vista, XPBlack 2 and ambient. The windows' rects come from refharness/xptaskbar.c and xpmeasure.c; the numbers and captures are in ~/Documents/xplive-captures/ (taskbar-heights.txt, startbutton-metrics.txt, measurements.txt).

The taskbar's height #

22 + the task buttons' (TaskBand::Toolbar.Button) top and bottom ContentMargins, never less than 22.

style margins (top + bottom) rule XP
Luna, Royale, Zune, Embedded, Aero Vista, XPBlack 2, ambient 4 + 4 30 30
XP Live Bluerise 4 + 3 29 29
Mac Lion -1 + 0 22 22

The caption's size plays no part (Aero Vista's is 20, its taskbar 30). The floor of 22 rests on Mac Lion alone. taskbarHeight() in src/app/panel.cpp; Windows Classic keeps its 30.

The Start button #

The button is its content -- XP's 25 x 20 flag beside the label, the label with a 1 px text margin all round -- inside its Start::Button ContentMargins (GetThemeBackgroundExtent):

width  = margins.left + 25 + (label width + 2) + margins.right
height = max(taskbar height,
             max(20, label height + 2) + margins.top + margins.bottom)

The label is measured as GDI measures it: its width a pixel at least per glyph (Tahoma at 1 px: "start" is 5), its height GDI's tmHeight, which is the font's VDMX entry at that size where it has one (Franklin Gothic Medium at 19 px: 18 + 6 = 24, where its OS/2 win metrics scale to 17 + 4).

style margins (l, r, t, b) label width height XP
Luna (and Royale, Zune, Embedded) 10, 24, 2, 4 Franklin Gothic Medium 14 italic: 38 x 24 10 + 25 + 40 + 24 = 99 26 + 6 = 32 99 x 32
XP Live Bluerise -34, 48, 18, -4 Tahoma 1: 5 x 2 -34 + 25 + 7 + 48 = 46 20 + 14 = 34 46 x 34
Mac Lion -67, 81, 0, 0 Arial 1 20, under the 22 bar: 22 46 x 22
Aero Vista -21, 55, 0, 0 Tahoma 1 20, under the bar: 30 66 x 30
XPBlack 2 55, -20, 30, -50 Franklin Gothic Medium 14 italic: 38 55 + 25 + 40 - 20 = 100 0: the bar's 30 100 x 30

XP's own BCM_GETIDEALSIZE for Luna's button is 99 x 32, and its BCM_GETTEXTMARGIN 1, 1, 1, 1. The button sits at the taskbar's top; what's past the bar's bottom is off the screen (Luna's 2px, XP Live's 5).

The art is drawn into that rect by its own sizing: XP Live's 29 px TrueSize orb centred in 46 x 34 (at x 10..34, 3 px under the bar's top, as captured), XPBlack 2's 90 px Stretch pill stretched to 100 (its lettering with it, as XP shows it). No style is special-cased.