Skip to content

Commit 1ddbad7

Browse files
committed
dark mode color fix. Auto text outline color button
1 parent 913efbe commit 1ddbad7

2 files changed

Lines changed: 39 additions & 10 deletions

File tree

ARKBreedingStats/settings/Settings.Designer.cs

Lines changed: 29 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ARKBreedingStats/settings/Settings.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ private void InitializeData()
176176
_tt.SetToolTip(CbExportFileRenameAfterImport, "Use a pattern to create the new file name, a subset of the keywords and functions from the naming pattern work.");
177177
_tt.SetToolTip(CbHighlightAdjustedMultipliers, "Highlight multipliers that are set to non-official values.\nDoes not update on multiplier change, this button needs to be rechecked then.\nCan be used to share screenshots of these settings.");
178178
_tt.SetToolTip(LbLanguage2, "Here you can specify a different language for exported data, e.g. the info graphics.");
179+
_tt.SetToolTip(BtInfoGraphicColorTextOutlineAuto, "Set outline color automatically based on the text color");
179180

180181
// localizations / translations
181182
// for a new translation
@@ -1822,6 +1823,15 @@ private void BtInfoGraphicBackgroundImagePath_Click(object sender, EventArgs e)
18221823
}
18231824
}
18241825

1826+
private void BtInfoGraphicColorTextOutlineAuto_Click(object sender, EventArgs e)
1827+
{
1828+
var dark = Utils.ForeColor(BtInfoGraphicForeColor.BackColor).R < 100;
1829+
var outlineColor = Utils.AdjustColorLight(BtInfoGraphicForeColor.BackColor, dark ? -.8 : .8);
1830+
BtInfoGraphicTextOutlineColor.SetBackColorAndAccordingForeColor(outlineColor);
1831+
if (NudInfoGraphicTextOutlineWidth.Value == 0) NudInfoGraphicTextOutlineWidth.Value = 1;
1832+
else ShowInfoGraphicPreview();
1833+
}
1834+
18251835
private void BtInfoGraphicClearBgImg_Click(object sender, EventArgs e) => InfoGraphicBackgroundImagePath = null;
18261836

18271837
private string _infoGraphicBackgroundImagePath;

0 commit comments

Comments
 (0)