# HG changeset patch # User moel.mich # Date 1273927828 0 # Node ID 14329d236f056f4287e5107ac80bd0adc377b129 # Parent c92e98bc20735a87f77e8ec4f99d5d5bfeabfee5 Fixed some font issues. diff -r c92e98bc2073 -r 14329d236f05 GUI/AboutBox.Designer.cs --- a/GUI/AboutBox.Designer.cs Sat May 15 11:34:36 2010 +0000 +++ b/GUI/AboutBox.Designer.cs Sat May 15 12:50:28 2010 +0000 @@ -97,8 +97,7 @@ // // 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 @@ 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; diff -r c92e98bc2073 -r 14329d236f05 GUI/MainForm.Designer.cs --- a/GUI/MainForm.Designer.cs Sat May 15 11:34:36 2010 +0000 +++ b/GUI/MainForm.Designer.cs Sat May 15 12:50:28 2010 +0000 @@ -122,8 +122,7 @@ 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 @@ // 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 @@ 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 @@ 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"; diff -r c92e98bc2073 -r 14329d236f05 GUI/PlotPanel.Designer.cs --- a/GUI/PlotPanel.Designer.cs Sat May 15 11:34:36 2010 +0000 +++ b/GUI/PlotPanel.Designer.cs Sat May 15 12:50:28 2010 +0000 @@ -67,7 +67,6 @@ 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); diff -r c92e98bc2073 -r 14329d236f05 GUI/SensorNotifyIcon.cs --- a/GUI/SensorNotifyIcon.cs Sat May 15 11:34:36 2010 +0000 +++ b/GUI/SensorNotifyIcon.cs Sat May 15 12:50:28 2010 +0000 @@ -75,7 +75,7 @@ "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 @@ 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 @@ if (darkBrush != null) darkBrush.Dispose(); pen.Dispose(); - font.Dispose(); graphics.Dispose(); bitmap.Dispose(); } @@ -164,7 +166,7 @@ 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),