OSDN Git Service

AppliStation-GUI,XP以前のシールドアイコンの処理についてシールド不要時にも表示されていた不具合を修正
authorttp <ttp@users.sourceforge.jp>
Tue, 27 Oct 2009 17:16:23 +0000 (02:16 +0900)
committerttp <ttp@users.sourceforge.jp>
Tue, 27 Oct 2009 17:16:23 +0000 (02:16 +0900)
AppliStation/AppliStation.Util/NativeMethods.cs

index 9bf00f2..5d46eb6 100644 (file)
@@ -370,9 +370,13 @@ namespace AppliStation.Util
                                }\r
                                \r
                                button.TextImageRelation = TextImageRelation.ImageBeforeText;\r
-                               button.ImageAlign = ContentAlignment.MiddleLeft;\r
-                               using (Icon ico = new Icon(SystemIcons.Shield, 16, 16)) {\r
-                                       button.Image = ico.ToBitmap();\r
+                               if (required) {\r
+                                       button.ImageAlign = ContentAlignment.MiddleLeft;\r
+                                       using (Icon ico = new Icon(SystemIcons.Shield, 16, 16)) {\r
+                                               button.Image = ico.ToBitmap();\r
+                                       }\r
+                               } else {\r
+                                       button.Image = null;\r
                                }\r
                                button.AutoSize = true;\r
                        }\r