Skip to content

Commit

Permalink
Change: Use lowered not disabled widget for current tab. (#10252)
Browse files Browse the repository at this point in the history
While tab-buttons are not often used, all other similar occurences use
lowered rather than disabled widgets, so use them for train detail
window too.
  • Loading branch information
PeterN committed Dec 17, 2022
1 parent 7425660 commit 1eecbd3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/vehicle_gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2561,7 +2561,7 @@ struct VehicleDetailsWindow : Window {
const Vehicle *v = Vehicle::Get(this->window_number);

if (v->type == VEH_TRAIN) {
this->DisableWidget(this->tab + WID_VD_DETAILS_CARGO_CARRIED);
this->LowerWidget(this->tab + WID_VD_DETAILS_CARGO_CARRIED);
this->vscroll->SetCount(GetTrainDetailsWndVScroll(v->index, this->tab));
}

Expand Down Expand Up @@ -2605,7 +2605,7 @@ struct VehicleDetailsWindow : Window {
case WID_VD_DETAILS_TRAIN_VEHICLES:
case WID_VD_DETAILS_CAPACITY_OF_EACH:
case WID_VD_DETAILS_TOTAL_CARGO:
this->SetWidgetsDisabledState(false,
this->SetWidgetsLoweredState(false,
WID_VD_DETAILS_CARGO_CARRIED,
WID_VD_DETAILS_TRAIN_VEHICLES,
WID_VD_DETAILS_CAPACITY_OF_EACH,
Expand Down

0 comments on commit 1eecbd3

Please sign in to comment.