removed left-right padding from GuiProgressBar (#473)

This commit is contained in:
pmHaugen
2025-03-14 13:16:02 +01:00
committed by GitHub
parent 460411efef
commit 1536ae35c7

View File

@ -3375,7 +3375,7 @@ int GuiProgressBar(Rectangle bounds, const char *textLeft, const char *textRight
if (value == NULL) value = &temp; if (value == NULL) value = &temp;
// Progress bar // Progress bar
Rectangle progress = { bounds.x + GuiGetStyle(PROGRESSBAR, BORDER_WIDTH) + GuiGetStyle(PROGRESSBAR, PROGRESS_PADDING), Rectangle progress = { bounds.x + GuiGetStyle(PROGRESSBAR, BORDER_WIDTH),
bounds.y + GuiGetStyle(PROGRESSBAR, BORDER_WIDTH) + GuiGetStyle(PROGRESSBAR, PROGRESS_PADDING), 0, bounds.y + GuiGetStyle(PROGRESSBAR, BORDER_WIDTH) + GuiGetStyle(PROGRESSBAR, PROGRESS_PADDING), 0,
bounds.height - GuiGetStyle(PROGRESSBAR, BORDER_WIDTH) - 2*GuiGetStyle(PROGRESSBAR, PROGRESS_PADDING) -1 }; bounds.height - GuiGetStyle(PROGRESSBAR, BORDER_WIDTH) - 2*GuiGetStyle(PROGRESSBAR, PROGRESS_PADDING) -1 };
@ -3414,7 +3414,6 @@ int GuiProgressBar(Rectangle bounds, const char *textLeft, const char *textRight
} }
// Draw slider internal progress bar (depends on state) // Draw slider internal progress bar (depends on state)
progress.width -= 2*GuiGetStyle(PROGRESSBAR, PROGRESS_PADDING);
GuiDrawRectangle(progress, 0, BLANK, GetColor(GuiGetStyle(PROGRESSBAR, BASE_COLOR_PRESSED))); GuiDrawRectangle(progress, 0, BLANK, GetColor(GuiGetStyle(PROGRESSBAR, BASE_COLOR_PRESSED)));
} }