From b6609d1833a4b85d5506b790964c712f7dc8e257 Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Sat, 21 Jan 2023 18:02:39 +0000 Subject: [PATCH] Fix: Network server highlight invisible with RTL layout. --- src/network/network_gui.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp index da89de8c25..40f1bb64e6 100644 --- a/src/network/network_gui.cpp +++ b/src/network/network_gui.cpp @@ -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 */