Changeset - r26998:3b543e103e8f
[Not reviewed]
master
0 1 0
Peter Nelson - 23 months ago 2023-01-21 18:02:39
peter1138@openttd.org
Fix: Network server highlight invisible with RTL layout.
1 file changed with 2 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/network/network_gui.cpp
Show inline comments
 
@@ -395,15 +395,14 @@ protected:
 
	{
 
		Rect name = this->GetWidget<NWidgetBase>(WID_NG_NAME)->GetCurrentRect();
 
		Rect info = this->GetWidget<NWidgetBase>(WID_NG_INFO)->GetCurrentRect();
 

	
 
		/* 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 */
 
		int text_y_offset = (this->resize.step_height - FONT_HEIGHT_NORMAL) / 2 + 1;
 
		int icon_y_offset = (this->resize.step_height - GetSpriteSize(SPR_BLOT).height) / 2;
 
		int lock_y_offset = (this->resize.step_height - GetSpriteSize(SPR_LOCK).height) / 2;
0 comments (0 inline, 0 general)