From 76895705efaf1ab2b1cd1550743aa31f6f6768a2 Mon Sep 17 00:00:00 2001 From: Mourthag Date: Sun, 11 Oct 2015 20:29:45 +0200 Subject: [PATCH] Minor Bugfixing --- UI/Components/Note.cs | 1 + UI/Components/NotesComponentSettings.cs | 1 + Utility/TxtHelper.cs | 2 ++ 3 files changed, 4 insertions(+) diff --git a/UI/Components/Note.cs b/UI/Components/Note.cs index f1a1d4d..a8b8ec9 100644 --- a/UI/Components/Note.cs +++ b/UI/Components/Note.cs @@ -97,6 +97,7 @@ public void DrawHorizontal(Graphics g, LiveSplitState state, float height, Regio public void DrawVertical(Graphics g, LiveSplitState state, float width, Region clipRegion) { VerticalHeight = state.LayoutSettings.TextFont.GetHeight(g); + MinimumWidth = g.MeasureString(Text, state.LayoutSettings.TextFont).Width; DrawBackgorund(g, width, VerticalHeight); var textBrush = new SolidBrush(txtColor); g.DrawString(Text, state.LayoutSettings.TextFont, textBrush, new PointF(0, 0)); diff --git a/UI/Components/NotesComponentSettings.cs b/UI/Components/NotesComponentSettings.cs index e79863c..da94573 100644 --- a/UI/Components/NotesComponentSettings.cs +++ b/UI/Components/NotesComponentSettings.cs @@ -161,6 +161,7 @@ private void button1_Click(object sender, EventArgs e) { FilePath = loadNotesDialog.FileName; FilePathChanged = true; + filePathTxtBox.Text = FilePath; } } catch (Exception ex) diff --git a/Utility/TxtHelper.cs b/Utility/TxtHelper.cs index 5119f3b..aed1010 100644 --- a/Utility/TxtHelper.cs +++ b/Utility/TxtHelper.cs @@ -30,6 +30,8 @@ public static List readFile(string Path) result.Add( currentLine); } + inputStream.Close(); + return result; } }