Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Renderer/Raylib] Text disappears when setting padding top or left on container component. #284

Open
etherbound-dev opened this issue Feb 25, 2025 · 1 comment

Comments

@etherbound-dev
Copy link

When setting the left/top padding on a component containing text, the text disappears. Setting the right or bottom padding works as expected.

works:

		CLAY({.id = CLAY_ID("Container"),
		      .backgroundColor = {0, 0, 0, 255},
		      .layout = {.padding = {0, 24, 0, 24}}})
		{
			CLAY_TEXT(CLAY_STRING("Hello World"),
				  CLAY_TEXT_CONFIG(
					  {.fontSize = 64,
					   .textColor = {255, 255, 255, 255}}));
		}

doesn't work:

		CLAY({.id = CLAY_ID("Container"),
		      .backgroundColor = {0, 0, 0, 255},
		      .layout = {.padding = {1, 0, 0, 0}}})
		{
			CLAY_TEXT(CLAY_STRING("Hello World"),
				  CLAY_TEXT_CONFIG(
					  {.fontSize = 64,
					   .textColor = {255, 255, 255, 255}}));
		}

Image
Image

@nicbarker
Copy link
Owner

Hello! That is odd, I just tried both those examples and they appear to work on my machine. What combination of OS / compiler are you running?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants