Icons are resized depending on the current scale/resolution

See issue #3547 and #4803
This commit is contained in:
Hombre
2018-12-08 22:48:15 +01:00
parent 434e121f99
commit 5ea0bacddd
23 changed files with 259 additions and 192 deletions

View File

@@ -33,11 +33,13 @@ class RTImage : public Gtk::Image, public RTScalable
protected:
Cairo::RefPtr<Cairo::ImageSurface> surface;
Glib::RefPtr<Gdk::Pixbuf> pixbuf;
public:
RTImage ();
RTImage (RTImage &other);
RTImage (Glib::RefPtr<Gdk::Pixbuf> &pixbuf);
RTImage(Cairo::RefPtr<Cairo::ImageSurface> other);
RTImage (Glib::RefPtr<RTImage> &other);
RTImage (const Glib::ustring& fileName, const Glib::ustring& rtlFileName = Glib::ustring());
@@ -49,8 +51,7 @@ public:
static void setDPInScale (const double newDPI, const int newScale);
static void setScale (const int newScale);
static Cairo::RefPtr<Cairo::ImageSurface> createFromFile (const Glib::ustring& fileName);
static Glib::RefPtr<Gdk::Pixbuf> createPixbufFromFile (const Glib::ustring& fileName);
static Cairo::RefPtr<Cairo::ImageSurface> createImgSurfFromFile (const Glib::ustring& fileName);
void from(RTImage* other);
void from(Glib::RefPtr<RTImage> other);
};