Fix text Y position when the item is in the last row of a ButtonSet.

The last row of items are a bit taller to make room for the button border, so this compensates that.
This commit is contained in:
Martín Capello 2022-09-14 16:53:13 -03:00 committed by David Capello
parent 8d5f281998
commit 6e57546aa9

View File

@ -94,7 +94,7 @@ void ButtonSet::Item::onPaint(ui::PaintEvent& ev)
bool isLastRow = (info.row+info.vspan >= info.grid_rows);
if (m_icon || isLastRow) {
textRc.y -= 1*guiscale();
textRc.y -= 2*guiscale();
iconRc.y -= 1*guiscale();
}