Fixed some font issues.

This commit is contained in:
Michael Möller
2010-05-15 12:50:28 +00:00
parent 5e4b9607e7
commit 604884777f
4 changed files with 13 additions and 18 deletions
+2 -4
View File
@@ -97,8 +97,7 @@ namespace OpenHardwareMonitor.GUI {
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Bold);
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(85, 13);
this.label1.Margin = new System.Windows.Forms.Padding(12, 0, 12, 0);
this.label1.Name = "label1";
@@ -183,8 +182,7 @@ namespace OpenHardwareMonitor.GUI {
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.okButton);
this.Font = new System.Drawing.Font("Segoe UI", 9F);
this.Controls.Add(this.okButton);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
+4 -8
View File
@@ -122,8 +122,7 @@ namespace OpenHardwareMonitor.GUI {
this.treeView.Columns.Add(this.limit);
this.treeView.DefaultToolTipProvider = null;
this.treeView.Dock = System.Windows.Forms.DockStyle.Fill;
this.treeView.DragDropMarkColor = System.Drawing.Color.Black;
this.treeView.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.treeView.DragDropMarkColor = System.Drawing.Color.Black;
this.treeView.FullRowSelect = true;
this.treeView.GridLineStyle = Aga.Controls.Tree.GridLineStyle.Horizontal;
this.treeView.LineColor = System.Drawing.SystemColors.ControlDark;
@@ -440,8 +439,7 @@ namespace OpenHardwareMonitor.GUI {
// plotPanel
//
this.plotPanel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.plotPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.plotPanel.Font = new System.Drawing.Font("Segoe UI", 9F);
this.plotPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.plotPanel.Location = new System.Drawing.Point(0, 0);
this.plotPanel.Name = "plotPanel";
this.plotPanel.Size = new System.Drawing.Size(478, 198);
@@ -457,8 +455,7 @@ namespace OpenHardwareMonitor.GUI {
this.notifyContextMenuStrip.Size = new System.Drawing.Size(137, 54);
//
// hideShowToolStripMenuItem
//
this.hideShowToolStripMenuItem.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold);
//
this.hideShowToolStripMenuItem.Name = "hideShowToolStripMenuItem";
this.hideShowToolStripMenuItem.Size = new System.Drawing.Size(136, 22);
this.hideShowToolStripMenuItem.Text = "Hide/Show";
@@ -500,8 +497,7 @@ namespace OpenHardwareMonitor.GUI {
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(478, 792);
this.Controls.Add(this.splitContainer);
this.Controls.Add(this.menuStrip);
this.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Controls.Add(this.menuStrip);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MainMenuStrip = this.menuStrip;
this.Name = "MainForm";
-1
View File
@@ -67,7 +67,6 @@ namespace OpenHardwareMonitor.GUI {
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.Font = new System.Drawing.Font("Segoe UI", 9F);
this.Name = "PlotPanel";
this.Size = new System.Drawing.Size(170, 168);
this.ResumeLayout(false);
+7 -5
View File
@@ -75,7 +75,7 @@ namespace OpenHardwareMonitor.GUI {
"traycolor").ToString(), defaultColor);
this.pen = new Pen(Color.FromArgb(96, Color.Black));
this.font = new Font(SystemFonts.MessageBoxFont.FontFamily, 9);
this.font = SystemFonts.MessageBoxFont;
ContextMenuStrip contextMenuStrip = new ContextMenuStrip();
ToolStripMenuItem removeItem = new ToolStripMenuItem("Remove");
@@ -98,8 +98,11 @@ namespace OpenHardwareMonitor.GUI {
this.bitmap = new Bitmap(16, 16, PixelFormat.Format32bppArgb);
this.graphics = Graphics.FromImage(this.bitmap);
this.graphics.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
this.graphics.SmoothingMode = SmoothingMode.HighQuality;
if (Environment.OSVersion.Version.Major > 5) {
this.graphics.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
this.graphics.SmoothingMode = SmoothingMode.HighQuality;
}
}
public ISensor Sensor {
@@ -137,7 +140,6 @@ namespace OpenHardwareMonitor.GUI {
if (darkBrush != null)
darkBrush.Dispose();
pen.Dispose();
font.Dispose();
graphics.Dispose();
bitmap.Dispose();
}
@@ -164,7 +166,7 @@ namespace OpenHardwareMonitor.GUI {
graphics.Clear(Color.Black);
TextRenderer.DrawText(graphics, GetString(), font,
new Point(-2, 0), Color.White, Color.Black);
new Point(-2, 0), Color.White, Color.Black);
BitmapData data = bitmap.LockBits(
new Rectangle(0, 0, bitmap.Width, bitmap.Height),