feat(color): delay image load on manage models page (#5146)

This commit is contained in:
philmoz
2024-06-13 10:31:39 +10:00
committed by GitHub
parent b644aadbaa
commit 7aeb8a4898
4 changed files with 64 additions and 27 deletions
@@ -16,6 +16,8 @@
* GNU General Public License for more details.
*/
#pragma GCC optimize("O3")
#include "bitmapbuffer.h"
#include "libopenui_file.h"
#include "opentx_helpers.h"
+2 -2
View File
@@ -183,8 +183,8 @@ void StaticIcon::center(coord_t w, coord_t h)
// Display image from file system using LVGL with LVGL scaling
// - LVGL scaling is slow so don't use this if there are many images
StaticImage::StaticImage(Window* parent, const rect_t& rect,
const char* filename) :
Window(parent, rect)
const char* filename, bool dontEnlarge) :
Window(parent, rect), dontEnlarge(dontEnlarge)
{
setWindowFlag(NO_FOCUS);
+1 -1
View File
@@ -142,7 +142,7 @@ class StaticImage : public Window
{
public:
StaticImage(Window *parent, const rect_t &rect,
const char *filename = nullptr);
const char *filename = nullptr, bool dontEnlarge = false);
#if defined(DEBUG_WINDOWS)
std::string getName() const override { return "StaticImage"; }