From b240f4a6a31842067d0e9c57031a31f784ab71f5 Mon Sep 17 00:00:00 2001 From: that Date: Mon, 14 Mar 2016 01:21:38 +0100 Subject: gui: fix font scaling for zip themes All fonts were extracted to /tmp/extract.bin which was deleted after the initial load, so reloading for scaling failed. - extract fonts to /tmp with original name and don't delete them - minor code cleanup Change-Id: If8a0f657a7ef4c418fd5cc8550a24de44a38f303 --- gui/resources.hpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'gui/resources.hpp') diff --git a/gui/resources.hpp b/gui/resources.hpp index 4548c10b4..528fecc14 100644 --- a/gui/resources.hpp +++ b/gui/resources.hpp @@ -29,21 +29,13 @@ private: protected: static int ExtractResource(ZipArchive* pZip, std::string folderName, std::string fileName, std::string fileExtn, std::string destFile); - static void LoadImage(ZipArchive* pZip, std::string file, gr_surface* source); + static void LoadImage(ZipArchive* pZip, std::string file, gr_surface* surface); static void CheckAndScaleImage(gr_surface source, gr_surface* destination, int retain_aspect); }; class FontResource : public Resource { public: - enum Type - { - TYPE_TWRP, -#ifndef TW_DISABLE_TTF - TYPE_TTF, -#endif - }; - FontResource(xml_node<>* node, ZipArchive* pZip); virtual ~FontResource(); @@ -54,7 +46,6 @@ public: protected: void* mFont; - Type m_type; private: void LoadFont(xml_node<>* node, ZipArchive* pZip); -- cgit v1.2.3