From 072cc201f3fdc8266b2d731e7877ae051ee361b9 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 14 Nov 2021 22:12:27 +0100 Subject: [PATCH] cc_frm_button: remove doPaintBg(false) and setter parameters, not required Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/7c5023799766edafd7301b42befa4515d1fedf7f Author: Thilo Graf Date: 2021-11-14 (Sun, 14 Nov 2021) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/components/cc_frm_button.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/gui/components/cc_frm_button.cpp b/src/gui/components/cc_frm_button.cpp index 6c315b3a2..6c55063a8 100644 --- a/src/gui/components/cc_frm_button.cpp +++ b/src/gui/components/cc_frm_button.cpp @@ -136,7 +136,8 @@ void CComponentsButton::initVarButton( const int& x_pos, const int& y_pos, const void CComponentsButton::initIcon() { //init cch_icon_obj only if an icon available - if (cc_btn_icon.empty()) { + if (cc_btn_icon.empty()) + { if (cc_btn_icon_obj) delete cc_btn_icon_obj; cc_btn_icon_obj = NULL; @@ -157,17 +158,13 @@ void CComponentsButton::initIcon() int y_icon = height/2 - h_icon/2; //init icon object - if(!cc_btn_icon.empty()) + if (cc_btn_icon_obj == NULL) { - if (cc_btn_icon_obj == NULL) - { - cc_btn_icon_obj = new CComponentsPicture(fr_thickness, y_icon, cc_btn_icon, this); - cc_btn_icon_obj->SetTransparent(CFrameBuffer::TM_BLACK); - cc_btn_icon_obj->doPaintBg(false); - } - cc_btn_icon_obj->setHeight(h_icon, true); - cc_btn_icon_obj->setPicture(cc_btn_icon); + cc_btn_icon_obj = new CComponentsPicture(fr_thickness, y_icon, cc_btn_icon, this); + cc_btn_icon_obj->SetTransparent(CFrameBuffer::TM_BLACK); } + cc_btn_icon_obj->setHeight(h_icon); + cc_btn_icon_obj->setPicture(cc_btn_icon); } void CComponentsButton::initCaption()