Try to fix color picker issue - thx Siamak :)

This commit is contained in:
Nikolaj Olsson 2024-10-12 14:54:28 +02:00
parent 7c9c32c5dc
commit a396e61fda

View File

@ -196,6 +196,7 @@ namespace Nikse.SubtitleEdit.Forms
return;
}
ActiveControl = null;
_changeType = ChangeStyle.MouseMove;
_selectedPoint = new Point(e.X, e.Y);
Invalidate();
@ -497,6 +498,7 @@ namespace Nikse.SubtitleEdit.Forms
this._pnlBrightness.Size = new System.Drawing.Size(24, 216);
this._pnlBrightness.TabIndex = 39;
this._pnlBrightness.Visible = false;
this._pnlBrightness.MouseClick += new System.Windows.Forms.MouseEventHandler(this._pnlBrightness_MouseClick);
//
// _lblAlpha2
//
@ -1035,6 +1037,7 @@ namespace Nikse.SubtitleEdit.Forms
private void PanelColorClick(Control panel)
{
panel.Focus();
var c = panel.BackColor;
UpdateRgb($"{c.R:x2}{c.G:x2}{c.B:x2}{c.A:x2}");
_tbHexCode.TextChanged -= TextBoxHexCodeTextChanged;
@ -1056,25 +1059,21 @@ namespace Nikse.SubtitleEdit.Forms
private void panelC2_MouseClick(object sender, MouseEventArgs e)
{
PanelColorClick(_panelC2);
}
private void panelC3_MouseClick(object sender, MouseEventArgs e)
{
PanelColorClick(_panelC3);
}
private void panelC4_MouseClick(object sender, MouseEventArgs e)
{
PanelColorClick(_panelC4);
}
private void panelC5_MouseClick(object sender, MouseEventArgs e)
{
PanelColorClick(_panelC5);
}
private void panelC6_MouseClick(object sender, MouseEventArgs e)
@ -1104,5 +1103,10 @@ namespace Nikse.SubtitleEdit.Forms
{
_tbHexCode.MaxLength = _showAlpha ? 9 : 7;
}
private void _pnlBrightness_MouseClick(object sender, MouseEventArgs e)
{
}
}
}