Fixes ornament icon not correctly rendered

This commit is contained in:
Pandagrapher 2022-12-13 19:26:25 +01:00
parent 41a0bef2d8
commit 1a4de65f46
7 changed files with 16 additions and 7 deletions

View File

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 83 KiB

View File

@ -21,13 +21,14 @@
#include "multilangmgr.h"
#include "options.h"
#include "rtimage.h"
#include "rtsurface.h"
#include "../rtengine/procparams.h"
using namespace rtengine;
using namespace rtengine::procparams;
ExportPanel::ExportPanel () : listener (nullptr)
ExportPanel::ExportPanel () : listener (nullptr), ornamentSurface(new RTSurface("ornament1.svg"))
{
set_orientation(Gtk::ORIENTATION_VERTICAL);
@ -192,7 +193,7 @@ ExportPanel::ExportPanel () : listener (nullptr)
// add panel ending
Gtk::Box* vboxpe = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL));
Gtk::Separator* hseptpe = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL));
Gtk::Image* peImg = Gtk::manage (new RTImage ("ornament1"));
Gtk::Image* peImg = Gtk::manage (new Gtk::Image (ornamentSurface->get()));
vboxpe->pack_start (*hseptpe, Gtk::PACK_SHRINK, 4);
vboxpe->pack_start (*peImg);
pack_start (*vboxpe, Gtk::PACK_SHRINK, 0);

View File

@ -23,6 +23,7 @@
#include "guiutils.h"
class RTSurface;
class ExportPanelListener
{
public:
@ -103,6 +104,8 @@ protected:
ExportPanelListener* listener;
std::shared_ptr<RTSurface> ornamentSurface;
void bypassALL_Toggled();
void use_fast_pipeline_toggled();
void SaveSettingsAsDefault();

View File

@ -19,11 +19,11 @@
#include "filterpanel.h"
#include "multilangmgr.h"
#include "../rtengine/rtengine.h"
#include "rtimage.h"
#include "rtsurface.h"
using namespace rtengine;
FilterPanel::FilterPanel () : listener (nullptr)
FilterPanel::FilterPanel () : listener (nullptr), ornamentSurface(new RTSurface("ornament1.svg"))
{
set_orientation(Gtk::ORIENTATION_VERTICAL);
@ -138,7 +138,7 @@ FilterPanel::FilterPanel () : listener (nullptr)
// add panel ending
Gtk::Box* vboxpe = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL));
Gtk::Separator* hseptpe = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL));
Gtk::Image* peImg = Gtk::manage (new RTImage("ornament1"));
Gtk::Image* peImg = Gtk::manage (new Gtk::Image(ornamentSurface->get()));
vboxpe->pack_start(*hseptpe, Gtk::PACK_SHRINK, 4);
vboxpe->pack_start(*peImg);
pack_start(*vboxpe, Gtk::PACK_SHRINK, 0);

View File

@ -22,6 +22,8 @@
#include "exiffiltersettings.h"
class RTSurface;
class FilterPanelListener
{
public:
@ -61,6 +63,8 @@ protected:
ExifFilterSettings curefs;
FilterPanelListener* listener;
std::shared_ptr<RTSurface> ornamentSurface;
public:
FilterPanel ();

View File

@ -32,7 +32,7 @@
using namespace rtengine::procparams;
ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), favoritePanelSW(nullptr), hasChanged (false), editDataProvider (nullptr), photoLoadedOnce(false)
ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), favoritePanelSW(nullptr), hasChanged (false), editDataProvider (nullptr), photoLoadedOnce(false), ornamentSurface(new RTSurface("ornament1.svg"))
{
favoritePanel = Gtk::manage (new ToolVBox ());
@ -194,7 +194,7 @@ ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), favorit
// load panel endings
for (int i = 0; i < 8; i++) {
vbPanelEnd[i] = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL));
imgPanelEnd[i] = Gtk::manage (new RTImage ("ornament1"));
imgPanelEnd[i] = Gtk::manage (new Gtk::Image (ornamentSurface->get()));
imgPanelEnd[i]->show();
vbPanelEnd[i]->pack_start(*imgPanelEnd[i], Gtk::PACK_SHRINK);
vbPanelEnd[i]->show_all();

View File

@ -220,6 +220,7 @@ private:
EditDataProvider *editDataProvider;
sigc::connection notebookconn;
bool photoLoadedOnce; // Used to indicated that a photo has been loaded yet
std::shared_ptr<RTSurface> ornamentSurface;
Gtk::Widget* prevPage;
public: