mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-23 04:12:12 +00:00
Add workaround for broken View.List implementation in mono's winforms
This commit is contained in:
parent
800090d5b3
commit
ccf2191f10
8 changed files with 27 additions and 8 deletions
|
@ -42,7 +42,7 @@
|
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>..\..\Build\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE;NO_SCINTILLA;NO_FORMS_DESIGN;NO_WIN32;NO_UPDATER;NO_DEVIL</DefineConstants>
|
||||
<DefineConstants>DEBUG;TRACE;NO_SCINTILLA;NO_FORMS_DESIGN;NO_WIN32;NO_UPDATER;MONO_WINFORMS</DefineConstants>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
|
@ -63,7 +63,7 @@
|
|||
<ErrorReport>prompt</ErrorReport>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DefineConstants>NO_SCINTILLA;NO_FORMS_DESIGN;NO_WIN32;NO_UPDATER;NO_DEVIL</DefineConstants>
|
||||
<DefineConstants>NO_SCINTILLA;NO_FORMS_DESIGN;NO_WIN32;NO_UPDATER;MONO_WINFORMS</DefineConstants>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<NoWarn>1591</NoWarn>
|
||||
|
@ -72,7 +72,7 @@
|
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug + Profiler|x86' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>..\..\Build\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE;PROFILE;NO_SCINTILLA;NO_FORMS_DESIGN;NO_WIN32;NO_UPDATER;NO_DEVIL</DefineConstants>
|
||||
<DefineConstants>DEBUG;TRACE;PROFILE;NO_SCINTILLA;NO_FORMS_DESIGN;NO_WIN32;NO_UPDATER;MONO_WINFORMS</DefineConstants>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
|
@ -94,7 +94,7 @@
|
|||
<PlatformTarget>x86</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<DefineConstants>TRACE;PROFILE;NO_SCINTILLA;NO_FORMS_DESIGN;NO_WIN32;NO_UPDATER;NO_DEVIL</DefineConstants>
|
||||
<DefineConstants>TRACE;PROFILE;NO_SCINTILLA;NO_FORMS_DESIGN;NO_WIN32;NO_UPDATER;MONO_WINFORMS</DefineConstants>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
|
@ -104,7 +104,7 @@
|
|||
</DocumentationFile>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<DefineConstants>TRACE;DEBUG;NO_SCINTILLA;NO_FORMS_DESIGN;NO_WIN32;NO_UPDATER;NO_DEVIL</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;NO_SCINTILLA;NO_FORMS_DESIGN;NO_WIN32;NO_UPDATER;MONO_WINFORMS</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
|
@ -112,14 +112,14 @@
|
|||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<Optimize>true</Optimize>
|
||||
<DefineConstants>TRACE;NO_SCINTILLA;NO_FORMS_DESIGN;NO_WIN32;NO_UPDATER;NO_DEVIL</DefineConstants>
|
||||
<DefineConstants>TRACE;NO_SCINTILLA;NO_FORMS_DESIGN;NO_WIN32;NO_UPDATER;MONO_WINFORMS</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug + Profiler|x64'">
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<OutputPath>..\..\Build\</OutputPath>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<DefineConstants>TRACE;DEBUG;PROFILE;NO_SCINTILLA;NO_FORMS_DESIGN;NO_WIN32;NO_UPDATER;NO_DEVIL</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;PROFILE;NO_SCINTILLA;NO_FORMS_DESIGN;NO_WIN32;NO_UPDATER;MONO_WINFORMS</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release + Profiler|x64'">
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
|
|
|
@ -42,6 +42,7 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
{
|
||||
// Initialize
|
||||
InitializeComponent();
|
||||
CodeImp.DoomBuilder.General.ApplyMonoListViewFix(flags);
|
||||
|
||||
// Hide stuff when in Doom format
|
||||
hexenformatwidth = infopanel.Width;
|
||||
|
|
|
@ -42,6 +42,7 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
{
|
||||
// Initialize
|
||||
InitializeComponent();
|
||||
CodeImp.DoomBuilder.General.ApplyMonoListViewFix(flags);
|
||||
|
||||
//mxd
|
||||
labelFloorTextureSize.BackColor = Color.FromArgb(128, labelFloorTextureSize.BackColor);
|
||||
|
|
|
@ -42,6 +42,7 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
{
|
||||
// Initialize
|
||||
InitializeComponent();
|
||||
CodeImp.DoomBuilder.General.ApplyMonoListViewFix(flags);
|
||||
|
||||
// Hide stuff when in Doom format
|
||||
hexenformatwidth = infopanel.Width;
|
||||
|
|
|
@ -47,7 +47,19 @@ namespace CodeImp.DoomBuilder
|
|||
{
|
||||
public static class General
|
||||
{
|
||||
#region ================== API Declarations
|
||||
#region ================== API Declarations and Mono compatibility
|
||||
|
||||
#if MONO_WINFORMS
|
||||
public static void ApplyMonoListViewFix(System.Windows.Forms.ListView listview)
|
||||
{
|
||||
if (listview.View == System.Windows.Forms.View.List)
|
||||
{
|
||||
listview.View = System.Windows.Forms.View.SmallIcon;
|
||||
}
|
||||
}
|
||||
#else
|
||||
public static void ApplyMonoListViewFix(System.Windows.Forms.ListView listview) {}
|
||||
#endif
|
||||
|
||||
#if NO_WIN32
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
public ChangeMapForm(string filepathname, MapOptions options)
|
||||
{
|
||||
InitializeComponent();
|
||||
CodeImp.DoomBuilder.General.ApplyMonoListViewFix(mapslist);
|
||||
this.options = options;
|
||||
this.filepathname = filepathname;
|
||||
}
|
||||
|
|
|
@ -52,6 +52,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
|
||||
// Initialize
|
||||
InitializeComponent();
|
||||
CodeImp.DoomBuilder.General.ApplyMonoListViewFix(listtextures);
|
||||
|
||||
// Make list column header full width
|
||||
columnname.Width = listconfigs.ClientRectangle.Width - SystemInformation.VerticalScrollBarWidth - 2;
|
||||
|
|
|
@ -48,6 +48,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
{
|
||||
// Initialize
|
||||
InitializeComponent();
|
||||
CodeImp.DoomBuilder.General.ApplyMonoListViewFix(mapslist);
|
||||
this.Text = "Open Map from " + Path.GetFileName(filepathname);
|
||||
this.filepathname = filepathname;
|
||||
datalocations.StartPath = filepathname; //mxd
|
||||
|
@ -59,6 +60,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
{
|
||||
// Initialize
|
||||
InitializeComponent();
|
||||
CodeImp.DoomBuilder.General.ApplyMonoListViewFix(mapslist);
|
||||
this.Text = "Open Map from " + Path.GetFileName(filepathname);
|
||||
this.filepathname = filepathname;
|
||||
this.options = options;
|
||||
|
|
Loading…
Reference in a new issue