From 9f248aac1385f77cf294fc7a6c9c7e4ac43306c5 Mon Sep 17 00:00:00 2001 From: Kazuhiro Fujieda Date: Thu, 9 Jul 2020 22:32:09 +0900 Subject: [PATCH] =?utf8?q?DPI=E3=81=AB=E5=BF=9C=E3=81=98=E3=81=A6=E6=AD=A3?= =?utf8?q?=E3=81=97=E3=81=8F=E3=82=B9=E3=82=B1=E3=83=BC=E3=83=AB=E3=81=97?= =?utf8?q?=E3=81=AA=E3=81=84=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/View/ControlsArranger.cs | 9 ++++++--- KancolleSniffer/View/MainWindow/QuestPanel.cs | 1 + KancolleSniffer/View/MainWindow/ShipPanels.cs | 7 +------ KancolleSniffer/View/ShipListPanel/GroupConfigLabels.cs | 2 +- KancolleSniffer/View/ShipListPanel/RepairListLabels.cs | 1 + KancolleSniffer/View/ShipListPanel/ShipListLabels.cs | 1 + 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/KancolleSniffer/View/ControlsArranger.cs b/KancolleSniffer/View/ControlsArranger.cs index 09f0919..58063c6 100644 --- a/KancolleSniffer/View/ControlsArranger.cs +++ b/KancolleSniffer/View/ControlsArranger.cs @@ -27,7 +27,6 @@ namespace KancolleSniffer.View public void Arrange(Control parent) { SetParent(parent); - Scale(); } public void Arrange(Control parent, Color color) @@ -45,7 +44,6 @@ namespace KancolleSniffer.View { parent.Controls.Add(BackPanel); BackPanel.BackColor = color; - Scaler.Scale(BackPanel); } private void SetParent(Control parent) @@ -53,8 +51,13 @@ namespace KancolleSniffer.View parent.Controls.AddRange(Controls); } - private void Scale() + public void Scale() { + if (BackPanel != null) + { + Scaler.Scale(BackPanel); + return; + } foreach (var control in Controls) Scaler.Scale(control); } diff --git a/KancolleSniffer/View/MainWindow/QuestPanel.cs b/KancolleSniffer/View/MainWindow/QuestPanel.cs index 8a7a80d..e012eb5 100644 --- a/KancolleSniffer/View/MainWindow/QuestPanel.cs +++ b/KancolleSniffer/View/MainWindow/QuestPanel.cs @@ -78,6 +78,7 @@ namespace KancolleSniffer.View.MainWindow } }; _labels[i].Arrange(this); + _labels[i].Scale(); } ResumeLayout(); SetupListScroller(); diff --git a/KancolleSniffer/View/MainWindow/ShipPanels.cs b/KancolleSniffer/View/MainWindow/ShipPanels.cs index 42d950b..f7740eb 100644 --- a/KancolleSniffer/View/MainWindow/ShipPanels.cs +++ b/KancolleSniffer/View/MainWindow/ShipPanels.cs @@ -49,11 +49,10 @@ namespace KancolleSniffer.View.MainWindow { _shipLines = new ShipLabelLines(ShipInfo.MemberCount, 16); _shipLines7 = new ShipLabelLines(7, 14); - parent.Controls.AddRange(new Control[]{_combined, _7Ships}); + parent.Controls.AddRange(new Control[] {_combined, _7Ships}); _shipLines.Create(parent, _hpToggle, onClick); _shipLines7.Create(_7Ships, _hpToggle, onClick); _combinedLines.Create(_combined, _hpToggle, onClick); - } public void ToggleHpPercent() @@ -139,7 +138,6 @@ namespace KancolleSniffer.View.MainWindow CreateHeader(parent, hpToggle); for (var i = 0; i < _shipLines.Length; i++) { - var y = Top + _lineHeight * (i + 1); var labels = _shipLines[i] = new ShipLabels { @@ -170,10 +168,7 @@ namespace KancolleSniffer.View.MainWindow }; parent.Controls.AddRange(headings); foreach (var control in headings) - { - Scaler.Scale(control); control.BackColor = CustomColors.ColumnColors.Bright; - } headings[0].Cursor = Cursors.Hand; hpToggle.SetClickHandler(headings[0]); } diff --git a/KancolleSniffer/View/ShipListPanel/GroupConfigLabels.cs b/KancolleSniffer/View/ShipListPanel/GroupConfigLabels.cs index a135c6c..d135517 100644 --- a/KancolleSniffer/View/ShipListPanel/GroupConfigLabels.cs +++ b/KancolleSniffer/View/ShipListPanel/GroupConfigLabels.cs @@ -64,7 +64,6 @@ namespace KancolleSniffer.View.ShipListPanel Size = new Size(12, 11), Tag = i * 10 + j }; - Scaler.Scale(cb[j]); cb[j].CheckedChanged += checkboxGroup_CheckedChanged; } SetAnchorRight(cb.Concat(new Control[] {labels.Level}).ToArray()); @@ -72,6 +71,7 @@ namespace KancolleSniffer.View.ShipListPanel _checkBoxesList.Add(cb); labels.Arrange(_shipListPanel, CustomColors.ColumnColors.BrightFirst(i)); labels.BackPanel.Controls.AddRange(cb); + labels.Scale(); } private void SetAnchorRight(params Control[] controls) diff --git a/KancolleSniffer/View/ShipListPanel/RepairListLabels.cs b/KancolleSniffer/View/ShipListPanel/RepairListLabels.cs index 810663a..92ef4fc 100644 --- a/KancolleSniffer/View/ShipListPanel/RepairListLabels.cs +++ b/KancolleSniffer/View/ShipListPanel/RepairListLabels.cs @@ -66,6 +66,7 @@ namespace KancolleSniffer.View.ShipListPanel SetAnchorRight(labels.Hp, labels.Level, labels.Time, labels.PerHp); _labelList.Add(labels); labels.Arrange(_shipListPanel, CustomColors.ColumnColors.BrightFirst(i)); + labels.Scale(); _shipListPanel.SetHpPercent(labels.Hp); } diff --git a/KancolleSniffer/View/ShipListPanel/ShipListLabels.cs b/KancolleSniffer/View/ShipListPanel/ShipListLabels.cs index 9fbd66b..8f1aa9b 100644 --- a/KancolleSniffer/View/ShipListPanel/ShipListLabels.cs +++ b/KancolleSniffer/View/ShipListPanel/ShipListLabels.cs @@ -51,6 +51,7 @@ namespace KancolleSniffer.View.ShipListPanel SetAnchorRight(labels.Hp, labels.Cond, labels.Level, labels.Exp); _labelList.Add(labels); labels.Arrange(_shipListPanel, CustomColors.ColumnColors.BrightFirst(i)); + labels.Scale(); _shipListPanel.SetHpPercent(labels.Hp); } -- 2.11.0