From a16ef2961da17e3187c69494aac2efa7012cf651 Mon Sep 17 00:00:00 2001 From: Jaex Date: Tue, 11 Jan 2022 22:10:53 +0300 Subject: [PATCH] Use current theme in first time config form --- ShareX/Forms/FirstTimeConfigForm.Designer.cs | 53 ++++++--------- ShareX/Forms/FirstTimeConfigForm.cs | 4 +- ShareX/Forms/FirstTimeConfigForm.resx | 71 +++++++++++++------- 3 files changed, 68 insertions(+), 60 deletions(-) diff --git a/ShareX/Forms/FirstTimeConfigForm.Designer.cs b/ShareX/Forms/FirstTimeConfigForm.Designer.cs index e935ffc05..693c28361 100644 --- a/ShareX/Forms/FirstTimeConfigForm.Designer.cs +++ b/ShareX/Forms/FirstTimeConfigForm.Designer.cs @@ -29,56 +29,47 @@ protected override void Dispose(bool disposing) private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FirstTimeConfigForm)); - this.cbRunStartup = new ShareX.HelpersLib.BlackStyleCheckBox(); - this.cbShellContextMenuButton = new ShareX.HelpersLib.BlackStyleCheckBox(); - this.cbSendToMenu = new ShareX.HelpersLib.BlackStyleCheckBox(); - this.cbSteamInApp = new ShareX.HelpersLib.BlackStyleCheckBox(); + this.cbRunStartup = new System.Windows.Forms.CheckBox(); + this.cbShellContextMenuButton = new System.Windows.Forms.CheckBox(); + this.cbSendToMenu = new System.Windows.Forms.CheckBox(); + this.cbSteamInApp = new System.Windows.Forms.CheckBox(); this.pbLogo = new System.Windows.Forms.PictureBox(); - this.btnOK = new ShareX.HelpersLib.BlackStyleButton(); - this.lblNote = new ShareX.HelpersLib.BlackStyleLabel(); - this.lblTitle = new ShareX.HelpersLib.BlackStyleLabel(); + this.btnOK = new System.Windows.Forms.Button(); + this.lblNote = new System.Windows.Forms.Label(); + this.lblTitle = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.pbLogo)).BeginInit(); this.SuspendLayout(); // // cbRunStartup // - this.cbRunStartup.BackColor = System.Drawing.Color.Transparent; resources.ApplyResources(this.cbRunStartup, "cbRunStartup"); - this.cbRunStartup.ForeColor = System.Drawing.Color.White; this.cbRunStartup.Name = "cbRunStartup"; - this.cbRunStartup.SpaceAfterCheckBox = 3; + this.cbRunStartup.UseVisualStyleBackColor = false; this.cbRunStartup.CheckedChanged += new System.EventHandler(this.cbRunStartup_CheckedChanged); // // cbShellContextMenuButton // - this.cbShellContextMenuButton.BackColor = System.Drawing.Color.Transparent; resources.ApplyResources(this.cbShellContextMenuButton, "cbShellContextMenuButton"); - this.cbShellContextMenuButton.ForeColor = System.Drawing.Color.White; this.cbShellContextMenuButton.Name = "cbShellContextMenuButton"; - this.cbShellContextMenuButton.SpaceAfterCheckBox = 3; + this.cbShellContextMenuButton.UseVisualStyleBackColor = false; this.cbShellContextMenuButton.CheckedChanged += new System.EventHandler(this.cbShellContextMenuButton_CheckedChanged); // // cbSendToMenu // - this.cbSendToMenu.BackColor = System.Drawing.Color.Transparent; resources.ApplyResources(this.cbSendToMenu, "cbSendToMenu"); - this.cbSendToMenu.ForeColor = System.Drawing.Color.White; this.cbSendToMenu.Name = "cbSendToMenu"; - this.cbSendToMenu.SpaceAfterCheckBox = 3; + this.cbSendToMenu.UseVisualStyleBackColor = false; this.cbSendToMenu.CheckedChanged += new System.EventHandler(this.cbSendToMenu_CheckedChanged); // // cbSteamInApp // - this.cbSteamInApp.BackColor = System.Drawing.Color.Transparent; resources.ApplyResources(this.cbSteamInApp, "cbSteamInApp"); - this.cbSteamInApp.ForeColor = System.Drawing.Color.White; this.cbSteamInApp.Name = "cbSteamInApp"; - this.cbSteamInApp.SpaceAfterCheckBox = 3; + this.cbSteamInApp.UseVisualStyleBackColor = false; this.cbSteamInApp.CheckedChanged += new System.EventHandler(this.cbSteamInApp_CheckedChanged); // // pbLogo // - this.pbLogo.BackColor = System.Drawing.Color.Transparent; resources.ApplyResources(this.pbLogo, "pbLogo"); this.pbLogo.Name = "pbLogo"; this.pbLogo.TabStop = false; @@ -86,29 +77,22 @@ private void InitializeComponent() // btnOK // resources.ApplyResources(this.btnOK, "btnOK"); - this.btnOK.ForeColor = System.Drawing.Color.White; this.btnOK.Name = "btnOK"; this.btnOK.MouseClick += new System.Windows.Forms.MouseEventHandler(this.btnOK_MouseClick); // // lblNote // - this.lblNote.BackColor = System.Drawing.Color.Transparent; resources.ApplyResources(this.lblNote, "lblNote"); - this.lblNote.ForeColor = System.Drawing.Color.White; this.lblNote.Name = "lblNote"; - this.lblNote.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // lblTitle // - this.lblTitle.BackColor = System.Drawing.Color.Transparent; resources.ApplyResources(this.lblTitle, "lblTitle"); - this.lblTitle.ForeColor = System.Drawing.Color.White; this.lblTitle.Name = "lblTitle"; // // FirstTimeConfigForm // resources.ApplyResources(this, "$this"); - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.Controls.Add(this.lblTitle); this.Controls.Add(this.lblNote); @@ -124,18 +108,19 @@ private void InitializeComponent() this.TopMost = true; ((System.ComponentModel.ISupportInitialize)(this.pbLogo)).EndInit(); this.ResumeLayout(false); + this.PerformLayout(); } #endregion - private HelpersLib.BlackStyleCheckBox cbRunStartup; - private HelpersLib.BlackStyleCheckBox cbShellContextMenuButton; - private HelpersLib.BlackStyleCheckBox cbSendToMenu; - private HelpersLib.BlackStyleCheckBox cbSteamInApp; + private System.Windows.Forms.CheckBox cbRunStartup; + private System.Windows.Forms.CheckBox cbShellContextMenuButton; + private System.Windows.Forms.CheckBox cbSendToMenu; + private System.Windows.Forms.CheckBox cbSteamInApp; private System.Windows.Forms.PictureBox pbLogo; - private HelpersLib.BlackStyleButton btnOK; - private HelpersLib.BlackStyleLabel lblNote; - private HelpersLib.BlackStyleLabel lblTitle; + private System.Windows.Forms.Button btnOK; + private System.Windows.Forms.Label lblNote; + private System.Windows.Forms.Label lblTitle; } } \ No newline at end of file diff --git a/ShareX/Forms/FirstTimeConfigForm.cs b/ShareX/Forms/FirstTimeConfigForm.cs index 3bc32d1ca..0b55b36a4 100644 --- a/ShareX/Forms/FirstTimeConfigForm.cs +++ b/ShareX/Forms/FirstTimeConfigForm.cs @@ -29,13 +29,15 @@ You should have received a copy of the GNU General Public License namespace ShareX { - public partial class FirstTimeConfigForm : BlackStyleForm + public partial class FirstTimeConfigForm : Form { private bool loaded; public FirstTimeConfigForm() { InitializeComponent(); + ShareXResources.ApplyTheme(this); + pbLogo.Image = ImageHelpers.ResizeImage(ShareXResources.Logo, 128, 128); StartupState state = StartupManagerSingletonProvider.CurrentStartupManager.State; diff --git a/ShareX/Forms/FirstTimeConfigForm.resx b/ShareX/Forms/FirstTimeConfigForm.resx index 304060492..6d9b23c56 100644 --- a/ShareX/Forms/FirstTimeConfigForm.resx +++ b/ShareX/Forms/FirstTimeConfigForm.resx @@ -117,6 +117,10 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + Arial, 8pt @@ -125,11 +129,10 @@ 10, 48 - 406, 16 + 195, 18 - - 0 + 2 Run ShareX when Windows starts @@ -138,7 +141,7 @@ cbRunStartup - ShareX.HelpersLib.BlackStyleCheckBox, ShareX.HelpersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 $this @@ -146,6 +149,9 @@ 7 + + True + Arial, 8pt @@ -153,10 +159,10 @@ 10, 72 - 406, 16 + 366, 18 - 1 + 3 Show "Upload with ShareX" button in Windows Explorer context menu @@ -165,7 +171,7 @@ cbShellContextMenuButton - ShareX.HelpersLib.BlackStyleCheckBox, ShareX.HelpersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 $this @@ -173,6 +179,9 @@ 6 + + True + Arial, 8pt @@ -180,10 +189,10 @@ 10, 96 - 406, 16 + 182, 18 - 2 + 4 Show ShareX in "Send to" menu @@ -192,7 +201,7 @@ cbSendToMenu - ShareX.HelpersLib.BlackStyleCheckBox, ShareX.HelpersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 $this @@ -200,6 +209,9 @@ 5 + + True + Arial, 8pt @@ -207,10 +219,10 @@ 10, 120 - 406, 16 + 248, 18 - 3 + 5 While ShareX is open, show "In-app" in Steam @@ -219,7 +231,7 @@ cbSteamInApp - ShareX.HelpersLib.BlackStyleCheckBox, ShareX.HelpersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 $this @@ -258,7 +270,7 @@ 128, 32 - 6 + 0 OK @@ -267,7 +279,7 @@ btnOK - ShareX.HelpersLib.BlackStyleButton, ShareX.HelpersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 $this @@ -275,26 +287,32 @@ 2 + + True + Arial, 8.25pt - 8, 152 + 8, 161 - 408, 32 + 342, 14 - 7 + 6 You can find these settings in "Application settings -> Integration tab". + + MiddleLeft + lblNote - ShareX.HelpersLib.BlackStyleLabel, ShareX.HelpersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 $this @@ -302,6 +320,9 @@ 1 + + True + Arial, 12pt @@ -309,10 +330,10 @@ 8, 14 - 403, 23 + 170, 18 - 8 + 1 ShareX first time config @@ -321,7 +342,7 @@ lblTitle - ShareX.HelpersLib.BlackStyleLabel, ShareX.HelpersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 $this @@ -333,7 +354,7 @@ True - 6, 13 + 96, 96 561, 194 @@ -344,11 +365,11 @@ ShareX - @Invariant + FirstTimeConfigForm - ShareX.HelpersLib.BlackStyleForm, ShareX.HelpersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 \ No newline at end of file