RynthCore/tools/PanelTextScaleTests/PanelTextScaleTests.csproj
Daniel Wallace 98316c1969 Toolbar size: let players enlarge the in-game ImGui bar
The bar's buttons are a fixed 20 logical px and the only multiplier is the
DPI scale, which is 1 for a DPI-unaware acclient, so the icons cannot be
made bigger. This adds a separate "chrome" row to PanelTextScale that the
bar draws at: it uses the existing baked enlarged fonts (icons stay sharp)
and scales the button size by the same step's factor. Tooltips and menus
opened from the bar inherit it.

- PanelTextScale: __chrome row with GetChrome/SetChrome; StepsInUse bakes it
  even with per-panel sizing off; SetForWindow's reset loop skips it;
  RYNTHCORE_PANEL_TEXT_SIZE overrides the file path for tests.
- ImGuiBar: grip right-click size row (- / + / Reset), Ctrl+wheel over the
  bar, and an on-screen clamp when the bar grows. A clamp only persists the
  position when the user dragged or the size changed, so a smaller AC
  window never overwrites the saved position.
- Settings > Display > Text Size: "Toolbar" combo.
- /rc ui barsize [0-10|+|-|+n|-n|status].
- tools/PanelTextScaleTests: offline tests for the chrome row.

Untouched: FontScale/_uiScale, placement scale, the plugin SDK, pop-out
styling and panel title bars.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-10 12:43:54 -07:00

26 lines
1.1 KiB
XML

<Project Sdk="Microsoft.NET.Sdk">
<!--
Offline checks for the toolbar's text size (the "chrome" row of PanelTextScale).
src\RynthCore.Engine\UI\PanelTextScale.cs, compiled in, with a stub ImGuiFonts. The toolbar's
row must survive a window being sized (SetForWindow's reset loop), be baked even when sizing
per panel is off (StepsInUse), be left alone by All Panels changes, stay unbaked at 0, clamp,
and round-trip through the file. PanelTextScale reads its file path once per process, so each
case runs in a child process pointed at a temp file with RYNTHCORE_PANEL_TEXT_SIZE. Never
touches %LOCALAPPDATA%\RynthCore.
Run: dotnet run -c Release (exit 0 = pass, 1 = fail)
-->
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<InvariantGlobalization>true</InvariantGlobalization>
<RootNamespace>PanelTextScaleTests</RootNamespace>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\..\src\RynthCore.Engine\UI\PanelTextScale.cs" Link="Engine\PanelTextScale.cs" />
</ItemGroup>
</Project>