Apply workaround to datagridviews

This commit is contained in:
Magnus Norddahl 2020-09-12 02:06:14 +02:00
parent ccf2191f10
commit efec88994b
7 changed files with 15 additions and 0 deletions

View file

@ -83,6 +83,7 @@ namespace CodeImp.DoomBuilder.Controls
public FieldsEditorControl()
{
InitializeComponent();
CodeImp.DoomBuilder.General.ApplyDataGridViewFix(fieldslist);
autoinsertuserprefix = true;
enumscombo.Location = new Point(-1000, 1);
}

View file

@ -57,8 +57,17 @@ namespace CodeImp.DoomBuilder
listview.View = System.Windows.Forms.View.SmallIcon;
}
}
public static void ApplyDataGridViewFix(System.Windows.Forms.DataGridView gridview)
{
if (gridview.RowsDefaultCellStyle != null && gridview.RowsDefaultCellStyle.Padding != new System.Windows.Forms.Padding(0,0,0,0))
{
gridview.RowsDefaultCellStyle.Padding = new System.Windows.Forms.Padding(0,0,0,0);
}
}
#else
public static void ApplyMonoListViewFix(System.Windows.Forms.ListView listview) {}
public static void ApplyDataGridViewFix(System.Windows.Form.DataGridView gridview) {}
#endif
#if NO_WIN32

View file

@ -39,6 +39,7 @@ namespace CodeImp.DoomBuilder.Windows
public ErrorsForm()
{
InitializeComponent();
CodeImp.DoomBuilder.General.ApplyDataGridViewFix(grid);
FillList();
checkerrors.Start();

View file

@ -23,6 +23,7 @@ namespace CodeImp.DoomBuilder.Windows
public TagStatisticsForm()
{
InitializeComponent();
CodeImp.DoomBuilder.General.ApplyDataGridViewFix(dataGridView);
//apply window size and location
if(!size.IsEmpty && !location.IsEmpty)

View file

@ -18,6 +18,7 @@ namespace CodeImp.DoomBuilder.Windows
public ThingStatisticsForm()
{
InitializeComponent();
CodeImp.DoomBuilder.General.ApplyDataGridViewFix(dataGridView);
//apply window size and location
if(!size.IsEmpty && !location.IsEmpty)

View file

@ -19,6 +19,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
public FilterSelectedThingsForm(ICollection<Thing> selection, ThingsMode mode)
{
InitializeComponent();
CodeImp.DoomBuilder.General.ApplyDataGridViewFix(dataGridView);
this.mode = mode;
//apply window size and location

View file

@ -47,6 +47,7 @@ namespace CodeImp.DoomBuilder.CommentsPanel
public CommentsDocker()
{
InitializeComponent();
CodeImp.DoomBuilder.General.ApplyDataGridViewFix(grid);
filtermode.Checked = General.Settings.ReadPluginSetting("filtermode", false);
clickselects.Checked = General.Settings.ReadPluginSetting("clickselects", false);