From 8ebed190120b2bde1b2d919881aa72146330ed01 Mon Sep 17 00:00:00 2001 From: somewhatlurker <52014015+somewhatlurker@users.noreply.github.com> Date: Mon, 5 Aug 2019 07:17:59 +1000 Subject: [PATCH] minor cleanup in launcher --- source-code/source/plugins/Launcher/ConfigOption.h | 4 +++- source-code/source/plugins/Launcher/SkinnedMessageBox.h | 9 ++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/source-code/source/plugins/Launcher/ConfigOption.h b/source-code/source/plugins/Launcher/ConfigOption.h index 1df05dd..7a49528 100644 --- a/source-code/source/plugins/Launcher/ConfigOption.h +++ b/source-code/source/plugins/Launcher/ConfigOption.h @@ -230,7 +230,9 @@ public: cb->Top = top; cb->AutoSize = true; cb->FlatStyle = System::Windows::Forms::FlatStyle::Flat; - cb->BackColor = System::Drawing::Color::FromArgb(static_cast(static_cast(0)), static_cast(static_cast(0)), static_cast(static_cast(0)), static_cast(static_cast(0))); + + // hack to ensure high contrast + cb->BackColor = System::Drawing::Color::FromArgb(0, 0, 0, 0); Form^ RootForm = panel->FindForm(); Drawing::SizeF CurrentScaleSize = RootForm->CurrentAutoScaleDimensions; diff --git a/source-code/source/plugins/Launcher/SkinnedMessageBox.h b/source-code/source/plugins/Launcher/SkinnedMessageBox.h index aeb24d4..2e9a5b6 100644 --- a/source-code/source/plugins/Launcher/SkinnedMessageBox.h +++ b/source-code/source/plugins/Launcher/SkinnedMessageBox.h @@ -245,6 +245,9 @@ private: ref class SkinnedMessageBoxForm : Form iconPB->Top = 10 * ScaleHeight; iconPB->Left = 10 * ScaleWidth; iconPB->AccessibleName = "Icon"; + iconPB->SizeMode = PictureBoxSizeMode::Zoom; + + System::Resources::ResourceManager^ ResMgr = gcnew System::Resources::ResourceManager("Launcher.SkinnedMessageBox", SkinnedMessageBox::typeid->Assembly); // there are many duplicated values: // https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.messageboxicon?view=netframework-4.7.2 @@ -266,14 +269,10 @@ private: ref class SkinnedMessageBoxForm : Form } else if (icon == MessageBoxIcon::Warning) // also Exclamation { - //Drawing::Icon^ warnicon = gcnew Drawing::Icon(SystemIcons::Warning, iconsize, iconsize); - //iconPB->Image = warnicon->ToBitmap(); - System::Resources::ResourceManager^ ResMgr = gcnew System::Resources::ResourceManager("Launcher.SkinnedMessageBox", SkinnedMessageBox::typeid->Assembly); - iconPB->SizeMode = PictureBoxSizeMode::Zoom; iconPB->Image = (Image^)(ResMgr->GetObject("PokeSnarf4xd")); iconPB->AccessibleDescription = "Warning"; //this.Icon = SystemIcons.Warning; - textpadding -= 2 * ScaleWidth; // triangle shape looks worse without this + //textpadding -= 2 * ScaleWidth; // triangle shape looks worse without this System::Media::SystemSounds::Exclamation->Play(); } else if (icon == MessageBoxIcon::Information) // also Asterisk