cc_frm_button.cpp: fix comparsion to detect dyn-font usage

Origin commit data
------------------
Commit: 942d8594f5
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-06-26 (Mon, 26 Jun 2017)

Origin message was:
------------------
- cc_frm_button.cpp: fix comparsion to detect dyn-font usage
This commit is contained in:
vanhofen
2017-06-26 22:43:36 +02:00
parent 1f8d52be0d
commit 37d602cfde

View File

@@ -217,7 +217,7 @@ void CComponentsButton::initCaption()
* These dimensions must be enough to display complete content like possible icon and without truncated text.
*/
Font *tmp_font = cc_btn_font;
if ((tmp_font->getHeight()-reduce) > (height-reduce) && (tmp_font->getRenderWidth(cc_btn_text)-reduce) > width-reduce)
if ((tmp_font->getHeight()-reduce) > (height-reduce) || (tmp_font->getRenderWidth(cc_btn_text)-reduce) > width-reduce)
tmp_font = *cc_btn_dy_font->getDynFont(w_cap, h_cap, cc_btn_text);
if ((cc_btn_font->getHeight()-reduce) > (height-reduce))
tmp_font = *cc_btn_dy_font->getDynFont(w_cap, h_cap, cc_btn_text);