From 69ab19f109e40e7d26ae3f6e06c85b8dd8163425 Mon Sep 17 00:00:00 2001 From: Adrian Garcia Date: Sat, 4 Apr 2015 12:21:16 +0200 Subject: [PATCH] Version bumped to v1.1.1. Exex color is now properly shown in picker when the 'invert' checkbox is set --- DissDlcToolkit/Forms/MainFormExexUserControl.cs | 13 +++++++------ DissDlcToolkit/Properties/AssemblyInfo.cs | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/DissDlcToolkit/Forms/MainFormExexUserControl.cs b/DissDlcToolkit/Forms/MainFormExexUserControl.cs index 8971143..00e48ff 100644 --- a/DissDlcToolkit/Forms/MainFormExexUserControl.cs +++ b/DissDlcToolkit/Forms/MainFormExexUserControl.cs @@ -163,7 +163,7 @@ private void selectColorAndUpdate(Label label, TextBox textBox, bool invertColor { if (labelBoxesEnabled) { - Color backColor = openColorDialog(label.BackColor, invertColor); + Color backColor = openColorDialog(label.BackColor); updateColorData(backColor, label, textBox, invertColor, applyAlpha); } } @@ -171,25 +171,26 @@ private void selectColorAndUpdate(Label label, TextBox textBox, bool invertColor private void updateColorData(Color backColor, Label colorLabel, TextBox colorTextBox, Boolean invert, Boolean applyAlpha) { - Color colorToApply = invert ? MiscUtils.invertColor(backColor) : backColor; + Color colorToApply = backColor; if (!applyAlpha) { colorToApply = Color.FromArgb(0xFF, colorToApply.R, colorToApply.G, colorToApply.B); } + colorLabel.BackColor = colorToApply; - colorTextBox.Text = applyAlpha ? MiscUtils.argbToString(backColor) : MiscUtils.rgbToString(backColor); + Color colorToShowInTextBox = invert ? MiscUtils.invertColor(backColor) : backColor; + colorTextBox.Text = applyAlpha ? MiscUtils.argbToString(colorToShowInTextBox) : MiscUtils.rgbToString(colorToShowInTextBox); } - private Color openColorDialog(Color currentColor, Boolean invertColor) + private Color openColorDialog(Color currentColor) { ArgbColorDialog dialog = new ArgbColorDialog(); // Sets the initial color select to the current text color. - dialog.Color = invertColor ? MiscUtils.invertColor(currentColor) : currentColor; + dialog.Color = currentColor; dialog.ShowDialog(); // Update the text box color return dialog.Color; - } private void populateFields(ExexTable table) diff --git a/DissDlcToolkit/Properties/AssemblyInfo.cs b/DissDlcToolkit/Properties/AssemblyInfo.cs index 2063d19..e8544f0 100644 --- a/DissDlcToolkit/Properties/AssemblyInfo.cs +++ b/DissDlcToolkit/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // Puede especificar todos los valores o establecer como predeterminados los números de compilación y de revisión // mediante el carácter '*', como se muestra a continuación: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.1.0")] -[assembly: AssemblyFileVersion("1.1.0")] +[assembly: AssemblyVersion("1.1.1")] +[assembly: AssemblyFileVersion("1.1.1")]