From c34eb6b88d6ed97a42cf0990b244c4dcd6cded6f Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 14 Nov 2021 22:12:27 +0100 Subject: [PATCH] cc_extra: simplify and fix paintImage() Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/f98c436aa5c74c4293aab0475f05c0fd24d236c0 Author: Thilo Graf Date: 2021-11-14 (Sun, 14 Nov 2021) --- src/gui/components/cc_extra.cpp | 4 +--- src/gui/components/cc_extra.h | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/gui/components/cc_extra.cpp b/src/gui/components/cc_extra.cpp index 4d6d39254..a9d7ac2a9 100644 --- a/src/gui/components/cc_extra.cpp +++ b/src/gui/components/cc_extra.cpp @@ -114,9 +114,7 @@ bool paintImage( const std::string& Image, int shadow_mode, const fb_pixel_t& color_shadow) { - std::string image = (dx > 0 || dy > 0) ? CFrameBuffer::getInstance()->getIconPath(Image) : Image; - CComponentsPicture box( x, y, dx, dy, image, NULL, shadow_mode, color_frame, color_body, color_shadow, transparent); - box.doPaintBg(color_body !=0); + CComponentsPicture box( x, y, dx, dy, Image, NULL, shadow_mode, color_frame, color_body, color_shadow, transparent); box.setCorner(radius, corner_type); box.paint(CC_SAVE_SCREEN_NO); diff --git a/src/gui/components/cc_extra.h b/src/gui/components/cc_extra.h index f4a1cec5a..74f558043 100644 --- a/src/gui/components/cc_extra.h +++ b/src/gui/components/cc_extra.h @@ -268,7 +268,7 @@ bool paintImage( const std::string& Image, const int& y, const int& dx = 0, const int& dy = 0, - const int& transparent = CFrameBuffer::TM_NONE, + const int& transparent = CFrameBuffer::TM_EMPTY, const fb_pixel_t& color_body = 0, const int& radius = 0, const int& corner_type = CORNER_NONE,