summaryrefslogtreecommitdiff
path: root/Source/ModelViewer/SourceView.cs
diff options
context:
space:
mode:
authorGravatar Michal Moskal <michal@moskal.me>2011-04-15 11:17:43 -0700
committerGravatar Michal Moskal <michal@moskal.me>2011-04-15 11:17:43 -0700
commitf165b7366f7751e8e85490a8ca94ac41c1aff279 (patch)
treeecac2f03052518ee7fdedad3976e0d0aa89e8fdf /Source/ModelViewer/SourceView.cs
parentd034da855be7802a9a0e2157e3b5346dcb5f46b7 (diff)
Add "Large font" menu item (for demos)
Diffstat (limited to 'Source/ModelViewer/SourceView.cs')
-rw-r--r--Source/ModelViewer/SourceView.cs11
1 files changed, 8 insertions, 3 deletions
diff --git a/Source/ModelViewer/SourceView.cs b/Source/ModelViewer/SourceView.cs
index c8a8b653..d520ede5 100644
--- a/Source/ModelViewer/SourceView.cs
+++ b/Source/ModelViewer/SourceView.cs
@@ -11,9 +11,13 @@ namespace Microsoft.Boogie.ModelViewer
{
public partial class SourceView : Form
{
+ public bool largeFont;
+ bool prevLarge;
+
public SourceView()
{
InitializeComponent();
+ //richTextBox1.Font = new Font(richTextBox1.Font.FontFamily, fontSize, richTextBox1.Font.Unit);
richTextBox1.BackColor = Color.White;
}
@@ -22,13 +26,14 @@ namespace Microsoft.Boogie.ModelViewer
string prefix =
@"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Lucida Sans Typewriter;}}\r\n" +
@"{\colortbl;\red0\green0\blue0;\red255\green0\blue0;\red0\green255\blue0;\red255\green255\blue0;\red0\green0\blue0;\red160\green160\blue160;}" +
- @"\viewkind4\uc1\pard\f0\fs17 ";
+ @"\viewkind4\uc1\pard\f0";
internal void SetSourceLocation(SourceViewState r)
{
- if (r.RichTextContent != prevRtf) {
- richTextBox1.Rtf = prefix + r.RichTextContent + "\r\n}\r\n";
+ if (r.RichTextContent != prevRtf || prevLarge != largeFont) {
+ richTextBox1.Rtf = prefix + (largeFont ? "\\fs30 " : "\\fs17 ") + r.RichTextContent + "\r\n}\r\n";
prevRtf = r.RichTextContent;
+ prevLarge = largeFont;
}
richTextBox1.Select(r.Location, 9);