Change: [UI] Use proper matrix padding for server list test.

Text was only positioned correctly at 1x scale due to old pixel-based positioning method.
master
Peter Nelson 2 months ago committed by Peter Nelson
parent d85f4b3ebf
commit ba2b14b075

@ -361,8 +361,8 @@ protected:
GfxFillRect(r.Shrink(WidgetDimensions::scaled.bevel), PC_GREY);
}
/* offsets to vertically centre text and icons */
int text_y_offset = (this->resize.step_height - GetCharacterHeight(FS_NORMAL)) / 2 + 1;
/* Offset to vertically position text. */
int text_y_offset = WidgetDimensions::scaled.matrix.top + (this->resize.step_height - WidgetDimensions::scaled.matrix.Vertical() - GetCharacterHeight(FS_NORMAL)) / 2;
info = info.Shrink(WidgetDimensions::scaled.framerect);
name = name.Shrink(WidgetDimensions::scaled.framerect);

Loading…
Cancel
Save