From cebdfef45ff28472ec3a98321c61414b79c12503 Mon Sep 17 00:00:00 2001 From: Vichingo455 Date: Sat, 18 Oct 2025 13:37:40 +0200 Subject: [PATCH] Theme fixes --- Perfect11/Form1.Designer.cs | 36 ++++-- Perfect11/Form1.cs | 19 +++ Perfect11/Resources/UWPSystemAppList.txt | 24 ++-- .../Perfect11.Inbox.ManageTelemetry.csproj | 1 + .../Perfect11.Inbox.ManageTelemetry/Tweak.cs | 112 +++++++++--------- 5 files changed, 107 insertions(+), 85 deletions(-) diff --git a/Perfect11/Form1.Designer.cs b/Perfect11/Form1.Designer.cs index d490af5..90058de 100644 --- a/Perfect11/Form1.Designer.cs +++ b/Perfect11/Form1.Designer.cs @@ -97,7 +97,7 @@ this.pages.Dock = System.Windows.Forms.DockStyle.Fill; this.pages.Location = new System.Drawing.Point(3, 28); this.pages.Name = "pages"; - this.pages.SelectedIndex = 0; + this.pages.SelectedIndex = 1; this.pages.Size = new System.Drawing.Size(1323, 732); this.pages.TabIndex = 1; this.pages.UseSelectable = true; @@ -112,7 +112,7 @@ this.welcomePage.Controls.Add(this.poisonLabel1); this.welcomePage.HorizontalScrollbarBarColor = true; this.welcomePage.HorizontalScrollbarHighlightOnWheel = false; - this.welcomePage.HorizontalScrollbarSize = 6; + this.welcomePage.HorizontalScrollbarSize = 9; this.welcomePage.Location = new System.Drawing.Point(4, 38); this.welcomePage.Name = "welcomePage"; this.welcomePage.Size = new System.Drawing.Size(1315, 690); @@ -120,7 +120,7 @@ this.welcomePage.Text = "Welcome"; this.welcomePage.VerticalScrollbarBarColor = true; this.welcomePage.VerticalScrollbarHighlightOnWheel = false; - this.welcomePage.VerticalScrollbarSize = 31; + this.welcomePage.VerticalScrollbarSize = 51; // // editionLabel // @@ -128,9 +128,10 @@ this.editionLabel.BackColor = System.Drawing.Color.Transparent; this.editionLabel.Location = new System.Drawing.Point(16, 656); this.editionLabel.Name = "editionLabel"; - this.editionLabel.Size = new System.Drawing.Size(183, 20); + this.editionLabel.Size = new System.Drawing.Size(175, 19); this.editionLabel.TabIndex = 4; this.editionLabel.Text = "Perfect11 Community Edition"; + this.editionLabel.UseCustomBackColor = true; // // poisonLabel2 // @@ -138,11 +139,12 @@ this.poisonLabel2.BackColor = System.Drawing.Color.Transparent; this.poisonLabel2.Location = new System.Drawing.Point(416, 379); this.poisonLabel2.Name = "poisonLabel2"; - this.poisonLabel2.Size = new System.Drawing.Size(492, 40); + this.poisonLabel2.Size = new System.Drawing.Size(465, 38); this.poisonLabel2.TabIndex = 3; this.poisonLabel2.Text = "Perfect11 is a tool made by a guy who loves to optimize Windows.\r\nIt allows to in" + "stalls apps, remove bloatware, configure services and even more."; this.poisonLabel2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.poisonLabel2.UseCustomBackColor = true; // // pictureBox1 // @@ -165,6 +167,7 @@ this.poisonLabel1.TabIndex = 2; this.poisonLabel1.Text = "Welcome to Perfect11, the tool that makes Windows 11 almost perfect."; this.poisonLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.poisonLabel1.UseCustomBackColor = true; // // debloatPage // @@ -180,7 +183,7 @@ this.debloatPage.Controls.Add(this.LstUWP); this.debloatPage.HorizontalScrollbarBarColor = true; this.debloatPage.HorizontalScrollbarHighlightOnWheel = false; - this.debloatPage.HorizontalScrollbarSize = 6; + this.debloatPage.HorizontalScrollbarSize = 9; this.debloatPage.Location = new System.Drawing.Point(4, 38); this.debloatPage.Name = "debloatPage"; this.debloatPage.Size = new System.Drawing.Size(1315, 690); @@ -188,7 +191,7 @@ this.debloatPage.Text = "Debloat"; this.debloatPage.VerticalScrollbarBarColor = true; this.debloatPage.VerticalScrollbarHighlightOnWheel = false; - this.debloatPage.VerticalScrollbarSize = 19; + this.debloatPage.VerticalScrollbarSize = 31; // // BtnRunUninstaller // @@ -226,7 +229,7 @@ this.ChkShowUWPSystem.AutoSize = true; this.ChkShowUWPSystem.Location = new System.Drawing.Point(5, 650); this.ChkShowUWPSystem.Name = "ChkShowUWPSystem"; - this.ChkShowUWPSystem.Size = new System.Drawing.Size(134, 17); + this.ChkShowUWPSystem.Size = new System.Drawing.Size(123, 15); this.ChkShowUWPSystem.TabIndex = 8; this.ChkShowUWPSystem.Text = "Show System Apps"; this.ChkShowUWPSystem.UseSelectable = true; @@ -244,7 +247,10 @@ this.LstUWPRemove.TabIndex = 7; this.LstUWPRemove.TileSize = new System.Drawing.Size(348, 20); this.LstUWPRemove.UseCompatibleStateImageBehavior = false; + this.LstUWPRemove.UseCustomBackColor = true; + this.LstUWPRemove.UseCustomForeColor = true; this.LstUWPRemove.UseSelectable = true; + this.LstUWPRemove.UseStyleColors = true; this.LstUWPRemove.View = System.Windows.Forms.View.Tile; // // removeAllButton @@ -300,11 +306,13 @@ this.LstUWP.OwnerDraw = true; this.LstUWP.Size = new System.Drawing.Size(518, 579); this.LstUWP.Sorting = System.Windows.Forms.SortOrder.Ascending; - this.LstUWP.Style = ReaLTaiizor.Enum.Poison.ColorStyle.Black; this.LstUWP.TabIndex = 2; this.LstUWP.TileSize = new System.Drawing.Size(348, 20); this.LstUWP.UseCompatibleStateImageBehavior = false; + this.LstUWP.UseCustomBackColor = true; + this.LstUWP.UseCustomForeColor = true; this.LstUWP.UseSelectable = true; + this.LstUWP.UseStyleColors = true; this.LstUWP.View = System.Windows.Forms.View.Tile; // // tweaksPage @@ -313,7 +321,7 @@ this.tweaksPage.Controls.Add(this.tweaksList); this.tweaksPage.HorizontalScrollbarBarColor = true; this.tweaksPage.HorizontalScrollbarHighlightOnWheel = false; - this.tweaksPage.HorizontalScrollbarSize = 6; + this.tweaksPage.HorizontalScrollbarSize = 9; this.tweaksPage.Location = new System.Drawing.Point(4, 38); this.tweaksPage.Name = "tweaksPage"; this.tweaksPage.Size = new System.Drawing.Size(1315, 690); @@ -321,7 +329,7 @@ this.tweaksPage.Text = "Tweak"; this.tweaksPage.VerticalScrollbarBarColor = true; this.tweaksPage.VerticalScrollbarHighlightOnWheel = false; - this.tweaksPage.VerticalScrollbarSize = 7; + this.tweaksPage.VerticalScrollbarSize = 12; // // runTweaks // @@ -336,6 +344,7 @@ // // tweaksList // + this.tweaksList.AllowSorting = true; this.tweaksList.Font = new System.Drawing.Font("Segoe UI", 12F); this.tweaksList.FullRowSelect = true; this.tweaksList.Location = new System.Drawing.Point(0, 0); @@ -345,12 +354,15 @@ this.tweaksList.Sorting = System.Windows.Forms.SortOrder.Ascending; this.tweaksList.TabIndex = 2; this.tweaksList.UseCompatibleStateImageBehavior = false; + this.tweaksList.UseCustomBackColor = true; + this.tweaksList.UseCustomForeColor = true; this.tweaksList.UseSelectable = true; + this.tweaksList.UseStyleColors = true; this.tweaksList.Resize += new System.EventHandler(this.tweaksList_Resize); // // Form1 // - this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); + this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 21F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(41)))), ((int)(((byte)(50))))); this.ClientSize = new System.Drawing.Size(1329, 788); diff --git a/Perfect11/Form1.cs b/Perfect11/Form1.cs index 2beee31..d218d10 100644 --- a/Perfect11/Form1.cs +++ b/Perfect11/Form1.cs @@ -5,6 +5,7 @@ using ReaLTaiizor.Enum.Poison; using System; using System.Collections.Generic; using System.Data; +using System.Drawing; using System.IO; using System.Linq; using System.Threading.Tasks; @@ -50,6 +51,11 @@ namespace Perfect11 tweaksList.Theme = ThemeStyle.Dark; runTweaks.Theme = ThemeStyle.Dark; editionLabel.Theme = ThemeStyle.Dark; + LstUWP.BackColor = Color.FromArgb(17, 17, 17); + LstUWPRemove.BackColor = Color.FromArgb(17, 17, 17); + tweaksList.BackColor = Color.FromArgb(17, 17, 17); + poisonLabel1.ForeColor = Color.FromArgb(255, 255, 255); + poisonLabel2.ForeColor = Color.FromArgb(255, 255, 255); } else { @@ -73,6 +79,9 @@ namespace Perfect11 tweaksList.Theme = ThemeStyle.Light; runTweaks.Theme = ThemeStyle.Light; editionLabel.Theme = ThemeStyle.Light; + LstUWP.BackColor = Color.FromArgb(255,255,255); + LstUWPRemove.BackColor = Color.FromArgb(255,255,255); + tweaksList.BackColor = Color.FromArgb(255,255,255); } } private void Form1_Load(object sender, EventArgs e) @@ -80,6 +89,16 @@ namespace Perfect11 pages.SelectedTab = welcomePage; // Always start from the first tab editionLabel.Text = AppEdition; theme.Text = AppEdition; + LstUWP.View = View.Details; + LstUWP.Columns.Clear(); + LstUWP.Columns.Add("App Name", -2, HorizontalAlignment.Left); + LstUWPRemove.View = View.Details; + LstUWPRemove.Columns.Clear(); + LstUWPRemove.Columns.Add("App Name", -2, HorizontalAlignment.Left); + int totalWidth1 = LstUWP.ClientSize.Width; + int totalWidth2 = LstUWPRemove.ClientSize.Width; + LstUWP.Columns[0].Width = totalWidth1; + LstUWPRemove.Columns[0].Width = totalWidth2; } private void GetUWP() { diff --git a/Perfect11/Resources/UWPSystemAppList.txt b/Perfect11/Resources/UWPSystemAppList.txt index c1a6c9b..56c735a 100644 --- a/Perfect11/Resources/UWPSystemAppList.txt +++ b/Perfect11/Resources/UWPSystemAppList.txt @@ -40,15 +40,8 @@ Microsoft.Windows.XGpuEjectDialog Windows.CBSPreview windows.immersivecontrolpanel Windows.PrintDialog -Microsoft.WindowsAppRuntime.1.3 -Microsoft.WindowsAppRuntime.1.5 -Microsoft.WindowsAppRuntime.1.6 -Microsoft.WindowsAppRuntime.1.7 -Microsoft.WindowsAppRuntime.1.8 -Microsoft.WindowsAppRuntime.CBS -Microsoft.WindowsAppRuntime.CBS.1.6 -Microsoft.UI.Xaml.2.8 -Microsoft.UI.Xaml.CBS +Microsoft.WindowsAppRuntime +Microsoft.UI.Xaml Microsoft.StorePurchaseApp Microsoft.Windows.StartMenuExperienceHost Microsoft.Windows.PrintQueueActionCenter @@ -57,16 +50,13 @@ Microsoft.DesktopAppInstaller Microsoft.SecHealthUI Microsoft.StartExperiencesApp Microsoft.Windows.AugLoop.CBS -MicrosoftWindows.Client.AIX -MicrosoftWindows.Client.CBS -MicrosoftWindows.Client.Core -MicrosoftWindows.Client.FileExp -MicrosoftWindows.Client.OOBE -MicrosoftWindows.Client.Photon -MicrosoftWindows.Client.WebExperience +MicrosoftWindows.Client MicrosoftWindows.CrossDevice MicrosoftWindows.UndockedDevKit Microsoft.LanguageExperiencePack Microsoft.XboxIdentityProvider Microsoft.Xbox.TCUI -Microsoft.Edge.GameAssist \ No newline at end of file +Microsoft.Edge.GameAssist +Microsoft.Ink.Handwriting +Kaspersky.ShellEx +Microsoft.DirectXRuntime \ No newline at end of file diff --git a/tweaks/Perfect11.Inbox.ManageTelemetry/Perfect11.Inbox.ManageTelemetry.csproj b/tweaks/Perfect11.Inbox.ManageTelemetry/Perfect11.Inbox.ManageTelemetry.csproj index 1eb3d5c..2a2dd24 100644 --- a/tweaks/Perfect11.Inbox.ManageTelemetry/Perfect11.Inbox.ManageTelemetry.csproj +++ b/tweaks/Perfect11.Inbox.ManageTelemetry/Perfect11.Inbox.ManageTelemetry.csproj @@ -50,6 +50,7 @@ {b3f8761a-b4b2-4378-9fe8-06bbfc39fce6} Perfect11.TweaksInterface + False diff --git a/tweaks/Perfect11.Inbox.ManageTelemetry/Tweak.cs b/tweaks/Perfect11.Inbox.ManageTelemetry/Tweak.cs index b885560..70f08bd 100644 --- a/tweaks/Perfect11.Inbox.ManageTelemetry/Tweak.cs +++ b/tweaks/Perfect11.Inbox.ManageTelemetry/Tweak.cs @@ -17,70 +17,70 @@ namespace Perfect11.Inbox.ManageTelemetry { void ControlService(string serviceName, string action) { - try - { - using (ServiceController sc = new ServiceController(serviceName)) + try { - Console.WriteLine($"Service '{serviceName}' current status: {sc.Status}"); - - switch (action.ToLower()) + using (ServiceController sc = new ServiceController(serviceName)) { - case "start": - if (sc.Status == ServiceControllerStatus.Stopped) - { - sc.Start(); - sc.WaitForStatus(ServiceControllerStatus.Running, TimeSpan.FromSeconds(10)); - Console.WriteLine("Service started successfully."); - } - else Console.WriteLine("Service is already running."); - break; + Console.WriteLine($"Service '{serviceName}' current status: {sc.Status}"); - case "stop": - if (sc.Status == ServiceControllerStatus.Running) - { - sc.Stop(); - sc.WaitForStatus(ServiceControllerStatus.Stopped, TimeSpan.FromSeconds(10)); - Console.WriteLine("Service stopped successfully."); - } - else Console.WriteLine("Service is not running."); - break; + switch (action.ToLower()) + { + case "start": + if (sc.Status == ServiceControllerStatus.Stopped) + { + sc.Start(); + sc.WaitForStatus(ServiceControllerStatus.Running, TimeSpan.FromSeconds(10)); + Console.WriteLine("Service started successfully."); + } + else Console.WriteLine("Service is already running."); + break; - case "restart": - if (sc.Status == ServiceControllerStatus.Running) - { - sc.Stop(); - sc.WaitForStatus(ServiceControllerStatus.Stopped, TimeSpan.FromSeconds(10)); - sc.Start(); - sc.WaitForStatus(ServiceControllerStatus.Running, TimeSpan.FromSeconds(10)); - Console.WriteLine("Service restarted successfully."); - } - else - { - sc.Start(); - sc.WaitForStatus(ServiceControllerStatus.Running, TimeSpan.FromSeconds(10)); - Console.WriteLine("Service started successfully."); - } - break; + case "stop": + if (sc.Status == ServiceControllerStatus.Running) + { + sc.Stop(); + sc.WaitForStatus(ServiceControllerStatus.Stopped, TimeSpan.FromSeconds(10)); + Console.WriteLine("Service stopped successfully."); + } + else Console.WriteLine("Service is not running."); + break; - default: - Console.WriteLine("Invalid action. Use start | stop | restart"); - break; + case "restart": + if (sc.Status == ServiceControllerStatus.Running) + { + sc.Stop(); + sc.WaitForStatus(ServiceControllerStatus.Stopped, TimeSpan.FromSeconds(10)); + sc.Start(); + sc.WaitForStatus(ServiceControllerStatus.Running, TimeSpan.FromSeconds(10)); + Console.WriteLine("Service restarted successfully."); + } + else + { + sc.Start(); + sc.WaitForStatus(ServiceControllerStatus.Running, TimeSpan.FromSeconds(10)); + Console.WriteLine("Service started successfully."); + } + break; + + default: + Console.WriteLine("Invalid action. Use start | stop | restart"); + break; + } } } + catch (InvalidOperationException ex) + { + throw new Exception($"Service '{serviceName}' not found or cannot be controlled: {ex.Message}"); + } + catch (System.ServiceProcess.TimeoutException) + { + throw new Exception("Operation timed out."); + } + catch (Exception ex) + { + throw new Exception(ex.Message); + } } - catch (InvalidOperationException ex) - { - throw new Exception($"Service '{serviceName}' not found or cannot be controlled: {ex.Message}"); - } - catch (System.ServiceProcess.TimeoutException) - { - throw new Exception("Operation timed out."); - } - catch (Exception ex) - { - throw new Exception(ex.Message); - } - } void SetServiceStartupType(string serviceName, string startupType) { try