Make progress style cancel button translatable

This commit is contained in:
pizzaboxer 2024-06-11 23:49:45 +01:00
parent 2ab5e91f59
commit 2d41d48719
No known key found for this signature in database
GPG Key ID: 59D4A1DBAD0F2BA8
6 changed files with 21 additions and 20 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 768 B

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 944 B

After

Width:  |  Height:  |  Size: 394 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 394 B

View File

@ -33,10 +33,9 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
ProgressBar = new ProgressBar(); ProgressBar = new ProgressBar();
labelMessage = new Label(); labelMessage = new Label();
IconBox = new PictureBox(); IconBox = new PictureBox();
buttonCancel = new PictureBox();
panel1 = new Panel(); panel1 = new Panel();
buttonCancel = new Label();
((System.ComponentModel.ISupportInitialize)IconBox).BeginInit(); ((System.ComponentModel.ISupportInitialize)IconBox).BeginInit();
((System.ComponentModel.ISupportInitialize)buttonCancel).BeginInit();
panel1.SuspendLayout(); panel1.SuspendLayout();
SuspendLayout(); SuspendLayout();
// //
@ -71,33 +70,34 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
IconBox.TabIndex = 2; IconBox.TabIndex = 2;
IconBox.TabStop = false; IconBox.TabStop = false;
// //
// buttonCancel
//
buttonCancel.Enabled = false;
buttonCancel.Image = Properties.Resources.CancelButton;
buttonCancel.Location = new System.Drawing.Point(194, 264);
buttonCancel.Name = "buttonCancel";
buttonCancel.Size = new System.Drawing.Size(130, 44);
buttonCancel.SizeMode = PictureBoxSizeMode.Zoom;
buttonCancel.TabIndex = 3;
buttonCancel.TabStop = false;
buttonCancel.Visible = false;
buttonCancel.Click += ButtonCancel_Click;
buttonCancel.MouseEnter += ButtonCancel_MouseEnter;
buttonCancel.MouseLeave += ButtonCancel_MouseLeave;
//
// panel1 // panel1
// //
panel1.BackColor = System.Drawing.SystemColors.Window; panel1.BackColor = System.Drawing.SystemColors.Window;
panel1.Controls.Add(buttonCancel);
panel1.Controls.Add(labelMessage); panel1.Controls.Add(labelMessage);
panel1.Controls.Add(IconBox); panel1.Controls.Add(IconBox);
panel1.Controls.Add(buttonCancel);
panel1.Controls.Add(ProgressBar); panel1.Controls.Add(ProgressBar);
panel1.Location = new System.Drawing.Point(1, 1); panel1.Location = new System.Drawing.Point(1, 1);
panel1.Name = "panel1"; panel1.Name = "panel1";
panel1.Size = new System.Drawing.Size(518, 318); panel1.Size = new System.Drawing.Size(518, 318);
panel1.TabIndex = 4; panel1.TabIndex = 4;
// //
// buttonCancel
//
buttonCancel.Font = new System.Drawing.Font("Tahoma", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
buttonCancel.ForeColor = System.Drawing.Color.FromArgb(75, 75, 75);
buttonCancel.Image = Properties.Resources.CancelButton;
buttonCancel.Location = new System.Drawing.Point(194, 264);
buttonCancel.Name = "buttonCancel";
buttonCancel.Size = new System.Drawing.Size(130, 44);
buttonCancel.TabIndex = 4;
buttonCancel.Text = "Cancel";
buttonCancel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
buttonCancel.UseMnemonic = false;
buttonCancel.Click += ButtonCancel_Click;
buttonCancel.MouseEnter += ButtonCancel_MouseEnter;
buttonCancel.MouseLeave += ButtonCancel_MouseLeave;
//
// ProgressDialog // ProgressDialog
// //
AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
@ -114,7 +114,6 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
FormClosing += Dialog_FormClosing; FormClosing += Dialog_FormClosing;
Load += ProgressDialog_Load; Load += ProgressDialog_Load;
((System.ComponentModel.ISupportInitialize)IconBox).EndInit(); ((System.ComponentModel.ISupportInitialize)IconBox).EndInit();
((System.ComponentModel.ISupportInitialize)buttonCancel).EndInit();
panel1.ResumeLayout(false); panel1.ResumeLayout(false);
ResumeLayout(false); ResumeLayout(false);
} }
@ -124,7 +123,7 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
private ProgressBar ProgressBar; private ProgressBar ProgressBar;
private Label labelMessage; private Label labelMessage;
private PictureBox IconBox; private PictureBox IconBox;
private PictureBox buttonCancel;
private Panel panel1; private Panel panel1;
private Label buttonCancel;
} }
} }

View File

@ -46,11 +46,13 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
if (App.Settings.Prop.Theme.GetFinal() == Theme.Dark) if (App.Settings.Prop.Theme.GetFinal() == Theme.Dark)
{ {
this.labelMessage.ForeColor = SystemColors.Window; this.labelMessage.ForeColor = SystemColors.Window;
this.buttonCancel.ForeColor = Color.FromArgb(196, 197, 196);
this.buttonCancel.Image = Properties.Resources.DarkCancelButton; this.buttonCancel.Image = Properties.Resources.DarkCancelButton;
this.panel1.BackColor = Color.FromArgb(35, 37, 39); this.panel1.BackColor = Color.FromArgb(35, 37, 39);
this.BackColor = Color.FromArgb(25, 27, 29); this.BackColor = Color.FromArgb(25, 27, 29);
} }
this.labelMessage.Text = Resources.Strings.Common_Cancel;
this.IconBox.BackgroundImage = App.Settings.Prop.BootstrapperIcon.GetIcon().GetSized(128, 128).ToBitmap(); this.IconBox.BackgroundImage = App.Settings.Prop.BootstrapperIcon.GetIcon().GetSized(128, 128).ToBitmap();
SetupDialog(); SetupDialog();