UI Tweaks

This commit is contained in:
Serge
2023-06-12 14:41:47 +02:00
parent c575b17aba
commit 1cd9c30c4a
9 changed files with 98 additions and 105 deletions

View File

@@ -1,7 +1,6 @@
using System.Diagnostics;
using System.Drawing;
using OSD;
using System.Diagnostics;
using System.Drawing.Drawing2D;
using OSD;
namespace GHelper
@@ -57,7 +56,7 @@ namespace GHelper
Charger
}
public class ToastForm : OSDNativeForm
public class ToastForm : OSDNativeForm
{
protected static string toastText = "Balanced";
@@ -74,7 +73,7 @@ namespace GHelper
protected override void PerformPaint(PaintEventArgs e)
{
Brush brush = new SolidBrush(Color.FromArgb(150,Color.Black));
Brush brush = new SolidBrush(Color.FromArgb(150, Color.Black));
Drawing.FillRoundedRectangle(e.Graphics, brush, this.Bound, 10);
StringFormat format = new StringFormat();
@@ -144,9 +143,9 @@ namespace GHelper
Screen screen1 = Screen.FromHandle(base.Handle);
Width = Math.Max(300, 100 + toastText.Length*22);
Width = Math.Max(300, 100 + toastText.Length * 22);
Height = 100;
X = (screen1.Bounds.Width - this.Width)/2;
X = (screen1.Bounds.Width - this.Width) / 2;
Y = screen1.Bounds.Height - 300 - this.Height;
Show();