1
0
Fork 0

Codechange: Don't highlight unselectable dropdown item. (#11553)

pull/11557/head
Peter Nelson 2023-12-07 16:09:45 +00:00 committed by GitHub
parent 90e386acaa
commit 89461b5561
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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);