From 9189cf0a46c96558217535dca330f2d1079fa54d Mon Sep 17 00:00:00 2001 From: seerge Date: Mon, 20 Mar 2023 14:38:56 +0100 Subject: [PATCH] Dark Theme --- app/CustomControls.cs | 4 ++-- app/Fans.Designer.cs | 44 +++++++++++++++++++++++++++------------- app/Fans.cs | 2 +- app/Settings.Designer.cs | 2 -- 4 files changed, 33 insertions(+), 19 deletions(-) diff --git a/app/CustomControls.cs b/app/CustomControls.cs index 83f7c1a8..7adaa19e 100644 --- a/app/CustomControls.cs +++ b/app/CustomControls.cs @@ -60,8 +60,8 @@ namespace CustomControls } } - private Color arrowColor = Color.Gray; - [DefaultValue(typeof(Color), "Gray")] + private Color arrowColor = Color.Black; + [DefaultValue(typeof(Color), "Black")] public Color ArrowColor { get { return arrowColor; } diff --git a/app/Fans.Designer.cs b/app/Fans.Designer.cs index ed969755..727a5884 100644 --- a/app/Fans.Designer.cs +++ b/app/Fans.Designer.cs @@ -31,16 +31,18 @@ namespace GHelper /// private void InitializeComponent() { - System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); - System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea2 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); + ChartArea chartArea3 = new ChartArea(); + Title title3 = new Title(); + ChartArea chartArea4 = new ChartArea(); + Title title4 = new Title(); panelFans = new Panel(); labelTip = new Label(); labelBoost = new Label(); comboBoost = new RComboBox(); picturePerf = new PictureBox(); tableFanCharts = new TableLayoutPanel(); - chartGPU = new System.Windows.Forms.DataVisualization.Charting.Chart(); - chartCPU = new System.Windows.Forms.DataVisualization.Charting.Chart(); + chartGPU = new Chart(); + chartCPU = new Chart(); labelFans = new Label(); checkAuto = new CheckBox(); buttonReset = new RButton(); @@ -117,6 +119,7 @@ namespace GHelper // comboBoost // comboBoost.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; + comboBoost.BorderColor = Color.White; comboBoost.DropDownStyle = ComboBoxStyle.DropDownList; comboBoost.FormattingEnabled = true; comboBoost.Items.AddRange(new object[] { "Disabled", "Enabled", "Aggressive", "Efficient Enabled", "Efficient Aggressive" }); @@ -124,7 +127,6 @@ namespace GHelper comboBoost.Name = "comboBoost"; comboBoost.Size = new Size(266, 40); comboBoost.TabIndex = 38; - comboBoost.BorderColor = Color.White; // // picturePerf // @@ -158,8 +160,8 @@ namespace GHelper // // chartGPU // - chartArea1.Name = "ChartArea1"; - chartGPU.ChartAreas.Add(chartArea1); + chartArea3.Name = "ChartArea1"; + chartGPU.ChartAreas.Add(chartArea3); chartGPU.Dock = DockStyle.Fill; chartGPU.Location = new Point(2, 506); chartGPU.Margin = new Padding(2, 10, 2, 10); @@ -167,12 +169,13 @@ namespace GHelper chartGPU.Size = new Size(760, 476); chartGPU.TabIndex = 17; chartGPU.Text = "chart1"; - chartGPU.Titles.Add(""); + title3.Name = "Title1"; + chartGPU.Titles.Add(title3); // // chartCPU // - chartArea2.Name = "ChartArea1"; - chartCPU.ChartAreas.Add(chartArea2); + chartArea4.Name = "ChartArea1"; + chartCPU.ChartAreas.Add(chartArea4); chartCPU.Dock = DockStyle.Fill; chartCPU.Location = new Point(2, 10); chartCPU.Margin = new Padding(2, 10, 2, 10); @@ -180,7 +183,8 @@ namespace GHelper chartCPU.Size = new Size(760, 476); chartCPU.TabIndex = 14; chartCPU.Text = "chartCPU"; - chartCPU.Titles.Add(""); + title4.Name = "Title1"; + chartCPU.Titles.Add(title4); // // labelFans // @@ -207,25 +211,33 @@ namespace GHelper // // buttonReset // + buttonReset.Activated = false; buttonReset.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; + buttonReset.BackColor = SystemColors.ControlLight; + buttonReset.BorderColor = Color.Transparent; + buttonReset.FlatStyle = FlatStyle.Flat; buttonReset.Location = new Point(30, 1081); buttonReset.Margin = new Padding(4, 2, 4, 2); buttonReset.Name = "buttonReset"; buttonReset.Size = new Size(232, 44); buttonReset.TabIndex = 15; buttonReset.Text = "Factory Defaults"; - buttonReset.UseVisualStyleBackColor = true; + buttonReset.UseVisualStyleBackColor = false; // // buttonApply // + buttonApply.Activated = false; buttonApply.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonApply.BackColor = SystemColors.ControlLight; + buttonApply.BorderColor = Color.Transparent; + buttonApply.FlatStyle = FlatStyle.Flat; buttonApply.Location = new Point(542, 1081); buttonApply.Margin = new Padding(4, 2, 4, 2); buttonApply.Name = "buttonApply"; buttonApply.Size = new Size(248, 44); buttonApply.TabIndex = 14; buttonApply.Text = "Apply Fan Curve"; - buttonApply.UseVisualStyleBackColor = true; + buttonApply.UseVisualStyleBackColor = false; // // panelPower // @@ -283,14 +295,18 @@ namespace GHelper // // buttonApplyPower // + buttonApplyPower.Activated = false; buttonApplyPower.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; + buttonApplyPower.BackColor = SystemColors.ControlLight; + buttonApplyPower.BorderColor = Color.Transparent; + buttonApplyPower.FlatStyle = FlatStyle.Flat; buttonApplyPower.Location = new Point(20, 1081); buttonApplyPower.Margin = new Padding(4, 2, 4, 2); buttonApplyPower.Name = "buttonApplyPower"; buttonApplyPower.Size = new Size(324, 44); buttonApplyPower.TabIndex = 24; buttonApplyPower.Text = "Apply Power Limits"; - buttonApplyPower.UseVisualStyleBackColor = true; + buttonApplyPower.UseVisualStyleBackColor = false; // // panelCPU // diff --git a/app/Fans.cs b/app/Fans.cs index e8ffd17c..6d380539 100644 --- a/app/Fans.cs +++ b/app/Fans.cs @@ -19,7 +19,7 @@ namespace GHelper if (percentage == 0) return "OFF"; - return (200*Math.Round((float)(MinRPM + (MaxRPM-MinRPM)*percentage*0.01)/200)).ToString() + unit; + return (200 * Math.Round((float)(MinRPM + (MaxRPM - MinRPM) * percentage * 0.01) / 200)).ToString() + unit; } void SetChart(Chart chart, int device) diff --git a/app/Settings.Designer.cs b/app/Settings.Designer.cs index 80f015d0..192cee8e 100644 --- a/app/Settings.Designer.cs +++ b/app/Settings.Designer.cs @@ -890,8 +890,6 @@ namespace GHelper buttonKeyboardColor.BackColor = SystemColors.ButtonHighlight; buttonKeyboardColor.BorderColor = Color.Transparent; buttonKeyboardColor.Dock = DockStyle.Top; - buttonKeyboardColor.FlatAppearance.BorderColor = Color.Red; - buttonKeyboardColor.FlatAppearance.BorderSize = 2; buttonKeyboardColor.FlatStyle = FlatStyle.Flat; buttonKeyboardColor.ForeColor = SystemColors.ControlText; buttonKeyboardColor.Location = new Point(0, 0);