Skip to content

Commit 7150696

Browse files
committed
normalise padding between bottom two rows
1 parent 45aae77 commit 7150696

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

ReacomaExtension/ReacomaExtension.cpp

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,14 @@ void ReacomaExtension::SetupActionButtons(IGraphics *pGraphics,
331331
for (int i = 0; i < numActionButtons; ++i) {
332332
const auto &buttonInfo = buttonsToCreate[i];
333333
IRECT b =
334-
actionButtonRowBounds.GetGridCell(0, i, 1, numActionButtons)
335-
.GetHPadded(-theme.padding);
334+
actionButtonRowBounds.GetGridCell(0, i, 1, numActionButtons);
335+
336+
// Apply the same padding logic as the bottom row
337+
if (i > 0)
338+
b.L += theme.padding * 2.5f;
339+
if (i < numActionButtons - 1)
340+
b.R -= theme.padding * 2.5f;
341+
336342
pGraphics->AttachControl(new iplug::igraphics::ReacomaButton(
337343
b, buttonInfo.label, buttonInfo.function, theme));
338344
}
@@ -343,12 +349,12 @@ void ReacomaExtension::SetupFooterControls(IGraphics *pGraphics,
343349
const IRECT &bottomUtilityRowBounds,
344350
const ReacomaTheme &theme) {
345351

346-
IRECT paddedBottomRow = bottomUtilityRowBounds.GetHPadded(-theme.padding);
352+
IRECT paddedBottomRow = bottomUtilityRowBounds;
347353

348354
IRECT autoProcessBounds =
349355
paddedBottomRow.GetFromLeft(theme.autoProcessControlWidth);
350356
IRECT cancelBounds = paddedBottomRow.GetFromRight(theme.cancelButtonWidth);
351-
IRECT progressBounds = paddedBottomRow; // Start with the full padded width
357+
IRECT progressBounds = paddedBottomRow;
352358
progressBounds.L = autoProcessBounds.R + theme.padding * 5;
353359
progressBounds.R = cancelBounds.L - theme.padding * 5;
354360

0 commit comments

Comments
 (0)