diff --git a/Source/Core/BuilderMono.csproj b/Source/Core/BuilderMono.csproj index 9462055f9b762962d1bce9a3aed53a4d8bad7fb0..c2c3c0b2c494f8efa8e66223cfbb1c8079aba1c0 100644 --- a/Source/Core/BuilderMono.csproj +++ b/Source/Core/BuilderMono.csproj @@ -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> diff --git a/Source/Core/Controls/LinedefInfoPanel.cs b/Source/Core/Controls/LinedefInfoPanel.cs index df302b8499b0ac392ae2bbe17248bc8e33f2e1d5..77d63a03dc18825d421a0c6cadad5d32873dbe58 100755 --- a/Source/Core/Controls/LinedefInfoPanel.cs +++ b/Source/Core/Controls/LinedefInfoPanel.cs @@ -42,6 +42,7 @@ namespace CodeImp.DoomBuilder.Controls { // Initialize InitializeComponent(); + CodeImp.DoomBuilder.General.ApplyMonoListViewFix(flags); // Hide stuff when in Doom format hexenformatwidth = infopanel.Width; diff --git a/Source/Core/Controls/SectorInfoPanel.cs b/Source/Core/Controls/SectorInfoPanel.cs index 588fa0634c957b7520354f402f780fde149395d4..e7f089046ddc793cbdf430aa4a542a15d1832e17 100755 --- a/Source/Core/Controls/SectorInfoPanel.cs +++ b/Source/Core/Controls/SectorInfoPanel.cs @@ -42,6 +42,7 @@ namespace CodeImp.DoomBuilder.Controls { // Initialize InitializeComponent(); + CodeImp.DoomBuilder.General.ApplyMonoListViewFix(flags); //mxd labelFloorTextureSize.BackColor = Color.FromArgb(128, labelFloorTextureSize.BackColor); diff --git a/Source/Core/Controls/ThingInfoPanel.cs b/Source/Core/Controls/ThingInfoPanel.cs index 4ab27d6a9c0f2eca2e2a45bf72f1b6219bc9d133..200f2add6f5aad4f7a904d2143b444ba13ba0d8d 100755 --- a/Source/Core/Controls/ThingInfoPanel.cs +++ b/Source/Core/Controls/ThingInfoPanel.cs @@ -42,6 +42,7 @@ namespace CodeImp.DoomBuilder.Controls { // Initialize InitializeComponent(); + CodeImp.DoomBuilder.General.ApplyMonoListViewFix(flags); // Hide stuff when in Doom format hexenformatwidth = infopanel.Width; diff --git a/Source/Core/General/General.cs b/Source/Core/General/General.cs index 23ed3f0b511b2ccf6ecee984018bd2d0acf0d5be..df5126201a8d825ac703971366c76592f35e70b3 100755 --- a/Source/Core/General/General.cs +++ b/Source/Core/General/General.cs @@ -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 diff --git a/Source/Core/Windows/ChangeMapForm.cs b/Source/Core/Windows/ChangeMapForm.cs index 3623fbe8367f984ce8acb8ff53eecbcaca59e160..8b5e276c1c238b6e76e2ff15471904ad180cb16a 100755 --- a/Source/Core/Windows/ChangeMapForm.cs +++ b/Source/Core/Windows/ChangeMapForm.cs @@ -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; } diff --git a/Source/Core/Windows/ConfigForm.cs b/Source/Core/Windows/ConfigForm.cs index 651901747054bdeb41ccbfdf0eb074064cc48483..7ea77848621bad8c2085d55890fbf262b618ecd6 100755 --- a/Source/Core/Windows/ConfigForm.cs +++ b/Source/Core/Windows/ConfigForm.cs @@ -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; diff --git a/Source/Core/Windows/OpenMapOptionsForm.cs b/Source/Core/Windows/OpenMapOptionsForm.cs index ed0bf6eae4a5a3362902dd52a5dce32ff1548ee7..766ba853bab54b1f871228276fd43e634bb6dd8f 100755 --- a/Source/Core/Windows/OpenMapOptionsForm.cs +++ b/Source/Core/Windows/OpenMapOptionsForm.cs @@ -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;