From 7658a3e2b231e18a783d46425dd83c472edac0ae Mon Sep 17 00:00:00 2001 From: eunma Date: Wed, 20 Sep 2023 23:27:48 +0900 Subject: [PATCH] Bug fix --- Controls/TransparentLabel.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Controls/TransparentLabel.cs b/Controls/TransparentLabel.cs index 4975154cd..d40ba7176 100644 --- a/Controls/TransparentLabel.cs +++ b/Controls/TransparentLabel.cs @@ -184,7 +184,7 @@ private Font GetFontForRoundName(string text) { return new Font(this.Font.FontFamily, this.Font.Size * this.GetFontSizeFactorForRoundName(text), this.Font.Style, GraphicsUnit.Pixel); } private float GetFontSizeFactorForRoundName(string text) { - float factor = 1.0f, + float factor = 1f, factorOffsetForSpace = 0f, factorOffsetForEngAlphabet = 0f, factorOffsetForKorAlphabet = 0f, @@ -659,7 +659,7 @@ private float GetFontSizeFactorForRoundName(string text) { } } } - return factor; + return factor > 1f ? 1f : factor; } private RectangleF FillRoundedRectangleF(Graphics g, Pen pen, Brush brush, float x, float y, float width, float height, float radius) { using (GraphicsPath path = new GraphicsPath()) {