Changeset - r28251:f0fa727dcf7c
[Not reviewed]
master
0 1 0
Peter Nelson - 6 months ago 2023-12-07 16:09:45
peter1138@openttd.org
Codechange: Don't highlight unselectable dropdown item. (#11553)
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/widgets/dropdown.cpp
Show inline comments
 
@@ -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);
0 comments (0 inline, 0 general)