mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 09:21:09 +02:00
cc_frm_button: try to match font text better into container
Origin commit data
------------------
Branch: ni/coolstream
Commit: c60903dab4
Author: Thilo Graf <dbt@novatux.de>
Date: 2021-12-03 (Fri, 03 Dec 2021)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -199,8 +199,8 @@ 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;
|
||||
int h_cap = min(cc_btn_text_obj->getHeight(), tmp_font->getHeight());
|
||||
int w_cap = tmp_font->getRenderWidth(cc_btn_text);
|
||||
int h_cap = min(cc_btn_text_obj->getHeight(), tmp_font->getHeight()) + OFFSET_INNER_MIN;
|
||||
int w_cap = max(tmp_font->getRenderWidth(cc_btn_text), width - x_offset - dx_icon_obj - 2*frame);
|
||||
int dx_tmp = x_offset + dx_icon_obj + w_cap - frame;
|
||||
|
||||
/* If the required sum for space of icon, text, frame and offsets is too small then adapt font size.
|
||||
|
Reference in New Issue
Block a user