1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-19 02:12:37 +01:00

Fix: Network server highlight invisible with RTL layout.

This commit is contained in:
Peter Nelson
2023-01-21 18:02:39 +00:00
committed by rubidium42
parent 330a823c3b
commit 4b40e93197

View File

@@ -398,9 +398,8 @@ protected:
/* show highlighted item with a different colour */
if (highlight) {
Rect r = {name.left, y, info.right, y + (int)this->resize.step_height - 1};
Rect ir = r.Shrink(WidgetDimensions::scaled.bevel);
GfxFillRect(ir.left, ir.top, ir.right, ir.bottom, PC_GREY);
Rect r = {std::min(name.left, info.left), y, std::max(name.right, info.right), y + (int)this->resize.step_height - 1};
GfxFillRect(r.Shrink(WidgetDimensions::scaled.bevel), PC_GREY);
}
/* offsets to vertically centre text and icons */