diff --git a/ShareX.HelpersLib/Controls/BlackStyle/BlackStyleCheckBox.cs b/ShareX.HelpersLib/Controls/BlackStyle/BlackStyleCheckBox.cs
index 3362945e6..de2e1f858 100644
--- a/ShareX.HelpersLib/Controls/BlackStyle/BlackStyleCheckBox.cs
+++ b/ShareX.HelpersLib/Controls/BlackStyle/BlackStyleCheckBox.cs
@@ -78,7 +78,7 @@ public override string Text
public int SpaceAfterCheckBox { get; set; }
- private bool isChecked;
+ private bool isChecked, isHover;
private string text;
private LinearGradientBrush backgroundBrush, backgroundCheckedBrush, innerBorderBrush, innerBorderCheckedBrush;
@@ -135,28 +135,18 @@ protected override void OnPaint(PaintEventArgs pe)
}
}
- private void DrawBackground(Graphics g)
+ protected override void OnMouseEnter(EventArgs e)
{
- if (Checked)
- {
- g.FillRectangle(backgroundCheckedBrush, new Rectangle(2, 2, checkBoxSize - 4, checkBoxSize - 4));
- g.DrawRectangle(innerBorderCheckedPen, new Rectangle(1, 1, checkBoxSize - 3, checkBoxSize - 3));
- }
- else
- {
- g.FillRectangle(backgroundBrush, new Rectangle(2, 2, checkBoxSize - 4, checkBoxSize - 4));
- g.DrawRectangle(innerBorderPen, new Rectangle(1, 1, checkBoxSize - 3, checkBoxSize - 3));
- }
-
- g.DrawRectangle(borderPen, new Rectangle(0, 0, checkBoxSize - 1, checkBoxSize - 1));
+ base.OnMouseEnter(e);
+ isHover = true;
+ Refresh();
}
- private void DrawText(Graphics g)
+ protected override void OnMouseLeave(EventArgs e)
{
- Rectangle rect = new Rectangle(checkBoxSize + SpaceAfterCheckBox, 0, ClientRectangle.Width - checkBoxSize + SpaceAfterCheckBox, ClientRectangle.Height);
- TextFormatFlags tff = TextFormatFlags.Left | TextFormatFlags.Top;
- TextRenderer.DrawText(g, Text, Font, new Rectangle(rect.X, rect.Y + 1, rect.Width, rect.Height + 1), Color.Black, tff);
- TextRenderer.DrawText(g, Text, Font, rect, ForeColor, tff);
+ base.OnMouseLeave(e);
+ isHover = false;
+ Refresh();
}
protected override void OnClick(EventArgs e)
@@ -174,6 +164,38 @@ protected virtual void OnCheckedChanged(EventArgs e)
}
}
+ private void DrawBackground(Graphics g)
+ {
+ if (Checked)
+ {
+ g.FillRectangle(backgroundCheckedBrush, new Rectangle(2, 2, checkBoxSize - 4, checkBoxSize - 4));
+ g.DrawRectangle(innerBorderCheckedPen, new Rectangle(1, 1, checkBoxSize - 3, checkBoxSize - 3));
+ }
+ else
+ {
+ g.FillRectangle(backgroundBrush, new Rectangle(2, 2, checkBoxSize - 4, checkBoxSize - 4));
+
+ if (isHover)
+ {
+ g.DrawRectangle(innerBorderCheckedPen, new Rectangle(1, 1, checkBoxSize - 3, checkBoxSize - 3));
+ }
+ else
+ {
+ g.DrawRectangle(innerBorderPen, new Rectangle(1, 1, checkBoxSize - 3, checkBoxSize - 3));
+ }
+ }
+
+ g.DrawRectangle(borderPen, new Rectangle(0, 0, checkBoxSize - 1, checkBoxSize - 1));
+ }
+
+ private void DrawText(Graphics g)
+ {
+ Rectangle rect = new Rectangle(checkBoxSize + SpaceAfterCheckBox, 0, ClientRectangle.Width - checkBoxSize + SpaceAfterCheckBox, ClientRectangle.Height);
+ TextFormatFlags tff = TextFormatFlags.Left | TextFormatFlags.Top | TextFormatFlags.WordBreak;
+ TextRenderer.DrawText(g, Text, Font, new Rectangle(rect.X, rect.Y + 1, rect.Width, rect.Height + 1), Color.Black, tff);
+ TextRenderer.DrawText(g, Text, Font, rect, ForeColor, tff);
+ }
+
protected override void Dispose(bool disposing)
{
if (backgroundBrush != null) backgroundBrush.Dispose();
diff --git a/ShareX.HelpersLib/UpdateChecker/UpdateMessageBox.Designer.cs b/ShareX.HelpersLib/UpdateChecker/UpdateMessageBox.Designer.cs
index aedacb1b7..f4220533b 100644
--- a/ShareX.HelpersLib/UpdateChecker/UpdateMessageBox.Designer.cs
+++ b/ShareX.HelpersLib/UpdateChecker/UpdateMessageBox.Designer.cs
@@ -58,6 +58,7 @@ private void InitializeComponent()
//
// cbDontShow
//
+ this.cbDontShow.BackColor = System.Drawing.Color.Transparent;
resources.ApplyResources(this.cbDontShow, "cbDontShow");
this.cbDontShow.ForeColor = System.Drawing.Color.White;
this.cbDontShow.Name = "cbDontShow";
@@ -69,10 +70,10 @@ private void InitializeComponent()
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(70)))), ((int)(((byte)(70)))), ((int)(((byte)(70)))));
- this.Controls.Add(this.cbDontShow);
this.Controls.Add(this.lblText);
this.Controls.Add(this.btnNo);
this.Controls.Add(this.btnYes);
+ this.Controls.Add(this.cbDontShow);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.Name = "UpdateMessageBox";
diff --git a/ShareX.HelpersLib/UpdateChecker/UpdateMessageBox.resx b/ShareX.HelpersLib/UpdateChecker/UpdateMessageBox.resx
index 030c76acf..a9f67453f 100644
--- a/ShareX.HelpersLib/UpdateChecker/UpdateMessageBox.resx
+++ b/ShareX.HelpersLib/UpdateChecker/UpdateMessageBox.resx
@@ -145,13 +145,13 @@
$this
- 1
+ 0
Arial, 12pt
- 280, 112
+ 280, 120
104, 32
@@ -172,13 +172,13 @@
$this
- 2
+ 1
Arial, 12pt
- 168, 112
+ 168, 120
104, 32
@@ -199,22 +199,22 @@
$this
- 3
+ 2
Arial, 8pt
- 8, 88
+ 16, 88
- 376, 16
+ 368, 32
3
- Don't show until next startup
+ Do not prompt again until ShareX starts next time
cbDontShow
@@ -226,7 +226,7 @@
$this
- 0
+ 3
True
@@ -235,7 +235,10 @@
6, 13
- 399, 155
+ 399, 168
+
+
+ NoControl
CenterScreen