Convert remaining RTPixbuf to RTSurface
Changes: - Remove RTPixbuf use in directory browser to use native GTK mechanism - Replace RTPixbuf by RTSurface for thumbnail icons - Remove now useless RTPixbuf class Fixes: - Elaborate RTSurface width / height based on the type
This commit is contained in:
@@ -26,12 +26,13 @@
|
||||
#include "multilangmgr.h"
|
||||
#include "thumbbrowserbase.h"
|
||||
#include "thumbnail.h"
|
||||
#include "rtsurface.h"
|
||||
|
||||
#include "../rtengine/procparams.h"
|
||||
#include "../rtengine/rtengine.h"
|
||||
|
||||
bool BatchQueueEntry::iconsLoaded(false);
|
||||
std::shared_ptr<RTPixbuf> BatchQueueEntry::savedAsIcon;
|
||||
std::shared_ptr<RTSurface> BatchQueueEntry::savedAsIcon(std::shared_ptr<RTSurface>(nullptr));
|
||||
|
||||
BatchQueueEntry::BatchQueueEntry (rtengine::ProcessingJob* pjob, const rtengine::procparams::ProcParams& pparams, Glib::ustring fname, int prevw, int prevh, Thumbnail* thm, bool overwrite) :
|
||||
ThumbBrowserEntryBase(fname),
|
||||
@@ -59,7 +60,7 @@ BatchQueueEntry::BatchQueueEntry (rtengine::ProcessingJob* pjob, const rtengine:
|
||||
#endif
|
||||
|
||||
if (!iconsLoaded) {
|
||||
savedAsIcon = std::shared_ptr<RTPixbuf>(new RTPixbuf("save-small", Gtk::ICON_SIZE_BUTTON));
|
||||
savedAsIcon = std::shared_ptr<RTSurface>(new RTSurface("save-small", Gtk::ICON_SIZE_SMALL_TOOLBAR));
|
||||
iconsLoaded = true;
|
||||
}
|
||||
|
||||
@@ -153,13 +154,13 @@ void BatchQueueEntry::removeButtonSet ()
|
||||
buttonSet = nullptr;
|
||||
}
|
||||
|
||||
std::vector<Glib::RefPtr<Gdk::Pixbuf>> BatchQueueEntry::getIconsOnImageArea ()
|
||||
std::vector<std::shared_ptr<RTSurface>> BatchQueueEntry::getIconsOnImageArea ()
|
||||
{
|
||||
|
||||
std::vector<Glib::RefPtr<Gdk::Pixbuf> > ret;
|
||||
std::vector<std::shared_ptr<RTSurface>> ret;
|
||||
|
||||
if (!outFileName.empty()) {
|
||||
ret.push_back (savedAsIcon->get());
|
||||
ret.push_back (savedAsIcon);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user