1
0
Fork 0

Change: Use same padding as NewGRF parameters for AI/GS parameters lists.

pull/14118/head
Peter Nelson 2025-04-26 19:21:22 +01:00
parent be39a05327
commit 1be49da388
No known key found for this signature in database
GPG Key ID: 8EF8F0A467DF75ED
2 changed files with 4 additions and 4 deletions

View File

@ -179,7 +179,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);
@ -267,7 +267,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

@ -359,7 +359,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);
@ -419,7 +419,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;