Add theme and plot thickness options (#847)

* Add theme and plot thickness options

* Cleanup

* Fixed themes, and made it so the plot colors are updated when the theme is changed

* I think supporting themes beyond dark, light, and black is unecessary for the time being.

* recall theme from settings before instantiating plot

* Check for null setting

* committing to merge

* Fix

* Cleanup

* Cleanup

* Fix from comments. Thank you kamkie!

* Fixing last UI bugs

* Fix windowed plot not theming on relaunch, change theme, show plot
This commit is contained in:
Michael Rogers
2024-07-31 16:42:22 +02:00
committed by GitHub
parent 46746e7a86
commit 2e207a4523
18 changed files with 930 additions and 120 deletions
+59 -2
View File
@@ -87,6 +87,12 @@ namespace LibreHardwareMonitor.UI
this.plotWindowMenuItem = new LibreHardwareMonitor.UI.ToolStripRadioButtonMenuItem();
this.plotBottomMenuItem = new LibreHardwareMonitor.UI.ToolStripRadioButtonMenuItem();
this.plotRightMenuItem = new LibreHardwareMonitor.UI.ToolStripRadioButtonMenuItem();
this.themeMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.strokeThicknessMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.strokeThickness1ptMenuItem = new LibreHardwareMonitor.UI.ToolStripRadioButtonMenuItem();
this.strokeThickness2ptMenuItem = new LibreHardwareMonitor.UI.ToolStripRadioButtonMenuItem();
this.strokeThickness3ptMenuItem = new LibreHardwareMonitor.UI.ToolStripRadioButtonMenuItem();
this.strokeThickness4ptMenuItem = new LibreHardwareMonitor.UI.ToolStripRadioButtonMenuItem();
this.splitPlotPanelScalingMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.splitPanelPercentageScalingMenuItem = new LibreHardwareMonitor.UI.ToolStripRadioButtonMenuItem();
this.splitPanelFixedPlotScalingMenuItem = new LibreHardwareMonitor.UI.ToolStripRadioButtonMenuItem();
@@ -440,6 +446,8 @@ namespace LibreHardwareMonitor.UI
this.separatorMenuItem,
this.temperatureUnitsMenuItem,
this.plotLocationMenuItem,
this.strokeThicknessMenuItem,
this.themeMenuItem,
this.splitPlotPanelScalingMenuItem,
this.logSeparatorMenuItem,
this.logSensorsMenuItem,
@@ -537,6 +545,51 @@ namespace LibreHardwareMonitor.UI
this.plotRightMenuItem.Size = new System.Drawing.Size(118, 22);
this.plotRightMenuItem.Text = "Right";
//
// themeMenuItem
//
this.themeMenuItem.Name = "themeMenuItem";
this.themeMenuItem.Size = new System.Drawing.Size(278, 22);
this.themeMenuItem.Text = "Theme";
//
// strokeThicknessMenuItem
//
this.strokeThicknessMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.strokeThickness1ptMenuItem,
this.strokeThickness2ptMenuItem,
this.strokeThickness3ptMenuItem,
this.strokeThickness4ptMenuItem});
this.strokeThicknessMenuItem.Name = "strokeThicknessMenuItem";
this.strokeThicknessMenuItem.Size = new System.Drawing.Size(278, 22);
this.strokeThicknessMenuItem.Text = "Stroke Thickness";
//
// strokeThickness1ptMenuItem
//
this.strokeThickness1ptMenuItem.CheckOnClick = true;
this.strokeThickness1ptMenuItem.Name = "strokeThickness1ptMenuItem";
this.strokeThickness1ptMenuItem.Size = new System.Drawing.Size(224, 22);
this.strokeThickness1ptMenuItem.Text = "1pt";
//
// strokeThickness2ptMenuItem
//
this.strokeThickness2ptMenuItem.CheckOnClick = true;
this.strokeThickness2ptMenuItem.Name = "strokeThickness2ptMenuItem";
this.strokeThickness2ptMenuItem.Size = new System.Drawing.Size(224, 22);
this.strokeThickness2ptMenuItem.Text = "2pt";
//
// strokeThickness3ptMenuItem
//
this.strokeThickness3ptMenuItem.CheckOnClick = true;
this.strokeThickness3ptMenuItem.Name = "strokeThickness3ptMenuItem";
this.strokeThickness3ptMenuItem.Size = new System.Drawing.Size(224, 22);
this.strokeThickness3ptMenuItem.Text = "3pt";
//
// strokeThickness4ptMenuItem
//
this.strokeThickness4ptMenuItem.CheckOnClick = true;
this.strokeThickness4ptMenuItem.Name = "strokeThickness4ptMenuItem";
this.strokeThickness4ptMenuItem.Size = new System.Drawing.Size(224, 26);
this.strokeThickness4ptMenuItem.Text = "4pt";
//
// attachedPlotPanelScalingMenuItem
//
this.splitPlotPanelScalingMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@@ -910,8 +963,6 @@ namespace LibreHardwareMonitor.UI
//
// splitContainer
//
this.splitContainer.Border3DStyle = System.Windows.Forms.Border3DStyle.Raised;
this.splitContainer.Color = System.Drawing.SystemColors.Control;
this.splitContainer.Cursor = System.Windows.Forms.Cursors.Default;
this.splitContainer.Location = new System.Drawing.Point(12, 12);
this.splitContainer.Name = "splitContainer";
@@ -1100,6 +1151,12 @@ namespace LibreHardwareMonitor.UI
private System.Windows.Forms.ToolStripMenuItem psuMenuItem;
private System.Windows.Forms.ToolStripMenuItem batteryMenuItem;
private System.ComponentModel.BackgroundWorker backgroundUpdater;
private System.Windows.Forms.ToolStripMenuItem themeMenuItem;
private System.Windows.Forms.ToolStripMenuItem strokeThicknessMenuItem;
private ToolStripRadioButtonMenuItem strokeThickness4ptMenuItem;
private ToolStripRadioButtonMenuItem strokeThickness1ptMenuItem;
private ToolStripRadioButtonMenuItem strokeThickness2ptMenuItem;
private ToolStripRadioButtonMenuItem strokeThickness3ptMenuItem;
}
}