From: ttp Date: Tue, 27 Oct 2009 17:16:23 +0000 (+0900) Subject: AppliStation-GUI,XP以前のシールドアイコンの処理についてシールド不要時にも表示されていた不具合を修正 X-Git-Tag: v1.3.2b1~31 X-Git-Url: http://git.osdn.net/view?p=applistation%2FAppliStation.git;a=commitdiff_plain;h=f6279d8d25038da0fdc32d6a32b11c47d10b4301 AppliStation-GUI,XP以前のシールドアイコンの処理についてシールド不要時にも表示されていた不具合を修正 --- diff --git a/AppliStation/AppliStation.Util/NativeMethods.cs b/AppliStation/AppliStation.Util/NativeMethods.cs index 9bf00f2..5d46eb6 100644 --- a/AppliStation/AppliStation.Util/NativeMethods.cs +++ b/AppliStation/AppliStation.Util/NativeMethods.cs @@ -370,9 +370,13 @@ namespace AppliStation.Util } button.TextImageRelation = TextImageRelation.ImageBeforeText; - button.ImageAlign = ContentAlignment.MiddleLeft; - using (Icon ico = new Icon(SystemIcons.Shield, 16, 16)) { - button.Image = ico.ToBitmap(); + if (required) { + button.ImageAlign = ContentAlignment.MiddleLeft; + using (Icon ico = new Icon(SystemIcons.Shield, 16, 16)) { + button.Image = ico.ToBitmap(); + } + } else { + button.Image = null; } button.AutoSize = true; }