Repository navigation
Version 1.1.0
Added
- Customizable colors — 5 new published properties (
TrackFrameColor,TrackColorOff,TrackColorOn,ThumbColorOff,ThumbColorOn) to override the default WinUI 3 color scheme. Set toclNone(default) to use built-in colors - Text label — optional text next to the toggle with 5 new properties (
ShowText,TextOn,TextOff,TextPosition,TextSpacing) and a newTTextPositionenum (tpLeft,tpRight). The component auto-adjusts its width based on text content - Font property — re-published
Fontfor text label rendering via Object Inspector - DUnitX tests — 17 unit tests covering color properties, text properties, auto-sizing, and input validation
Fixed
- Click area is now restricted to the track — clicking the text label does not toggle the switch
- Component correctly recalculates bounds after DPI scaling (
ChangeScaleoverride) - Negative
TextSpacingvalues are clamped to 0 - Test runner always waits for user input before closing the console window
FastMM4is now conditionally compiled ({$IFDEF FASTMM})
Installation
- Open
ToggleSwitch-PG.groupprojin Delphi IDE - In Project Manager: right-click ToggleSwitch.bpl → Compile → Install
- Done — use
TFluentToggleSwitchin any project
Full Changelog: v1.0.1...v1.1.0