OSDN Git Service

今までズームしなかった要素にズームを適用する
authorKazuhiro Fujieda <fujieda@users.osdn.me>
Tue, 12 Dec 2017 11:40:10 +0000 (20:40 +0900)
committerKazuhiro Fujieda <fujieda@users.osdn.me>
Tue, 12 Dec 2017 13:29:18 +0000 (22:29 +0900)
KancolleSniffer/ErrorDialog.cs
KancolleSniffer/MainForm.cs

index 73a4a55..c485af1 100644 (file)
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and\r
 // limitations under the License.\r
 \r
+using System;\r
 using System.Drawing;\r
 using System.Windows.Forms;\r
 \r
@@ -35,5 +36,11 @@ namespace KancolleSniffer
             textBoxDetails.Text = details;\r
             return ShowDialog(owner);\r
         }\r
+\r
+        protected override void OnFontChanged(EventArgs e)\r
+        {\r
+            base.OnFontChanged(e);\r
+            textBoxDetails.Font = new Font(new FontFamily("MS Gothic"), Font.Size);\r
+        }\r
     }\r
 }
\ No newline at end of file
index a3c0f9e..879ce26 100644 (file)
@@ -309,8 +309,14 @@ namespace KancolleSniffer
             if (_config.Zoom == 100)\r
                 return;\r
             var prev = CurrentAutoScaleDimensions;\r
-            foreach (var control in new Control[] {this, _listForm, labelLogin, linkLabelGuide})\r
+            foreach (var control in new Control[]\r
+            {\r
+                this, _listForm, labelLogin, linkLabelGuide,\r
+                _configDialog, contextMenuStripMain, _errorDialog\r
+            })\r
+            {\r
                 control.Font = new Font(control.Font.FontFamily, control.Font.Size * _config.Zoom / 100);\r
+            }\r
             ShipLabel.LatinFont = new Font("Tahoma", 8f * _config.Zoom / 100);\r
             var cur = CurrentAutoScaleDimensions;\r
             ShipLabel.ScaleFactor = new SizeF(ShipLabel.ScaleFactor.Width * cur.Width / prev.Width,\r