From aa02dd3c43b9a46e0963bcd14990464fced045b5 Mon Sep 17 00:00:00 2001 From: Kazuhiro Fujieda Date: Tue, 23 Jan 2018 21:36:05 +0900 Subject: [PATCH] =?utf8?q?=E3=82=B9=E3=82=AF=E3=83=AD=E3=83=BC=E3=83=AB?= =?utf8?q?=E3=83=90=E3=83=BC=E3=81=AE=E8=A1=A8=E7=A4=BA=E6=99=82=E3=81=AB?= =?utf8?q?=E6=88=A6=E6=B3=81=E3=81=AE=E6=A8=AA=E5=B9=85=E3=81=8C=E5=BA=83?= =?utf8?q?=E3=81=99=E3=81=8E=E3=82=8B=E3=81=AE=E3=82=92=E7=9B=B4=E3=81=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- KancolleSniffer/BattleResultPanel.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/KancolleSniffer/BattleResultPanel.cs b/KancolleSniffer/BattleResultPanel.cs index 70a0168..1ddb848 100644 --- a/KancolleSniffer/BattleResultPanel.cs +++ b/KancolleSniffer/BattleResultPanel.cs @@ -216,12 +216,9 @@ namespace KancolleSniffer _enemyLabels[i][1].SetName(""); } var lines = Max(friendLines, enemyLines); - var labelWidth = _enemyLabels.Max(labels => labels[1].Size.Width); for (var i = 0; i < lines; i++) { var panel = _panelList[i]; - _panelList[i].Width = Max(ClientSize.Width, - (int)Round(164 * ShipLabel.ScaleFactor.Width) + labelWidth - 1); if (panel.Visible) continue; panel.Location = new Point(AutoScrollPosition.X, @@ -230,9 +227,13 @@ namespace KancolleSniffer } for (var i = lines; i < _panelList.Count; i++) _panelList[i].Visible = false; + ResumeLayout(); // スクロールバーの有無を決定する + var panelWidth = Max(ClientSize.Width, // スクロールバーの有無を反映した横幅 + _enemyLabels[0][1].Location.X + _enemyLabels.Max(labels => labels[1].Size.Width) - 1); // 敵の名前の右端 + for (var i = 0; i < lines; i++) + _panelList[i].Width = panelWidth; _infomationPanel.Location = new Point(AutoScrollPosition.X, 2 + AutoScrollPosition.Y); _infomationPanel.Visible = true; - ResumeLayout(); } private string ShortenName(string name) -- 2.11.0