1
0
Fork 0

Change: Use same padding as NewGRF parameters for AI/GS parameters lists. (#14118)

pull/14189/head
Peter Nelson 2025-05-01 22:36:53 +01:00 committed by GitHub
parent 5ca686261e
commit ae9646eb0a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

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

View File

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