From 2d41d48719e531f756a0cb005579e8327f32bd22 Mon Sep 17 00:00:00 2001 From: pizzaboxer Date: Tue, 11 Jun 2024 23:49:45 +0100 Subject: [PATCH] Make progress style cancel button translatable --- Bloxstrap/Resources/CancelButton.png | Bin 768 -> 229 bytes Bloxstrap/Resources/CancelButtonHover.png | Bin 944 -> 394 bytes Bloxstrap/Resources/DarkCancelButton.png | Bin 1134 -> 229 bytes Bloxstrap/Resources/DarkCancelButtonHover.png | Bin 1175 -> 394 bytes .../Bootstrapper/ProgressDialog.Designer.cs | 39 +++++++++--------- .../Elements/Bootstrapper/ProgressDialog.cs | 2 + 6 files changed, 21 insertions(+), 20 deletions(-) diff --git a/Bloxstrap/Resources/CancelButton.png b/Bloxstrap/Resources/CancelButton.png index 966103bffc2c603505d9fd9baca2e57141ce9754..e9eff11dc66cc001ceab7cdc9a867d4c267b1f8b 100644 GIT binary patch delta 185 zcmZo*d&)RLf|G@rfq@~~x;9{#St8q# jZ_D?v8gZ>)kdR;~s?sVst}2`XG@QZH)z4*}Q$iB}Kq*SU delta 728 zcmaFL*uXYHf|G-dfq`MAXhQNtMTL6K0*}aI1_o|H5N51TiJ!>8z%_1rO$2O{l?{| z@*ad6KI86AV1l8hFu`}WnjKGEa9<_(u*Pos#S9ViY8yHG?d^vX^;0%* z$U6SGQ~x5Ss{eR$e%>C}7YwTo&cBm#WP*XowEh^~2(Pl;v474af3m-IW8T@c^L1MM z*V)ebCfoUfcm6&UDKHpJP5jwtk{%1x0#?5Dg zj$}*So+GT|#IA9r{K-sS7T<`b3mnGboaeM7Iks!ICCJy-S7u(SSeGqm<)CEJoY!2y zG3|h5o0@>5am0o7wNXa5)-8T@@cp7?sw|v9Q!>mx@qFMq6db9pa7;_%qhHIjA3Vt~ zPAjblOa#gnEG|xvoLbqG?lY}5plHK;mkU2){2wHP zFyEoVE@6I!dQ(gNWy_4J@-+KGgr7qE|GT?q*E@zPF>Ia~>7j8}dR^qIOXqIHJd?a{)Ald?`Nf>`7mgd| zUVm)eG-M}qP`+ucu#wB(7tR}Mbn15BjcV)K5x0KgOLzJ1@8YRf ruAlhySpSrPJwGfN0n^hyji=`9wcKs`Qy8uTlQ4s)tDnm{r-UW|JYPWv diff --git a/Bloxstrap/Resources/CancelButtonHover.png b/Bloxstrap/Resources/CancelButtonHover.png index 80b79a442824944197f0ea680ab954e0e873078c..1a56f458974532649eedfc110887337d645bd3ed 100644 GIT binary patch delta 350 zcmV-k0iph|2Z{rb83+Ra005rLkWrB#Ab(d-OjJex|Ns5{{rdX)`1ttu_xJYp_Wb<( z_4W18(9pZPySTWx&d$!v%*^}y`|t1Xy1KgQ>FMg~>gML=<>lqW!^6$Z&BVmS+uPf~ zz`(h=x!l~`($dn)%gY*mb65ZX010qNS#tmY3lIPR3lIUVBfWJ1006v6L_t(oM}O_u zOA>=141i$};;V>=rS;MKpR;BrFw+YJXPR%7oj>jpCBzTi7z@m-X*7NQ(sunYvK#uY zr2wVj;S9};jO!u)hsnFxt1HEcY6g<4o?u w%BAyI%85g@;6q%Q#o(bFdhT%U`g2Ns0Vt^~>I&ym4gdfE07*qoM6N<$g61T*QUCw| delta 904 zcmV;319$w21F#2>83+ad005~KU}KRXAb$yPNLh0L01FWS01FWTe`H^g0009;Nklr>0L$ot8Ewfd&Ls0tit86;hC(K@|B=J~VJfd(n#tYjz8-Gu$IR zVLW3S`5w<0OZKm1%sUprWGsToSOk;VD#CibPK(7N&FAwpo6XX6I(6-Eks(=)8XNvtAHX)G9_CwuCgHlwqVfJ)m6Hh*fL27^Hkpba2Er_;$Yw2@*&;K^sV+s!9?e}DgDd2es86*5?a zh9G=SbR2qbZ*N<3;w?f0FdBU4BqN4|p_o46Xu(u+b90k_#y;`+JInok|9_*Mk%!|0 z`=YZP(hOk5o5gBM>nfneQk=UN~><@VeoMomWey3Pw zpI{LhK%v$VuWTS_!V-i=m~oU~zmkP;t6~V&(H5sB_2;-2p#da9HRx>+4#5&Q+fV`# zbOj6AwN6vUw&Q5@;BQfB3V%TYi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8*DXqGP3o zUltv|S|rj4z;%57vTXqbe$fB0;7sN07m*fX5D!uK9>)m4%`1PzSK|Tohh_wYjf< zdwo*zvwVpcR^-U8zi< zENTQ`U12aPPA)Y+jM@jS(5zTZ5Tz_581;`C!4S*{hG0f81T%t>W4ZeU$t>oYO`>wc P00000NkvXXu0mjfHvAa2 diff --git a/Bloxstrap/Resources/DarkCancelButtonHover.png b/Bloxstrap/Resources/DarkCancelButtonHover.png index 4686f0d795ea1e40d1d0f709ba6801f6ff58c704..522c1b11e90d8acd1e5697aac8e1b525b98d5e62 100644 GIT binary patch delta 350 zcmbQv*~L6Tl7pFnfnnb134s$873#wSd_r86m6cUhRW&p;w6wIewY7D0bkx+;bai!u zf`Zc1)3dU&LPA2q!ot+m)s2mfGcqzPEiEl9ENpCSY;A4hLUvNpK2eX-7WscDaW-W@)*^mD|i tPUo!;oMUDleXvlb>RrLRU&UUvj2bI-UU5AS<^%eK!PC{xWt~$(696ym?BKl7v>M^=J74{HG&^?RP9=czk>_+vX7Ni-OL1H&F%6jPn*2Dz* zkb|W(h6>(LlwIG7HJmx^GtQjCX2!MPW9IC=&V}>)owfHlGiTZI6)T-#m=O%YjDKJV zW&}epBN#$nMp(ablWS_ePJf#imLF(}w!S{E5eQ$qQTjw_YeraNL}_bASYkwJ zYeraNL}_bASR}S>uXOtkRJqk_)_VIFizsc2-UyqwRJiU}uifbAsGFFW5R%EHJ9_N6 zH@{fv?d_BEdgA11Z~tOJ_}Yuw2#q&yx%v5dIUZm1^z?YwD@M!+F{!U_kbmPK5S+?D z`?~cTTt~+vF$gF3f0x>PF(breWMo8+gJHqfUsHP|%LKdk>~(M6zRe6D(AU=|?ZNeW zK75eA+fB`4u-VyJH#avY4_dZY?#Rl8wzdZ{ED_}Tw#l&!4i3t8fbX;gbIb@axP0ZR z9K+1aOx{<#R*>oGX%QOHbbmQ0unIyuqLHgHG&Gd8&5wzMv{QY^V;x;STwN%m^_+IHFJ^FpsEjXmqXj+vKyM@qgwY+fhLfE4VJz zfKZ_{j|poqF9^8=l_1d!&t~Ou4kEhR`NjWB_rlvAO1Cfsr!b0hl zo=Z5r@^eMlSZ0I**ix}IBP#O+UruoDKshJEW&HewI%$t%1g>%-YX6{f8FG18BN>MtJo2i7X>>&~)tk+VvaqopvU) zm^OUJaq9G$tYtI8U!W(CNT-Kg^7Chz*tCo>g6VL!n+3Bh`-uQ_Ife}w*M!>6xb*|}@a zf;okP;qu*ga9&W1L}^e)OgvrYYM)_k#Fa$G#A(#;i!Hi)1Vx{{Dsri+D9MmuM00000NkvXXu0mjf DgTyH{ diff --git a/Bloxstrap/UI/Elements/Bootstrapper/ProgressDialog.Designer.cs b/Bloxstrap/UI/Elements/Bootstrapper/ProgressDialog.Designer.cs index 066b8e5..a5bf402 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/ProgressDialog.Designer.cs +++ b/Bloxstrap/UI/Elements/Bootstrapper/ProgressDialog.Designer.cs @@ -33,10 +33,9 @@ namespace Bloxstrap.UI.Elements.Bootstrapper ProgressBar = new ProgressBar(); labelMessage = new Label(); IconBox = new PictureBox(); - buttonCancel = new PictureBox(); panel1 = new Panel(); + buttonCancel = new Label(); ((System.ComponentModel.ISupportInitialize)IconBox).BeginInit(); - ((System.ComponentModel.ISupportInitialize)buttonCancel).BeginInit(); panel1.SuspendLayout(); SuspendLayout(); // @@ -71,33 +70,34 @@ namespace Bloxstrap.UI.Elements.Bootstrapper IconBox.TabIndex = 2; 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.BackColor = System.Drawing.SystemColors.Window; + panel1.Controls.Add(buttonCancel); panel1.Controls.Add(labelMessage); panel1.Controls.Add(IconBox); - panel1.Controls.Add(buttonCancel); panel1.Controls.Add(ProgressBar); panel1.Location = new System.Drawing.Point(1, 1); panel1.Name = "panel1"; panel1.Size = new System.Drawing.Size(518, 318); 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 // AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); @@ -114,7 +114,6 @@ namespace Bloxstrap.UI.Elements.Bootstrapper FormClosing += Dialog_FormClosing; Load += ProgressDialog_Load; ((System.ComponentModel.ISupportInitialize)IconBox).EndInit(); - ((System.ComponentModel.ISupportInitialize)buttonCancel).EndInit(); panel1.ResumeLayout(false); ResumeLayout(false); } @@ -124,7 +123,7 @@ namespace Bloxstrap.UI.Elements.Bootstrapper private ProgressBar ProgressBar; private Label labelMessage; private PictureBox IconBox; - private PictureBox buttonCancel; private Panel panel1; + private Label buttonCancel; } } \ No newline at end of file diff --git a/Bloxstrap/UI/Elements/Bootstrapper/ProgressDialog.cs b/Bloxstrap/UI/Elements/Bootstrapper/ProgressDialog.cs index b00e8c6..ac5336b 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/ProgressDialog.cs +++ b/Bloxstrap/UI/Elements/Bootstrapper/ProgressDialog.cs @@ -46,11 +46,13 @@ namespace Bloxstrap.UI.Elements.Bootstrapper if (App.Settings.Prop.Theme.GetFinal() == Theme.Dark) { this.labelMessage.ForeColor = SystemColors.Window; + this.buttonCancel.ForeColor = Color.FromArgb(196, 197, 196); this.buttonCancel.Image = Properties.Resources.DarkCancelButton; this.panel1.BackColor = Color.FromArgb(35, 37, 39); 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(); SetupDialog();