mirror of
https://github.com/nicbarker/clay.git
synced 2025-04-15 10:48:04 +00:00
More macro updates
This commit is contained in:
parent
225118a5a7
commit
0f2519f2a9
@ -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 }}),
|
||||
@ -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,
|
||||
@ -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
|
||||
})
|
||||
) {
|
||||
@ -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),
|
||||
@ -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) {
|
||||
@ -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
|
||||
})
|
||||
) {
|
||||
|
Loading…
Reference in New Issue
Block a user