From b1c9a9dc3c162a1df845ed8ba548d00a9f4fa3b4 Mon Sep 17 00:00:00 2001 From: tralph3 Date: Mon, 23 Jun 2025 23:36:59 -0300 Subject: [PATCH] Fix aspect ratio display, closes #449 --- clay.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/clay.h b/clay.h index 0d5b69f..b1682bc 100644 --- a/clay.h +++ b/clay.h @@ -3611,7 +3611,12 @@ void Clay__RenderDebugView(void) { CLAY({ .id = CLAY_ID("Clay__DebugViewElementInfoAspectRatioBody"), .layout = { .padding = attributeConfigPadding, .childGap = 8, .layoutDirection = CLAY_TOP_TO_BOTTOM } }) { CLAY_TEXT(CLAY_STRING("Aspect Ratio"), infoTitleConfig); // Aspect Ratio - CLAY_TEXT(Clay__IntToString(aspectRatioConfig->aspectRatio), infoTextConfig); + CLAY({ .id = CLAY_ID("Clay__DebugViewElementInfoAspectRatio") }) { + CLAY_TEXT(Clay__IntToString(aspectRatioConfig->aspectRatio), infoTextConfig); + CLAY_TEXT(CLAY_STRING("."), infoTextConfig); + float frac = aspectRatioConfig->aspectRatio - (int)(aspectRatioConfig->aspectRatio); + CLAY_TEXT(Clay__IntToString(frac * 100), infoTextConfig); + } } break; }