ColorButton: small rendering tweak/optimization for the alpha checkerboard.

Inverting the pattern means that for our typical 3x3 grid we don't need to draw 1+4 rounded rectangles, only 1.
This also fix the slightly rounding mismatch when switching from a=255 to a<255 paths.
This commit is contained in:
ocornut
2026-06-01 14:23:29 +02:00
parent 70f02b0558
commit 3b99fc4883
2 changed files with 6 additions and 4 deletions
+2
View File
@@ -61,6 +61,8 @@ Other Changes:
- Minor optimization to `AddLine()`, `AddLineH()`, `AddLineV()` functions. (#4091)
- Added `ImDrawListFlags_TextNoPixelSnap` to disable snapping of AddText()
coordinates for a given scope. (#3437, #9417, #2291)
- ColorButton:
- Small rendering tweak/optimization for the alpha checkerboard.
- Demo:
- Extract 'Widgets->Tree Nodes->Selectable Nodes' out of the 'Advanced'
demo for clarity (manual reimplementation of basic selection).