From e2afccba70ae59d4d9ab1d759d684f9d2b3d1786 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 21 Nov 2016 10:53:01 +0100 Subject: [PATCH] CTextBox: try to fix possible background artefacts in transparent mode supplement to: - textbox: fix box width in round corners mode Radius was always subtracted in all text modes. TODO: value of m_nBgRadius itself is not considered at the moment. Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/7031dc1da4bf0288795c34511983969314c95367 Author: Thilo Graf Date: 2016-11-21 (Mon, 21 Nov 2016) --- src/gui/widget/textbox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/widget/textbox.cpp b/src/gui/widget/textbox.cpp index bbf678e33..41ca9e7dc 100644 --- a/src/gui/widget/textbox.cpp +++ b/src/gui/widget/textbox.cpp @@ -588,7 +588,7 @@ void CTextBox::refreshText(void) //bg variables int ax = m_cFrameTextRel.iX+m_cFrame.iX; int ay = m_cFrameTextRel.iY+m_cFrame.iY; - int dx = m_old_cText != m_cText || m_nNrOfPages>1 ? m_cFrameTextRel.iWidth : m_nMaxTextWidth - m_nBgRadius; + int dx = m_old_cText != m_cText || m_nNrOfPages>1 ? m_cFrameTextRel.iWidth : m_nMaxTextWidth - (m_nMode & SCROLL ? m_nBgRadius : 0); int dy = m_cFrameTextRel.iHeight; //avoid artefacts in transparent cornes