Store buttonset tooltips in static memory, saves about 700 byte per thumbnail

This commit is contained in:
Ingo Weyrich
2019-07-18 11:18:45 +02:00
parent 2ca9f7f94d
commit 5f8799d48e
8 changed files with 110 additions and 86 deletions

View File

@@ -19,6 +19,8 @@
#ifndef _FILETHUMBNAILBUTTONSET_
#define _FILETHUMBNAILBUTTONSET_
#include <array>
#include "lwbuttonset.h"
#include <gtkmm.h>
#include "filebrowserentry.h"
@@ -38,12 +40,14 @@ public:
static Cairo::RefPtr<RTSurface> unTrashIcon;
static Cairo::RefPtr<RTSurface> processIcon;
static Cairo::RefPtr<RTSurface> colorLabelIcon_0;
static Cairo::RefPtr<RTSurface> colorLabelIcon_1;
static Cairo::RefPtr<RTSurface> colorLabelIcon_2;
static Cairo::RefPtr<RTSurface> colorLabelIcon_3;
static Cairo::RefPtr<RTSurface> colorLabelIcon_4;
static Cairo::RefPtr<RTSurface> colorLabelIcon_5;
static std::array<Cairo::RefPtr<RTSurface>, 6> colorLabelIcon;
static Glib::ustring processToolTip;
static Glib::ustring unrankToolTip;
static Glib::ustring trashToolTip;
static Glib::ustring untrashToolTip;
static Glib::ustring colorLabelToolTip;
static std::array<Glib::ustring, 5> rankToolTip;
explicit FileThumbnailButtonSet (FileBrowserEntry* myEntry);
void setRank (int stars);