From 02b25f13d5afff6f1458280c96599f7cf09b95bf Mon Sep 17 00:00:00 2001 From: vanhofen Date: Wed, 8 May 2013 00:30:58 +0200 Subject: [PATCH] textbox: don't accept boxes with no borderwidth Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/050df14f8dab098ce8b90eaf02e62a5b4fb125fc Author: vanhofen Date: 2013-05-08 (Wed, 08 May 2013) Origin message was: ------------------ - textbox: don't accept boxes with no borderwidth --- src/gui/widget/textbox.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/widget/textbox.cpp b/src/gui/widget/textbox.cpp index 91d34304c..57218ba6e 100644 --- a/src/gui/widget/textbox.cpp +++ b/src/gui/widget/textbox.cpp @@ -220,7 +220,10 @@ void CTextBox::setTextFont(Font* font_text) void CTextBox::setTextBorderWidth(int border) { - text_border_width = border; + /* we need a minimal borderwith of 1px because the edge-smoothing + (or fontrenderer?) otherwise will paint single pixels outside the + defined area. e.g. 'j' is leaving such residues */ + text_border_width = (border > 0) ? border : 1; //Initialise the window frames first and than refresh text line array initFramesAndTextArray(); }