Fixed Issue 129.
authormoel.mich
Wed, 06 Oct 2010 19:18:07 +0000
changeset 21579e9a77f6a71
parent 214 9ddbb54998ac
child 216 b5b076457b68
Fixed Issue 129.
GUI/SensorGadget.cs
     1.1 --- a/GUI/SensorGadget.cs	Wed Oct 06 11:34:54 2010 +0000
     1.2 +++ b/GUI/SensorGadget.cs	Wed Oct 06 19:18:07 2010 +0000
     1.3 @@ -305,8 +305,13 @@
     1.4      }
     1.5  
     1.6      private Font CreateFont(float size, FontStyle style) {
     1.7 -      return new Font(SystemFonts.MessageBoxFont.FontFamily, size,
     1.8 -        style);
     1.9 +      try {
    1.10 +        return new Font(SystemFonts.MessageBoxFont.FontFamily, size, style);
    1.11 +      } catch (ArgumentException) {
    1.12 +        // if the style is not supported, fall back to the original one
    1.13 +        return new Font(SystemFonts.MessageBoxFont.FontFamily, size, 
    1.14 +          SystemFonts.MessageBoxFont.Style);
    1.15 +      }
    1.16      }
    1.17  
    1.18      private void SetFontSize(float size) {