From 89461b5561a2df2ac0d561c545df8bdee7a55053 Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Thu, 7 Dec 2023 16:09:45 +0000 Subject: [PATCH] Codechange: Don't highlight unselectable dropdown item. (#11553) --- src/widgets/dropdown.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/dropdown.cpp b/src/widgets/dropdown.cpp index 9ad87c0a84..ba898ff715 100644 --- a/src/widgets/dropdown.cpp +++ b/src/widgets/dropdown.cpp @@ -182,7 +182,7 @@ struct DropdownWindow : Window { if (y + item_height - 1 <= ir.bottom) { Rect full{ir.left, y, ir.right, y + item_height - 1}; - bool selected = (this->selected_index == item->result); + bool selected = (this->selected_index == item->result) && item->Selectable(); if (selected) GfxFillRect(full, PC_BLACK); item->Draw(full, full.Shrink(WidgetDimensions::scaled.dropdowntext, RectPadding::zero), selected, colour);