From d51438d910941debe6f1a20e748f157263422cd2 Mon Sep 17 00:00:00 2001 From: Ray Date: Thu, 14 Feb 2019 17:56:02 +0100 Subject: [PATCH] Some tweaks --- src/raygui.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/raygui.h b/src/raygui.h index e819048..f6d4527 100644 --- a/src/raygui.h +++ b/src/raygui.h @@ -763,7 +763,7 @@ RAYGUIDEF void GuiGroupBox(Rectangle bounds, const char *text) DrawRectangle(bounds.x, bounds.y + bounds.height - 1, bounds.width, GROUPBOX_LINE_THICK, Fade(GetColor(GuiGetStyle(DEFAULT, (state == GUI_STATE_DISABLED) ? BORDER_COLOR_DISABLED : LINE_COLOR)), guiAlpha)); DrawRectangle(bounds.x + bounds.width - 1, bounds.y, GROUPBOX_LINE_THICK, bounds.height, Fade(GetColor(GuiGetStyle(DEFAULT, (state == GUI_STATE_DISABLED) ? BORDER_COLOR_DISABLED : LINE_COLOR)), guiAlpha)); - GuiLine((Rectangle){ bounds.x, bounds.y, bounds.width, GuiGetStyle(DEFAULT, TEXT_SIZE) }, text); + GuiLine((Rectangle){ bounds.x, bounds.y, bounds.width, 1 }, text); //-------------------------------------------------------------------- } @@ -780,7 +780,7 @@ RAYGUIDEF void GuiLine(Rectangle bounds, const char *text) // Draw control //-------------------------------------------------------------------- - if (text == NULL) DrawRectangle(bounds.x, bounds.y, bounds.width, 1, color); + if (text == NULL) DrawRectangle(bounds.x, bounds.y + bounds.height/2, bounds.width, 1, color); else { Rectangle textBounds = { 0 }; @@ -2889,7 +2889,7 @@ RAYGUIDEF void GuiLoadStyleDefault(void) GuiSetStyle(DEFAULT, BASE_COLOR_DISABLED, 0xe6e9e9ff); GuiSetStyle(DEFAULT, TEXT_COLOR_DISABLED, 0xaeb7b8ff); GuiSetStyle(DEFAULT, BORDER_WIDTH, 1); - GuiSetStyle(DEFAULT, INNER_PADDING, 2); + GuiSetStyle(DEFAULT, INNER_PADDING, 1); GuiSetStyle(DEFAULT, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_CENTER); // Populate all controls with default style @@ -2905,7 +2905,9 @@ RAYGUIDEF void GuiLoadStyleDefault(void) GuiSetStyle(DEFAULT, LINE_COLOR, 0x90abb5ff); // DEFAULT specific property GuiSetStyle(DEFAULT, BACKGROUND_COLOR, 0xf5f5f5ff); // DEFAULT specific property + GuiSetStyle(LABEL, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_LEFT); GuiSetStyle(BUTTON, BORDER_WIDTH, 2); + GuiSetStyle(BUTTON, INNER_PADDING, 4); GuiSetStyle(TOGGLE, GROUP_PADDING, 2); GuiSetStyle(SLIDER, SLIDER_WIDTH, 15); GuiSetStyle(SLIDER, TEXT_PADDING, 5);