mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-11 13:10:45 +00:00
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.
This commit is contained in:
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…
Reference in New Issue
Block a user