Skip to content

Commit 3fc3bae

Browse files
committed
Reduced size of warning indicator.
1 parent 911bf0c commit 3fc3bae

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

Source/Controls/NetGraph.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using System;
22
using System.Collections.Generic;
3-
using System.Diagnostics;
43
using System.Drawing;
54
using System.Drawing.Drawing2D;
65
using System.Linq;
@@ -128,8 +127,8 @@ private void PaintGraph(Graphics g, Rectangle surface) {
128127
}
129128

130129
private void PaintWarning(Graphics g, Rectangle surface, string warning) {
131-
const int MARGIN = 4;
132-
var indicatorSize = new SizeF(40, 40);
130+
const int MARGIN = 2;
131+
var indicatorSize = new SizeF(30, 30);
133132
var warningSize = g.MeasureString(warning, Font);
134133
var totalSize = new SizeF(indicatorSize.Width + MARGIN + warningSize.Width, indicatorSize.Height);
135134

@@ -147,15 +146,15 @@ private void PaintWarning(Graphics g, Rectangle surface, string warning) {
147146
}
148147

149148
// Draw indicator text.
150-
using (var font = new Font("Segoe UI", 25, FontStyle.Bold)) {
149+
using (var font = new Font("Segoe UI", 18, FontStyle.Bold)) {
151150
var fontSize = g.MeasureString("?", font);
152151

153152
g.DrawString(
154153
"?",
155154
font,
156155
SystemBrushes.Control,
157156
(float)Math.Round(surface.Width / 2 - totalSize.Width / 2 + indicatorSize.Width / 2 - fontSize.Width / 2 + 1.5),
158-
(float)Math.Round(surface.Height / 2 - fontSize.Height / 2 + 1.5)
157+
(float)Math.Round(surface.Height / 2 - fontSize.Height / 2)
159158
);
160159
}
161160

Source/NetworkInterfaceSampler.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
using System;
33
using System.Collections;
44
using System.Collections.Generic;
5-
using System.ComponentModel;
65
using System.Linq;
76
using System.Net.NetworkInformation;
87

0 commit comments

Comments
 (0)