Skip to content

Commit

Permalink
More macro updates
Browse files Browse the repository at this point in the history
  • Loading branch information
nicbarker committed Jan 13, 2025
1 parent 225118a commit 0f2519f
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions examples/SDL2-video-demo/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
const int FONT_ID_BODY_16 = 0;
Clay_Color COLOR_WHITE = { 255, 255, 255, 255};

Clay_Padding outerPadding16 = { 16, 16, 16, 16 };

void RenderHeaderButton(Clay_String text) {
CLAY(
CLAY_LAYOUT({ .padding = { 16, 16, 8, 8 }}),
Expand All @@ -32,7 +30,7 @@ void RenderHeaderButton(Clay_String text) {
}

void RenderDropdownMenuItem(Clay_String text) {
CLAY(CLAY_LAYOUT({ .padding = outerPadding16})) {
CLAY(CLAY_LAYOUT({ .padding = CLAY_PADDING_ALL(16)})) {
CLAY_TEXT(text, CLAY_TEXT_CONFIG({
.fontId = FONT_ID_BODY_16,
.fontSize = 16,
Expand Down Expand Up @@ -92,7 +90,7 @@ static Clay_RenderCommandArray CreateLayout() {
CLAY_LAYOUT({
.layoutDirection = CLAY_TOP_TO_BOTTOM,
.sizing = layoutExpand,
.padding = outerPadding16,
.padding = CLAY_PADDING_ALL(16),
.childGap = 16
})
) {
Expand Down Expand Up @@ -180,7 +178,7 @@ static Clay_RenderCommandArray CreateLayout() {
CLAY_RECTANGLE(contentBackgroundConfig),
CLAY_LAYOUT({
.layoutDirection = CLAY_TOP_TO_BOTTOM,
.padding = outerPadding16,
.padding = CLAY_PADDING_ALL(16),
.childGap = 8,
.sizing = {
.width = CLAY_SIZING_FIXED(250),
Expand All @@ -192,7 +190,7 @@ static Clay_RenderCommandArray CreateLayout() {
Document document = documents.documents[i];
Clay_LayoutConfig sidebarButtonLayout = {
.sizing = { .width = CLAY_SIZING_GROW(0) },
.padding = outerPadding16
.padding = CLAY_PADDING_ALL(16)
};

if (i == selectedDocumentIndex) {
Expand Down Expand Up @@ -237,7 +235,7 @@ static Clay_RenderCommandArray CreateLayout() {
CLAY_LAYOUT({
.layoutDirection = CLAY_TOP_TO_BOTTOM,
.childGap = 16,
.padding = outerPadding16,
.padding = CLAY_PADDING_ALL(16),
.sizing = layoutExpand
})
) {
Expand Down

0 comments on commit 0f2519f

Please sign in to comment.