mirror of https://github.com/OpenTTD/OpenTTD
Change: Use same padding as NewGRF parameters for AI/GS parameters lists. (#14118)
parent
5ca686261e
commit
ae9646eb0a
|
@ -180,7 +180,7 @@ struct GSConfigWindow : public Window {
|
|||
break;
|
||||
}
|
||||
case WID_GSC_SETTINGS: {
|
||||
Rect ir = r.Shrink(WidgetDimensions::scaled.framerect);
|
||||
Rect ir = r.Shrink(WidgetDimensions::scaled.frametext, RectPadding::zero);
|
||||
bool rtl = _current_text_dir == TD_RTL;
|
||||
Rect br = ir.WithWidth(SETTING_BUTTON_WIDTH, rtl);
|
||||
Rect tr = ir.Indent(SETTING_BUTTON_WIDTH + WidgetDimensions::scaled.hsep_wide, rtl);
|
||||
|
@ -268,7 +268,7 @@ struct GSConfigWindow : public Window {
|
|||
|
||||
bool bool_item = config_item.flags.Test(ScriptConfigFlag::Boolean);
|
||||
|
||||
Rect r = this->GetWidget<NWidgetBase>(widget)->GetCurrentRect().Shrink(WidgetDimensions::scaled.matrix, RectPadding::zero);
|
||||
Rect r = this->GetWidget<NWidgetBase>(widget)->GetCurrentRect().Shrink(WidgetDimensions::scaled.frametext, RectPadding::zero);
|
||||
int x = pt.x - r.left;
|
||||
if (_current_text_dir == TD_RTL) x = r.Width() - 1 - x;
|
||||
|
||||
|
|
|
@ -360,7 +360,7 @@ struct ScriptSettingsWindow : public Window {
|
|||
{
|
||||
if (widget != WID_SCRS_BACKGROUND) return;
|
||||
|
||||
Rect ir = r.Shrink(WidgetDimensions::scaled.framerect);
|
||||
Rect ir = r.Shrink(WidgetDimensions::scaled.frametext, RectPadding::zero);
|
||||
bool rtl = _current_text_dir == TD_RTL;
|
||||
Rect br = ir.WithWidth(SETTING_BUTTON_WIDTH, rtl);
|
||||
Rect tr = ir.Indent(SETTING_BUTTON_WIDTH + WidgetDimensions::scaled.hsep_wide, rtl);
|
||||
|
@ -420,7 +420,7 @@ struct ScriptSettingsWindow : public Window {
|
|||
|
||||
bool bool_item = config_item.flags.Test(ScriptConfigFlag::Boolean);
|
||||
|
||||
Rect r = this->GetWidget<NWidgetBase>(widget)->GetCurrentRect().Shrink(WidgetDimensions::scaled.matrix, RectPadding::zero);
|
||||
Rect r = this->GetWidget<NWidgetBase>(widget)->GetCurrentRect().Shrink(WidgetDimensions::scaled.frametext, RectPadding::zero);
|
||||
int x = pt.x - r.left;
|
||||
if (_current_text_dir == TD_RTL) x = r.Width() - 1 - x;
|
||||
|
||||
|
|
Loading…
Reference in New Issue