diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0a55ca6d5..53480968c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -46,7 +46,7 @@ endif()
# Warning for GCC vectorization issues, which causes problems #5749 and #6384:
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND ((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "10.0" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "10.2") OR (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "11.0")))
- message(STATUS "WARNING: gcc ${CMAKE_CXX_COMPILER_VERSION} is known to miscompile RawTherapee when using -ftree-loop-vectorize, forcing the option to be off")
+ message(STATUS "WARNING: gcc ${CMAKE_CXX_COMPILER_VERSION} is known to miscompile RawTherapee when using -ftree-loop-vectorize, forcing the option to be off")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-tree-loop-vectorize")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-tree-loop-vectorize")
endif()
@@ -438,13 +438,9 @@ endif()
# Check for libraries:
find_package(PkgConfig)
-if(WIN32)
- pkg_check_modules(GTK REQUIRED gtk+-3.0>=3.22.24)
- pkg_check_modules(GTKMM REQUIRED gtkmm-3.0>=3.22)
-else()
- pkg_check_modules(GTK REQUIRED gtk+-3.0>=3.16)
- pkg_check_modules(GTKMM REQUIRED gtkmm-3.0>=3.16)
-endif()
+# Gtk version shall be greater than 3.24.3 for fixed Hi-DPI support
+pkg_check_modules(GTK REQUIRED gtk+-3.0>=3.24.3)
+pkg_check_modules(GTKMM REQUIRED gtkmm-3.0>=3.24)
if(GTK_VERSION VERSION_GREATER "3.24.1" AND GTK_VERSION VERSION_LESS "3.24.7")
if(GTK_VERSION VERSION_EQUAL "3.24.5")
@@ -471,7 +467,7 @@ pkg_check_modules(GTHREAD REQUIRED gthread-2.0>=2.48)
pkg_check_modules(GOBJECT REQUIRED gobject-2.0>=2.48)
pkg_check_modules(SIGC REQUIRED sigc++-2.0>=2.3.1)
pkg_check_modules(LENSFUN REQUIRED lensfun>=0.2)
-pkg_check_modules(RSVG REQUIRED librsvg-2.0>=2.40)
+pkg_check_modules(RSVG REQUIRED librsvg-2.0>=2.46)
if(WIN32)
add_definitions(-DWIN32)
diff --git a/rtdata/CMakeLists.txt b/rtdata/CMakeLists.txt
index eb4b5e934..5597f51b7 100644
--- a/rtdata/CMakeLists.txt
+++ b/rtdata/CMakeLists.txt
@@ -8,8 +8,7 @@ file(GLOB FONTS "fonts/*")
set(PROFILESDIR "profiles")
set(THEMEDIR "themes")
-file(GLOB IMG_SVG LIST_DIRECTORIES false "images/svg/*")
-file(GLOB IMG_PNG LIST_DIRECTORIES false "images/png/*")
+file(GLOB IMG_SVG LIST_DIRECTORIES false "images/svg/*.svg")
file(GLOB IMG_ICO LIST_DIRECTORIES false "images/*")
if(WIN32)
@@ -27,16 +26,17 @@ endif()
if(UNIX)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/rawtherapee.desktop.in" "${CMAKE_CURRENT_BINARY_DIR}/rawtherapee.desktop")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/rawtherapee.desktop" DESTINATION ${DESKTOPDIR})
- install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/png/rawtherapee-logo-16.png" DESTINATION "${ICONSDIR}/hicolor/16x16/apps" RENAME rawtherapee.png)
- install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/png/rawtherapee-logo-24.png" DESTINATION "${ICONSDIR}/hicolor/24x24/apps" RENAME rawtherapee.png)
- install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/png/rawtherapee-logo-32.png" DESTINATION "${ICONSDIR}/hicolor/32x32/apps" RENAME rawtherapee.png)
- install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/png/rawtherapee-logo-48.png" DESTINATION "${ICONSDIR}/hicolor/48x48/apps" RENAME rawtherapee.png)
- install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/png/rawtherapee-logo-64.png" DESTINATION "${ICONSDIR}/hicolor/64x64/apps" RENAME rawtherapee.png)
- install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/png/rawtherapee-logo-128.png" DESTINATION "${ICONSDIR}/hicolor/128x128/apps" RENAME rawtherapee.png)
- install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/png/rawtherapee-logo-256.png" DESTINATION "${ICONSDIR}/hicolor/256x256/apps" RENAME rawtherapee.png)
- install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/rt-logo.svg" DESTINATION "${ICONSDIR}/hicolor/scalable/apps" RENAME rawtherapee.svg)
endif()
+install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/png/rawtherapee-logo-16.png" DESTINATION "${ICONSDIR}/rawtherapee/16x16/app_icons" RENAME rawtherapee.png)
+install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/png/rawtherapee-logo-24.png" DESTINATION "${ICONSDIR}/rawtherapee/24x24/app_icons" RENAME rawtherapee.png)
+install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/png/rawtherapee-logo-32.png" DESTINATION "${ICONSDIR}/rawtherapee/32x32/app_icons" RENAME rawtherapee.png)
+install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/png/rawtherapee-logo-48.png" DESTINATION "${ICONSDIR}/rawtherapee/48x48/app_icons" RENAME rawtherapee.png)
+install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/png/rawtherapee-logo-64.png" DESTINATION "${ICONSDIR}/rawtherapee/64x64/app_icons" RENAME rawtherapee.png)
+install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/png/rawtherapee-logo-128.png" DESTINATION "${ICONSDIR}/rawtherapee/128x128/app_icons" RENAME rawtherapee.png)
+install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/png/rawtherapee-logo-256.png" DESTINATION "${ICONSDIR}/rawtherapee/256x256/app_icons" RENAME rawtherapee.png)
+install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/rt-logo.svg" DESTINATION "${ICONSDIR}/rawtherapee/scalable/app_icons" RENAME rawtherapee.svg)
+
install(FILES ${LANGUAGEFILES} DESTINATION "${DATADIR}/languages")
install(FILES ${SOUNDFILES} DESTINATION "${DATADIR}/sounds")
install(FILES ${INPUTICCFILES} DESTINATION "${DATADIR}/iccprofiles/input")
@@ -50,8 +50,9 @@ endif()
install(DIRECTORY "${PROFILESDIR}" DESTINATION "${DATADIR}" FILES_MATCHING PATTERN "*.pp3")
install(DIRECTORY "${THEMEDIR}" DESTINATION "${DATADIR}")
-install(FILES ${IMG_SVG} DESTINATION "${DATADIR}/images")
-install(FILES ${IMG_PNG} DESTINATION "${DATADIR}/images")
+install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/png/empty.png" DESTINATION "${ICONSDIR}/rawtherapee/24x24/apps")
+install(FILES ${IMG_SVG} DESTINATION "${ICONSDIR}/rawtherapee/scalable/apps")
+install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/svg/Index.theme" DESTINATION "${ICONSDIR}/rawtherapee")
install(FILES ${IMG_ICO} DESTINATION "${DATADIR}/images")
if(APPLE)
diff --git a/rtdata/images/svg/splash.svg b/rtdata/images/splash.svg
similarity index 100%
rename from rtdata/images/svg/splash.svg
rename to rtdata/images/splash.svg
diff --git a/rtdata/images/svg/splash_template.svg b/rtdata/images/splash_template.svg
similarity index 100%
rename from rtdata/images/svg/splash_template.svg
rename to rtdata/images/splash_template.svg
diff --git a/rtdata/images/svg/index.theme b/rtdata/images/svg/index.theme
new file mode 100644
index 000000000..c862ff01f
--- /dev/null
+++ b/rtdata/images/svg/index.theme
@@ -0,0 +1,55 @@
+[Icon Theme]
+Name=RawTherapee
+Comment=RawTherapee icon theme
+Inherits=Adwaita
+Directories=16x16/app_icons,24x24/app_icons,32x32/app_icons,48x48/app_icons,64x64/app_icons,128x128/app_icons,256x256/app_icons,scalable/app_icons,scalable/apps
+
+
+[16x16/app_icons]
+Size=16
+Context=ApplicationIcons
+Type=Threshold
+
+[24x24/app_icons]
+Size=24
+Context=ApplicationIcons
+Type=Threshold
+
+[32x32/app_icons]
+Size=32
+Context=ApplicationIcons
+Type=Threshold
+
+[48x48/app_icons]
+Size=48
+Context=ApplicationIcons
+Type=Threshold
+
+[64x64/app_icons]
+Size=64
+Context=ApplicationIcons
+Type=Threshold
+
+[128x128/app_icons]
+Size=128
+Context=ApplicationIcons
+Type=Threshold
+
+[256x256/app_icons]
+Size=256
+Context=ApplicationIcons
+Type=Threshold
+
+[scalable/app_icons]
+MinSize=16
+Size=128
+MaxSize=256
+Context=ApplicationIcons
+Type=Scalable
+
+[scalable/apps]
+MinSize=16
+Size=128
+MaxSize=256
+Context=Applications
+Type=Scalable
diff --git a/rtgui/adjuster.cc b/rtgui/adjuster.cc
index a2f96cac3..c7077ddcf 100644
--- a/rtgui/adjuster.cc
+++ b/rtgui/adjuster.cc
@@ -24,6 +24,7 @@
#include "multilangmgr.h"
#include "options.h"
#include "rtimage.h"
+#include "rtscalable.h"
#include "../rtengine/rt_math.h"
namespace {
@@ -92,7 +93,7 @@ Adjuster::Adjuster(
reset = Gtk::manage(new Gtk::Button());
- reset->add(*Gtk::manage(new RTImage("undo-small.png", "redo-small.png")));
+ reset->add(*Gtk::manage(new RTImage("undo-small", Gtk::ICON_SIZE_BUTTON)));
setExpandAlignProperties(reset, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER);
reset->set_relief(Gtk::RELIEF_NONE);
reset->set_tooltip_markup(M("ADJUSTER_RESET_TO_DEFAULT"));
@@ -104,7 +105,7 @@ Adjuster::Adjuster(
setExpandAlignProperties(spin, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER);
spin->set_input_purpose(Gtk::INPUT_PURPOSE_DIGITS);
- reset->set_size_request(-1, spin->get_height() > MIN_RESET_BUTTON_HEIGHT ? spin->get_height() : MIN_RESET_BUTTON_HEIGHT);
+ reset->set_size_request(-1, RTScalable::scalePixelSize(spin->get_height() > MIN_RESET_BUTTON_HEIGHT ? spin->get_height() : MIN_RESET_BUTTON_HEIGHT));
slider = Gtk::manage(new MyHScale());
setExpandAlignProperties(slider, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
slider->set_draw_value(false);
@@ -192,7 +193,7 @@ void Adjuster::addAutoButton (const Glib::ustring &tooltip)
{
if (!automatic) {
automatic = Gtk::manage(new Gtk::CheckButton());
- //automatic->add (*Gtk::manage (new RTImage ("gears.png")));
+ //automatic->add (*Gtk::manage (new RTImage ("gears")));
automatic->set_tooltip_markup(tooltip.length() ? Glib::ustring::compose("%1\n\n%2", M("GENERAL_AUTO"), tooltip) : M("GENERAL_AUTO"));
setExpandAlignProperties(automatic, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER);
autoChange = automatic->signal_toggled().connect( sigc::mem_fun(*this, &Adjuster::autoToggled) );
@@ -615,7 +616,7 @@ void Adjuster::setLogScale(double base, double pivot, bool anchorMiddle)
logPivot = pivot;
logAnchorMiddle = anchorMiddle;
setSliderValue(cur);
-
+
sliderChange.block(false);
spinChange.block(false);
}
diff --git a/rtgui/batchqueue.cc b/rtgui/batchqueue.cc
index 19da96fb5..463ac7cde 100644
--- a/rtgui/batchqueue.cc
+++ b/rtgui/batchqueue.cc
@@ -57,16 +57,16 @@ BatchQueue::BatchQueue (FileCatalog* aFileCatalog) : processing(nullptr), fileCa
pmenu.attach (*Gtk::manage(new Gtk::SeparatorMenuItem ()), 0, 1, p, p + 1);
p++;
- pmenu.attach (*Gtk::manage(head = new MyImageMenuItem (M("FILEBROWSER_POPUPMOVEHEAD"), "goto-start-small.png")), 0, 1, p, p + 1);
+ pmenu.attach (*Gtk::manage(head = new MyImageMenuItem (M("FILEBROWSER_POPUPMOVEHEAD"), "goto-start-small")), 0, 1, p, p + 1);
p++;
- pmenu.attach (*Gtk::manage(tail = new MyImageMenuItem (M("FILEBROWSER_POPUPMOVEEND"), "goto-end-small.png")), 0, 1, p, p + 1);
+ pmenu.attach (*Gtk::manage(tail = new MyImageMenuItem (M("FILEBROWSER_POPUPMOVEEND"), "goto-end-small")), 0, 1, p, p + 1);
p++;
pmenu.attach (*Gtk::manage(new Gtk::SeparatorMenuItem ()), 0, 1, p, p + 1);
p++;
- pmenu.attach (*Gtk::manage(cancel = new MyImageMenuItem (M("FILEBROWSER_POPUPCANCELJOB"), "cancel-small.png")), 0, 1, p, p + 1);
+ pmenu.attach (*Gtk::manage(cancel = new MyImageMenuItem (M("FILEBROWSER_POPUPCANCELJOB"), "cancel-small")), 0, 1, p, p + 1);
pmenu.show_all ();
diff --git a/rtgui/batchqueuebuttonset.cc b/rtgui/batchqueuebuttonset.cc
index 969a55079..f68a7b4e7 100644
--- a/rtgui/batchqueuebuttonset.cc
+++ b/rtgui/batchqueuebuttonset.cc
@@ -25,9 +25,9 @@
bool BatchQueueButtonSet::iconsLoaded = false;
-Cairo::RefPtr BatchQueueButtonSet::cancelIcon;
-Cairo::RefPtr BatchQueueButtonSet::headIcon;
-Cairo::RefPtr BatchQueueButtonSet::tailIcon;
+std::shared_ptr BatchQueueButtonSet::cancelIcon = std::shared_ptr(nullptr);
+std::shared_ptr BatchQueueButtonSet::headIcon = std::shared_ptr(nullptr);
+std::shared_ptr BatchQueueButtonSet::tailIcon = std::shared_ptr(nullptr);
Glib::ustring BatchQueueButtonSet::moveHeadToolTip;
Glib::ustring BatchQueueButtonSet::moveEndToolTip;
@@ -37,9 +37,9 @@ BatchQueueButtonSet::BatchQueueButtonSet (BatchQueueEntry* myEntry)
{
if (!iconsLoaded) {
- cancelIcon = Cairo::RefPtr(new RTSurface("cancel-small.png"));
- headIcon = Cairo::RefPtr(new RTSurface("goto-start-small.png"));
- tailIcon = Cairo::RefPtr(new RTSurface("goto-end-small.png"));
+ cancelIcon = std::shared_ptr(new RTSurface("cancel-small", Gtk::ICON_SIZE_BUTTON));
+ headIcon = std::shared_ptr(new RTSurface("goto-start-small", Gtk::ICON_SIZE_BUTTON));
+ tailIcon = std::shared_ptr(new RTSurface("goto-end-small", Gtk::ICON_SIZE_BUTTON));
moveHeadToolTip = M("FILEBROWSER_POPUPMOVEHEAD");
moveEndToolTip = M("FILEBROWSER_POPUPMOVEEND");
cancelJobToolTip = M("FILEBROWSER_POPUPCANCELJOB");
diff --git a/rtgui/batchqueuebuttonset.h b/rtgui/batchqueuebuttonset.h
index fb45df518..2ff96c914 100644
--- a/rtgui/batchqueuebuttonset.h
+++ b/rtgui/batchqueuebuttonset.h
@@ -31,9 +31,9 @@ class BatchQueueButtonSet : public LWButtonSet
static bool iconsLoaded;
public:
- static Cairo::RefPtr cancelIcon;
- static Cairo::RefPtr headIcon;
- static Cairo::RefPtr tailIcon;
+ static std::shared_ptr cancelIcon;
+ static std::shared_ptr headIcon;
+ static std::shared_ptr tailIcon;
static Glib::ustring moveHeadToolTip;
static Glib::ustring moveEndToolTip;
diff --git a/rtgui/batchqueueentry.cc b/rtgui/batchqueueentry.cc
index 31a6f40c7..6ab6ccf83 100644
--- a/rtgui/batchqueueentry.cc
+++ b/rtgui/batchqueueentry.cc
@@ -22,7 +22,7 @@
#include "guiutils.h"
#include "threadutils.h"
-#include "rtimage.h"
+#include "rtsurface.h"
#include "multilangmgr.h"
#include "thumbbrowserbase.h"
#include "thumbnail.h"
@@ -31,7 +31,7 @@
#include "../rtengine/rtengine.h"
bool BatchQueueEntry::iconsLoaded(false);
-Glib::RefPtr BatchQueueEntry::savedAsIcon;
+std::shared_ptr BatchQueueEntry::savedAsIcon;
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 +59,7 @@ BatchQueueEntry::BatchQueueEntry (rtengine::ProcessingJob* pjob, const rtengine:
#endif
if (!iconsLoaded) {
- savedAsIcon = RTImage::createPixbufFromFile ("save-small.png");
+ savedAsIcon = std::shared_ptr(new RTPixbuf("save-small", Gtk::ICON_SIZE_BUTTON));
iconsLoaded = true;
}
@@ -159,7 +159,7 @@ std::vector> BatchQueueEntry::getIconsOnImageArea ()
std::vector > ret;
if (!outFileName.empty()) {
- ret.push_back (savedAsIcon);
+ ret.push_back (savedAsIcon->get());
}
return ret;
@@ -168,8 +168,8 @@ std::vector> BatchQueueEntry::getIconsOnImageArea ()
void BatchQueueEntry::getIconSize (int& w, int& h) const
{
- w = savedAsIcon->get_width ();
- h = savedAsIcon->get_height ();
+ w = savedAsIcon->get()->get_width ();
+ h = savedAsIcon->get()->get_height ();
}
diff --git a/rtgui/batchqueueentry.h b/rtgui/batchqueueentry.h
index f06b65046..6b57614e8 100644
--- a/rtgui/batchqueueentry.h
+++ b/rtgui/batchqueueentry.h
@@ -29,6 +29,7 @@
#include "../rtengine/noncopyable.h"
class Thumbnail;
+class RTPixbuf;
namespace rtengine
{
@@ -61,7 +62,7 @@ class BatchQueueEntry final : public ThumbBrowserEntryBase, public BQEntryUpdate
public:
- static Glib::RefPtr savedAsIcon;
+ static std::shared_ptr savedAsIcon;
rtengine::ProcessingJob* job;
const std::unique_ptr params;
diff --git a/rtgui/batchqueuepanel.cc b/rtgui/batchqueuepanel.cc
index 8a6dd25b4..f44c54cd0 100644
--- a/rtgui/batchqueuepanel.cc
+++ b/rtgui/batchqueuepanel.cc
@@ -89,7 +89,7 @@ BatchQueuePanel::BatchQueuePanel (FileCatalog* aFileCatalog) : parent(nullptr)
hb3->pack_start (*outdirFolderButton);
outdirFolderButton->signal_pressed().connect( sigc::mem_fun(*this, &BatchQueuePanel::pathFolderButtonPressed) );
outdirFolderButton->set_label(makeFolderLabel(options.savePathFolder));
- Gtk::Image* folderImg = Gtk::manage (new RTImage ("folder-closed.png"));
+ Gtk::Image* folderImg = Gtk::manage (new RTImage ("folder-closed", Gtk::ICON_SIZE_LARGE_TOOLBAR));
folderImg->show ();
outdirFolderButton->set_image (*folderImg);
outdirFolder = nullptr;
@@ -152,13 +152,13 @@ BatchQueuePanel::BatchQueuePanel (FileCatalog* aFileCatalog) : parent(nullptr)
zoomLabel->set_use_markup (true);
zoomBox->pack_start (*zoomLabel, Gtk::PACK_SHRINK, 4);
zoomInButton = Gtk::manage (new Gtk::Button ());
- zoomInButton->set_image (*Gtk::manage (new RTImage ("magnifier-plus.png")));
+ zoomInButton->set_image (*Gtk::manage (new RTImage ("magnifier-plus", Gtk::ICON_SIZE_LARGE_TOOLBAR)));
zoomInButton->signal_pressed().connect (sigc::mem_fun(*batchQueue, &BatchQueue::zoomIn));
zoomInButton->set_relief (Gtk::RELIEF_NONE);
zoomInButton->set_tooltip_markup (M("FILEBROWSER_ZOOMINHINT"));
zoomBox->pack_end (*zoomInButton, Gtk::PACK_SHRINK);
zoomOutButton = Gtk::manage (new Gtk::Button ());
- zoomOutButton->set_image (*Gtk::manage (new RTImage ("magnifier-minus.png")));
+ zoomOutButton->set_image (*Gtk::manage (new RTImage ("magnifier-minus", Gtk::ICON_SIZE_LARGE_TOOLBAR)));
zoomOutButton->signal_pressed().connect (sigc::mem_fun(*batchQueue, &BatchQueue::zoomOut));
zoomOutButton->set_relief (Gtk::RELIEF_NONE);
zoomOutButton->set_tooltip_markup (M("FILEBROWSER_ZOOMOUTHINT"));
@@ -208,13 +208,13 @@ void BatchQueuePanel::updateTab (int qsize, int forceOrientation)
Gtk::Label* l;
if(!qsize ) {
- grid->attach_next_to(*Gtk::manage (new RTImage ("gears.png")), Gtk::POS_TOP, 1, 1);
+ grid->attach_next_to(*Gtk::manage (new RTImage ("gears", Gtk::ICON_SIZE_LARGE_TOOLBAR)), Gtk::POS_TOP, 1, 1);
l = Gtk::manage (new Gtk::Label (Glib::ustring(" ") + M("MAIN_FRAME_QUEUE")) );
} else if (qStartStop->get_active()) {
- grid->attach_next_to(*Gtk::manage (new RTImage ("gears-play.png")), Gtk::POS_TOP, 1, 1);
+ grid->attach_next_to(*Gtk::manage (new RTImage ("gears-play", Gtk::ICON_SIZE_LARGE_TOOLBAR)), Gtk::POS_TOP, 1, 1);
l = Gtk::manage (new Gtk::Label (Glib::ustring(" ") + M("MAIN_FRAME_QUEUE") + " [" + Glib::ustring::format( qsize ) + "]"));
} else {
- grid->attach_next_to(*Gtk::manage (new RTImage ("gears-pause.png")), Gtk::POS_TOP, 1, 1);
+ grid->attach_next_to(*Gtk::manage (new RTImage ("gears-pause", Gtk::ICON_SIZE_LARGE_TOOLBAR)), Gtk::POS_TOP, 1, 1);
l = Gtk::manage (new Gtk::Label (Glib::ustring(" ") + M("MAIN_FRAME_QUEUE") + " [" + Glib::ustring::format( qsize ) + "]" ));
}
@@ -228,13 +228,13 @@ void BatchQueuePanel::updateTab (int qsize, int forceOrientation)
}
} else {
if (!qsize ) {
- grid->attach_next_to(*Gtk::manage (new RTImage ("gears.png")), Gtk::POS_RIGHT, 1, 1);
+ grid->attach_next_to(*Gtk::manage (new RTImage ("gears")), Gtk::POS_RIGHT, 1, 1);
grid->attach_next_to(*Gtk::manage (new Gtk::Label (M("MAIN_FRAME_QUEUE") )), Gtk::POS_RIGHT, 1, 1);
} else if (qStartStop->get_active()) {
- grid->attach_next_to(*Gtk::manage (new RTImage ("gears-play.png")), Gtk::POS_RIGHT, 1, 1);
+ grid->attach_next_to(*Gtk::manage (new RTImage ("gears-play")), Gtk::POS_RIGHT, 1, 1);
grid->attach_next_to(*Gtk::manage (new Gtk::Label (M("MAIN_FRAME_QUEUE") + " [" + Glib::ustring::format( qsize ) + "]" )), Gtk::POS_RIGHT, 1, 1);
} else {
- grid->attach_next_to(*Gtk::manage (new RTImage ("gears-pause.png")), Gtk::POS_RIGHT, 1, 1);
+ grid->attach_next_to(*Gtk::manage (new RTImage ("gears-pause")), Gtk::POS_RIGHT, 1, 1);
grid->attach_next_to(*Gtk::manage (new Gtk::Label (M("MAIN_FRAME_QUEUE") + " [" + Glib::ustring::format( qsize ) + "]" )), Gtk::POS_RIGHT, 1, 1);
}
diff --git a/rtgui/blackwhite.cc b/rtgui/blackwhite.cc
index 7b54f09d2..215f28503 100644
--- a/rtgui/blackwhite.cc
+++ b/rtgui/blackwhite.cc
@@ -187,18 +187,18 @@ BlackWhite::BlackWhite (): FoldableToolPanel(this, "blackwhite", M("TP_BWMIX_LAB
//----------- RGB / ROYGCBPM Mixer ------------------------------
- imgIcon[0] = Gtk::manage (new RTImage ("circle-red-small.png"));
- imgIcon[1] = Gtk::manage (new RTImage ("circle-orange-small.png"));
- imgIcon[2] = Gtk::manage (new RTImage ("circle-yellow-small.png"));
- imgIcon[3] = Gtk::manage (new RTImage ("circle-green-small.png"));
- imgIcon[4] = Gtk::manage (new RTImage ("circle-cyan-small.png"));
- imgIcon[5] = Gtk::manage (new RTImage ("circle-blue-small.png"));
- imgIcon[6] = Gtk::manage (new RTImage ("circle-purple-small.png"));
- imgIcon[7] = Gtk::manage (new RTImage ("circle-magenta-small.png"));
+ imgIcon[0] = Gtk::manage (new RTImage ("circle-red-small"));
+ imgIcon[1] = Gtk::manage (new RTImage ("circle-orange-small"));
+ imgIcon[2] = Gtk::manage (new RTImage ("circle-yellow-small"));
+ imgIcon[3] = Gtk::manage (new RTImage ("circle-green-small"));
+ imgIcon[4] = Gtk::manage (new RTImage ("circle-cyan-small"));
+ imgIcon[5] = Gtk::manage (new RTImage ("circle-blue-small"));
+ imgIcon[6] = Gtk::manage (new RTImage ("circle-purple-small"));
+ imgIcon[7] = Gtk::manage (new RTImage ("circle-magenta-small"));
- imgIcon[8] = Gtk::manage (new RTImage ("circle-empty-red-small.png"));
- imgIcon[9] = Gtk::manage (new RTImage ("circle-empty-green-small.png"));
- imgIcon[10] = Gtk::manage (new RTImage ("circle-empty-blue-small.png"));
+ imgIcon[8] = Gtk::manage (new RTImage ("circle-empty-red-small"));
+ imgIcon[9] = Gtk::manage (new RTImage ("circle-empty-green-small"));
+ imgIcon[10] = Gtk::manage (new RTImage ("circle-empty-blue-small"));
mixerVBox->pack_start (*Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)));
diff --git a/rtgui/cacorrection.cc b/rtgui/cacorrection.cc
index 971c0a284..79df63963 100644
--- a/rtgui/cacorrection.cc
+++ b/rtgui/cacorrection.cc
@@ -30,10 +30,10 @@ using namespace rtengine::procparams;
CACorrection::CACorrection () : FoldableToolPanel(this, "cacorrection", M("TP_CACORRECTION_LABEL"))
{
- Gtk::Image* icaredL = Gtk::manage (new RTImage ("circle-red-cyan-small.png"));
- Gtk::Image* icaredR = Gtk::manage (new RTImage ("circle-cyan-red-small.png"));
- Gtk::Image* icablueL = Gtk::manage (new RTImage ("circle-blue-yellow-small.png"));
- Gtk::Image* icablueR = Gtk::manage (new RTImage ("circle-yellow-blue-small.png"));
+ Gtk::Image* icaredL = Gtk::manage (new RTImage ("circle-red-cyan-small"));
+ Gtk::Image* icaredR = Gtk::manage (new RTImage ("circle-cyan-red-small"));
+ Gtk::Image* icablueL = Gtk::manage (new RTImage ("circle-blue-yellow-small"));
+ Gtk::Image* icablueR = Gtk::manage (new RTImage ("circle-yellow-blue-small"));
red = Gtk::manage (new Adjuster (M("TP_CACORRECTION_RED"), -0.005, 0.005, 0.0001, 0, icaredL, icaredR));
red->setAdjusterListener (this);
diff --git a/rtgui/chmixer.cc b/rtgui/chmixer.cc
index 619d7be3e..c64b7f252 100644
--- a/rtgui/chmixer.cc
+++ b/rtgui/chmixer.cc
@@ -28,15 +28,15 @@ using namespace rtengine::procparams;
ChMixer::ChMixer (): FoldableToolPanel(this, "chmixer", M("TP_CHMIXER_LABEL"), false, true)
{
- imgIcon[0] = Gtk::manage (new RTImage ("circle-red-small.png"));
- imgIcon[1] = Gtk::manage (new RTImage ("circle-green-red-small.png"));
- imgIcon[2] = Gtk::manage (new RTImage ("circle-blue-red-small.png"));
- imgIcon[3] = Gtk::manage (new RTImage ("circle-red-green-small.png"));
- imgIcon[4] = Gtk::manage (new RTImage ("circle-green-small.png"));
- imgIcon[5] = Gtk::manage (new RTImage ("circle-blue-green-small.png"));
- imgIcon[6] = Gtk::manage (new RTImage ("circle-red-blue-small.png"));
- imgIcon[7] = Gtk::manage (new RTImage ("circle-green-blue-small.png"));
- imgIcon[8] = Gtk::manage (new RTImage ("circle-blue-small.png"));
+ imgIcon[0] = Gtk::manage (new RTImage ("circle-red-small"));
+ imgIcon[1] = Gtk::manage (new RTImage ("circle-green-red-small"));
+ imgIcon[2] = Gtk::manage (new RTImage ("circle-blue-red-small"));
+ imgIcon[3] = Gtk::manage (new RTImage ("circle-red-green-small"));
+ imgIcon[4] = Gtk::manage (new RTImage ("circle-green-small"));
+ imgIcon[5] = Gtk::manage (new RTImage ("circle-blue-green-small"));
+ imgIcon[6] = Gtk::manage (new RTImage ("circle-red-blue-small"));
+ imgIcon[7] = Gtk::manage (new RTImage ("circle-green-blue-small"));
+ imgIcon[8] = Gtk::manage (new RTImage ("circle-blue-small"));
Gtk::Label* rlabel = Gtk::manage (new Gtk::Label ());
rlabel->set_markup (Glib::ustring("\t") + M("TP_CHMIXER_RED") + Glib::ustring(":"));
@@ -108,7 +108,7 @@ void ChMixer::read (const ProcParams* pp, const ParamsEdited* pedited)
disableListener ();
setEnabled(pp->chmixer.enabled);
-
+
if (pedited) {
for (int i = 0; i < 3; i++) {
red[i]->setEditedState (pedited->chmixer.red[i] ? Edited : UnEdited);
diff --git a/rtgui/coarsepanel.cc b/rtgui/coarsepanel.cc
index c64d53017..48f8041df 100644
--- a/rtgui/coarsepanel.cc
+++ b/rtgui/coarsepanel.cc
@@ -31,25 +31,25 @@ CoarsePanel::CoarsePanel () : ToolPanel (), oldhflip(false), oldvflip(false)
degree = 0;
degreechanged = true;
- Gtk::Image* rotateli = Gtk::manage (new RTImage ("rotate-left-90.png"));
+ Gtk::Image* rotateli = Gtk::manage (new RTImage ("rotate-left-90", Gtk::ICON_SIZE_LARGE_TOOLBAR));
rotate_left = Gtk::manage (new Gtk::Button ());
rotate_left->add (*rotateli);
rotate_left->set_relief(Gtk::RELIEF_NONE);
pack_start (*rotate_left);
- Gtk::Image* rotateri = Gtk::manage (new RTImage ("rotate-right-90.png"));
+ Gtk::Image* rotateri = Gtk::manage (new RTImage ("rotate-right-90", Gtk::ICON_SIZE_LARGE_TOOLBAR));
rotate_right = Gtk::manage (new Gtk::Button ());
rotate_right->add (*rotateri);
rotate_right->set_relief(Gtk::RELIEF_NONE);
pack_start (*rotate_right);
- Gtk::Image* fliphi = Gtk::manage (new RTImage ("flip-horizontal.png"));
+ Gtk::Image* fliphi = Gtk::manage (new RTImage ("flip-horizontal", Gtk::ICON_SIZE_LARGE_TOOLBAR));
hflip = Gtk::manage (new Gtk::ToggleButton ());
hflip->add (*fliphi);
hflip->set_relief(Gtk::RELIEF_NONE);
pack_start (*hflip);
- Gtk::Image* flipvi = Gtk::manage (new RTImage ("flip-vertical.png"));
+ Gtk::Image* flipvi = Gtk::manage (new RTImage ("flip-vertical", Gtk::ICON_SIZE_LARGE_TOOLBAR));
vflip = Gtk::manage (new Gtk::ToggleButton ());
vflip->add (*flipvi);
vflip->set_relief(Gtk::RELIEF_NONE);
diff --git a/rtgui/colorappearance.cc b/rtgui/colorappearance.cc
index f579da6e6..8c2a79d63 100644
--- a/rtgui/colorappearance.cc
+++ b/rtgui/colorappearance.cc
@@ -234,7 +234,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance"
genFrame->set_tooltip_markup (M ("TP_COLORAPP_GEN_TOOLTIP"));
genVBox = Gtk::manage ( new Gtk::Box(Gtk::ORIENTATION_VERTICAL));
genVBox->set_spacing (2);
-
+
complexmethod = Gtk::manage (new MyComboBoxText ());
complexmethod->append(M("TP_WAVELET_COMPNORMAL"));
complexmethod->append(M("TP_WAVELET_COMPEXPERT"));
@@ -245,7 +245,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance"
complexHBox->pack_start(*complexLabel, Gtk::PACK_SHRINK, 4);
complexHBox->pack_start(*complexmethod);
genVBox->pack_start (*complexHBox, Gtk::PACK_SHRINK);
-
+
modelmethod = Gtk::manage (new MyComboBoxText ());
modelmethod->append(M("TP_COLORAPP_MOD02"));
modelmethod->append(M("TP_COLORAPP_MOD16"));
@@ -268,7 +268,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance"
catHBox->pack_start(*catLabel, Gtk::PACK_SHRINK, 4);
catHBox->pack_start(*catmethod);
genVBox->pack_start (*catHBox, Gtk::PACK_SHRINK);
-
+
presetcat02 = Gtk::manage (new Gtk::CheckButton (M ("TP_COLORAPP_PRESETCAT02")));
presetcat02->set_tooltip_markup (M("TP_COLORAPP_PRESETCAT02_TIP"));
presetcat02conn = presetcat02->signal_toggled().connect( sigc::mem_fun(*this, &ColorAppearance::presetcat02pressed));
@@ -324,7 +324,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance"
wbmHBox = Gtk::manage (new Gtk::Box ());
-
+
wbmHBox->set_spacing (2);
wbmHBox->set_tooltip_markup (M ("TP_COLORAPP_MODEL_TOOLTIP"));
Gtk::Label* wbmLab = Gtk::manage (new Gtk::Label (M ("TP_COLORAPP_MODEL") + ":"));
@@ -358,10 +358,10 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance"
illumHBox->pack_start (*illum);
p1VBox->pack_start (*illumHBox);
- Gtk::Image* itempL = Gtk::manage (new RTImage ("circle-blue-small.png"));
- Gtk::Image* itempR = Gtk::manage (new RTImage ("circle-yellow-small.png"));
- Gtk::Image* igreenL = Gtk::manage (new RTImage ("circle-magenta-small.png"));
- Gtk::Image* igreenR = Gtk::manage (new RTImage ("circle-green-small.png"));
+ Gtk::Image* itempL = Gtk::manage (new RTImage ("circle-blue-small"));
+ Gtk::Image* itempR = Gtk::manage (new RTImage ("circle-yellow-small"));
+ Gtk::Image* igreenL = Gtk::manage (new RTImage ("circle-magenta-small"));
+ Gtk::Image* igreenR = Gtk::manage (new RTImage ("circle-green-small"));
tempsc = Gtk::manage (new Adjuster (M ("TP_WBALANCE_TEMPERATURE"), MINTEMP0, MAXTEMP0, 5, CENTERTEMP0, itempL, itempR, &wbSlider2Temp, &wbTemp2Slider));
@@ -649,10 +649,10 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance"
p3VBox = Gtk::manage ( new Gtk::Box(Gtk::ORIENTATION_VERTICAL));
p3VBox->set_spacing (2);
- Gtk::Image* itempL1 = Gtk::manage (new RTImage ("circle-blue-small.png"));
- Gtk::Image* itempR1 = Gtk::manage (new RTImage ("circle-yellow-small.png"));
- Gtk::Image* igreenL1 = Gtk::manage (new RTImage ("circle-magenta-small.png"));
- Gtk::Image* igreenR1 = Gtk::manage (new RTImage ("circle-green-small.png"));
+ Gtk::Image* itempL1 = Gtk::manage (new RTImage ("circle-blue-small"));
+ Gtk::Image* itempR1 = Gtk::manage (new RTImage ("circle-yellow-small"));
+ Gtk::Image* igreenL1 = Gtk::manage (new RTImage ("circle-magenta-small"));
+ Gtk::Image* igreenR1 = Gtk::manage (new RTImage ("circle-green-small"));
adaplum = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ABSOLUTELUMINANCE"), MINLA0, MAXLA0, 0.01, 16.));//, NULL, NULL, &wbSlider2la, &wbla2Slider));
adaplum->setLogScale(500, 0);
@@ -662,8 +662,8 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance"
adaplum->set_tooltip_markup (M ("TP_COLORAPP_VIEWING_ABSOLUTELUMINANCE_TOOLTIP"));
p3VBox->pack_start (*adaplum);
-// Gtk::Image* iblueredL = Gtk::manage (new RTImage ("circle-blue-small.png"));
-// Gtk::Image* iblueredR = Gtk::manage (new RTImage ("circle-red-small.png"));
+// Gtk::Image* iblueredL = Gtk::manage (new RTImage ("circle-blue-small"));
+// Gtk::Image* iblueredR = Gtk::manage (new RTImage ("circle-red-small"));
degreeout = Gtk::manage (new Adjuster (M ("TP_COLORAPP_CIECAT_DEGREE"), 0., 100., 1., 90.));
@@ -675,10 +675,10 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance"
degreeout->addAutoButton (M ("TP_COLORAPP_CAT02ADAPTATION_TOOLTIP"));
p3VBox->pack_start (*degreeout);
/*
- Gtk::Image* itempL1 = Gtk::manage (new RTImage ("circle-blue-small.png"));
- Gtk::Image* itempR1 = Gtk::manage (new RTImage ("circle-yellow-small.png"));
- Gtk::Image* igreenL1 = Gtk::manage (new RTImage ("circle-magenta-small.png"));
- Gtk::Image* igreenR1 = Gtk::manage (new RTImage ("circle-green-small.png"));
+ Gtk::Image* itempL1 = Gtk::manage (new RTImage ("circle-blue-small"));
+ Gtk::Image* itempR1 = Gtk::manage (new RTImage ("circle-yellow-small"));
+ Gtk::Image* igreenL1 = Gtk::manage (new RTImage ("circle-magenta-small"));
+ Gtk::Image* igreenR1 = Gtk::manage (new RTImage ("circle-green-small"));
*/
tempout = Gtk::manage (new Adjuster (M ("TP_WBALANCE_TEMPERATURE"), MINTEMP0, MAXTEMP0, 5, CENTERTEMP0, itempR1, itempL1, &wbSlider2Temp, &wbTemp2Slider));
greenout = Gtk::manage (new Adjuster (M ("TP_WBALANCE_GREEN"), MINGREEN0, MAXGREEN0, 0.001, 1.0, igreenR1, igreenL1));
@@ -742,7 +742,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance"
//reset button
neutral = Gtk::manage (new Gtk::Button (M ("TP_COLORAPP_NEUTRAL")));
setExpandAlignProperties (neutral, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
- RTImage *resetImg = Gtk::manage (new RTImage ("undo-small.png", "redo-small.png"));
+ RTImage* const resetImg = Gtk::manage (new RTImage ("undo-small", Gtk::ICON_SIZE_BUTTON));
setExpandAlignProperties (resetImg, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER);
neutral->set_image (*resetImg);
neutral->set_tooltip_text (M ("TP_COLORAPP_NEUTRAL_TIP"));
@@ -887,7 +887,7 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited)
nexttemp = pp->wb.temperature;
nextgreen = 1.; //pp->wb.green;
-
+
if (pedited) {
degree->setEditedState (pedited->colorappearance.degree ? Edited : UnEdited);
degreeout->setEditedState (pedited->colorappearance.degreeout ? Edited : UnEdited);
@@ -959,7 +959,7 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited)
} else if (pp->colorappearance.complexmethod == "expert") {
complexmethod->set_active(1);
}
-
+
modelmethod->set_active(0);
if (pp->colorappearance.modelmethod == "02") {
@@ -1374,7 +1374,7 @@ void ColorAppearance::updateGUIToMode(int mode)
badpixsl->hide();
datacie->hide();
} else {
- alHBox->show();
+ alHBox->show();
wbmHBox->show();
curveEditorG->show();
curveEditorG2->show();
@@ -1416,7 +1416,7 @@ void ColorAppearance::convertParamToNormal()
}
void ColorAppearance::complexmethodChanged()
-{
+{
if (complexmethod->get_active_row_number() == 0) {
updateGUIToMode(0);
convertParamToNormal();
@@ -1431,7 +1431,7 @@ void ColorAppearance::complexmethodChanged()
}
void ColorAppearance::modelmethodChanged()
-{
+{
if (listener && (multiImage || getEnabled())) {
listener->panelChanged(EvCATmodel, modelmethod->get_active_text());
@@ -1439,7 +1439,7 @@ void ColorAppearance::modelmethodChanged()
}
void ColorAppearance::catmethodChanged()
-{
+{
if (catmethod->get_active_row_number() == 1) {
disableListener();
@@ -1488,7 +1488,7 @@ void ColorAppearance::catmethodChanged()
degreeout->setValue(90);
ybout->setValue(18);
tempout->setValue (nexttemp);
-
+
/* if(tempout->getAutoValue()) {
tempout->resetValue (false);
} else {
@@ -1498,7 +1498,7 @@ void ColorAppearance::catmethodChanged()
*/
greenout->setValue (nextgreen);
enableListener();
-
+
} else if (catmethod->get_active_row_number() == 0) {
disableListener();
degree->setAutoValue (true);
@@ -1756,7 +1756,7 @@ void ColorAppearance::presetcat02pressed () //keep in case of...
degreeout->setValue(90);
ybout->setValue(18);
tempout->setValue (nexttemp);
-
+
/* if(tempout->getAutoValue()) {
tempout->resetValue (false);
} else {
@@ -1816,7 +1816,7 @@ void ColorAppearance::presetcat02pressed () //keep in case of...
tempout->resetValue (false);
greenout->resetValue (false);
enableListener();
-
+
}
if (batchMode) {
if (presetcat02->get_inconsistent()) {
@@ -2005,7 +2005,7 @@ void ColorAppearance::adapCamChanged (double cadap)
if(presetcat02->get_active()){
return;
}
-
+
idle_register.add(
[this, cadap]() -> bool
{
@@ -2020,7 +2020,7 @@ void ColorAppearance::adapCamChanged (double cadap)
void ColorAppearance::wbCamChanged (double temp, double tin)
{
-
+
idle_register.add(
[this, temp, tin]() -> bool
{
@@ -2132,7 +2132,7 @@ void ColorAppearance::adjusterAutoToggled(Adjuster* a)
tempout->setAutoValue (true);
}
}
-*/
+*/
if (multiImage) {
if (degree->getAutoInconsistent()) {
degree->setAutoInconsistent (false);
@@ -2276,7 +2276,7 @@ void ColorAppearance::wbmodelChanged ()
tempsc->hide();
greensc->hide();
tempsc->setValue (5003);
- greensc->setValue (1);
+ greensc->setValue (1);
}
if (wbmodel->get_active_row_number() == 2) {
diff --git a/rtgui/colortoning.cc b/rtgui/colortoning.cc
index 0140c5b62..43332a500 100644
--- a/rtgui/colortoning.cc
+++ b/rtgui/colortoning.cc
@@ -127,8 +127,8 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR
pack_start( *opacityCurveEditorG, Gtk::PACK_SHRINK, 2);
//---------Chroma curve 1 --------------------
- iby = Gtk::manage (new RTImage ("circle-yellow-blue-small.png"));
- irg = Gtk::manage (new RTImage ("circle-green-red-small.png"));
+ iby = Gtk::manage (new RTImage ("circle-yellow-blue-small"));
+ irg = Gtk::manage (new RTImage ("circle-green-red-small"));
clCurveEditorG = new CurveEditorGroup (options.lastColorToningCurvesDir, M("TP_COLORTONING_CHROMAC"));
clCurveEditorG->setCurveListener (this);
@@ -169,7 +169,7 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR
//--------------------- Reset curves -----------------------------
/* Each curve can reset to a different curve, so this button only save one click now... so we remove it.
neutralCurves = Gtk::manage (new Gtk::Button (M("TP_COLORTONING_NEUTRALCUR")));
- RTImage *resetImgc = Gtk::manage (new RTImage ("undo-small.png", "redo-small.png"));
+ RTImage *resetImgc = Gtk::manage (new RTImage ("undo-small"));
neutralCurves->set_image(*resetImgc);
neutralCurves->set_tooltip_text (M("TP_COLORTONING_NEUTRALCUR_TIP"));
neutralcurvesconn = neutralCurves->signal_pressed().connect( sigc::mem_fun(*this, &ColorToning::neutralCurves_pressed) );
@@ -249,26 +249,26 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR
Gtk::Box* chanMixerMidBox = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL));
Gtk::Box* chanMixerShadowsBox = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL));
- Gtk::Image* iblueR = Gtk::manage (new RTImage ("circle-blue-small.png"));
- Gtk::Image* iyelL = Gtk::manage (new RTImage ("circle-yellow-small.png"));
- Gtk::Image* imagL = Gtk::manage (new RTImage ("circle-magenta-small.png"));
- Gtk::Image* igreenR = Gtk::manage (new RTImage ("circle-green-small.png"));
- Gtk::Image* icyanL = Gtk::manage (new RTImage ("circle-blue-small.png"));
- Gtk::Image* iredR = Gtk::manage (new RTImage ("circle-red-small.png"));
+ Gtk::Image* iblueR = Gtk::manage (new RTImage ("circle-blue-small"));
+ Gtk::Image* iyelL = Gtk::manage (new RTImage ("circle-yellow-small"));
+ Gtk::Image* imagL = Gtk::manage (new RTImage ("circle-magenta-small"));
+ Gtk::Image* igreenR = Gtk::manage (new RTImage ("circle-green-small"));
+ Gtk::Image* icyanL = Gtk::manage (new RTImage ("circle-blue-small"));
+ Gtk::Image* iredR = Gtk::manage (new RTImage ("circle-red-small"));
- Gtk::Image* iblueRm = Gtk::manage (new RTImage ("circle-blue-small.png"));
- Gtk::Image* iyelLm = Gtk::manage (new RTImage ("circle-yellow-small.png"));
- Gtk::Image* imagLm = Gtk::manage (new RTImage ("circle-magenta-small.png"));
- Gtk::Image* igreenRm = Gtk::manage (new RTImage ("circle-green-small.png"));
- Gtk::Image* icyanLm = Gtk::manage (new RTImage ("circle-blue-small.png"));
- Gtk::Image* iredRm = Gtk::manage (new RTImage ("circle-red-small.png"));
+ Gtk::Image* iblueRm = Gtk::manage (new RTImage ("circle-blue-small"));
+ Gtk::Image* iyelLm = Gtk::manage (new RTImage ("circle-yellow-small"));
+ Gtk::Image* imagLm = Gtk::manage (new RTImage ("circle-magenta-small"));
+ Gtk::Image* igreenRm = Gtk::manage (new RTImage ("circle-green-small"));
+ Gtk::Image* icyanLm = Gtk::manage (new RTImage ("circle-blue-small"));
+ Gtk::Image* iredRm = Gtk::manage (new RTImage ("circle-red-small"));
- Gtk::Image* iblueRh = Gtk::manage (new RTImage ("circle-blue-small.png"));
- Gtk::Image* iyelLh = Gtk::manage (new RTImage ("circle-yellow-small.png"));
- Gtk::Image* imagLh = Gtk::manage (new RTImage ("circle-magenta-small.png"));
- Gtk::Image* igreenRh = Gtk::manage (new RTImage ("circle-green-small.png"));
- Gtk::Image* icyanLh = Gtk::manage (new RTImage ("circle-blue-small.png"));
- Gtk::Image* iredRh = Gtk::manage (new RTImage ("circle-red-small.png"));
+ Gtk::Image* iblueRh = Gtk::manage (new RTImage ("circle-blue-small"));
+ Gtk::Image* iyelLh = Gtk::manage (new RTImage ("circle-yellow-small"));
+ Gtk::Image* imagLh = Gtk::manage (new RTImage ("circle-magenta-small"));
+ Gtk::Image* igreenRh = Gtk::manage (new RTImage ("circle-green-small"));
+ Gtk::Image* icyanLh = Gtk::manage (new RTImage ("circle-blue-small"));
+ Gtk::Image* iredRh = Gtk::manage (new RTImage ("circle-red-small"));
redhigh = Gtk::manage (new Adjuster ("", -100., 100., 1., 0., icyanLh, iredRh ));
greenhigh = Gtk::manage (new Adjuster ("", -100., 100., 1., 0., imagLh , igreenRh));
@@ -299,7 +299,7 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR
chanMixerHLFrame->set_label_align (0.025, 0.5);
chanMixerMidFrame->set_label_align (0.025, 0.5);
chanMixerShadowsFrame->set_label_align (0.025, 0.5);
-
+
chanMixerHLFrame->add(*chanMixerHLBox);
chanMixerMidFrame->add(*chanMixerMidBox);
chanMixerShadowsFrame->add(*chanMixerShadowsBox);
@@ -393,23 +393,23 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR
hb->pack_start(*labRegionList, Gtk::PACK_EXPAND_WIDGET);
Gtk::Box* vb = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL));
labRegionAdd = Gtk::manage(new Gtk::Button());
- labRegionAdd->add(*Gtk::manage(new RTImage("add-small.png")));
+ labRegionAdd->add(*Gtk::manage(new RTImage("add-small", Gtk::ICON_SIZE_BUTTON)));
labRegionAdd->signal_clicked().connect(sigc::mem_fun(*this, &ColorToning::labRegionAddPressed));
add_button(labRegionAdd, vb);
labRegionRemove = Gtk::manage(new Gtk::Button());
- labRegionRemove->add(*Gtk::manage(new RTImage("remove-small.png")));
+ labRegionRemove->add(*Gtk::manage(new RTImage("remove-small", Gtk::ICON_SIZE_BUTTON)));
labRegionRemove->signal_clicked().connect(sigc::mem_fun(*this, &ColorToning::labRegionRemovePressed));
add_button(labRegionRemove, vb);
labRegionUp = Gtk::manage(new Gtk::Button());
- labRegionUp->add(*Gtk::manage(new RTImage("arrow-up-small.png")));
+ labRegionUp->add(*Gtk::manage(new RTImage("arrow-up-small", Gtk::ICON_SIZE_BUTTON)));
labRegionUp->signal_clicked().connect(sigc::mem_fun(*this, &ColorToning::labRegionUpPressed));
add_button(labRegionUp, vb);
labRegionDown = Gtk::manage(new Gtk::Button());
- labRegionDown->add(*Gtk::manage(new RTImage("arrow-down-small.png")));
+ labRegionDown->add(*Gtk::manage(new RTImage("arrow-down-small", Gtk::ICON_SIZE_BUTTON)));
labRegionDown->signal_clicked().connect(sigc::mem_fun(*this, &ColorToning::labRegionDownPressed));
add_button(labRegionDown, vb);
labRegionCopy = Gtk::manage(new Gtk::Button());
- labRegionCopy->add(*Gtk::manage(new RTImage("arrow-right-small.png")));
+ labRegionCopy->add(*Gtk::manage(new RTImage("arrow-right-small", Gtk::ICON_SIZE_BUTTON)));
labRegionCopy->signal_clicked().connect(sigc::mem_fun(*this, &ColorToning::labRegionCopyPressed));
add_button(labRegionCopy, vb);
hb->pack_start(*vb, Gtk::PACK_SHRINK);
@@ -717,7 +717,7 @@ void ColorToning::write (ProcParams* pp, ParamsEdited* pedited)
pp->colorToning.strength = strength->getIntValue();
double zerox = 0.;
double zeroy = 0.;
-
+
labgrid->getParams(pp->colorToning.labgridALow, pp->colorToning.labgridBLow, pp->colorToning.labgridAHigh, pp->colorToning.labgridBHigh, zerox, zeroy, zerox, zeroy);
pp->colorToning.labgridALow *= ColorToningParams::LABGRID_CORR_MAX;
pp->colorToning.labgridAHigh *= ColorToningParams::LABGRID_CORR_MAX;
@@ -1570,7 +1570,7 @@ void ColorToning::labRegionShow(int idx, bool list_only)
disableListener();
}
rtengine::procparams::ColorToningParams::LabCorrectionRegion dflt;
- auto &r = labRegionData[idx];
+ auto &r = labRegionData[idx];
if (!list_only) {
labRegionAB->setParams(0, 0, r.a, r.b,0, 0, 0, 0, false);
labRegionSaturation->setValue(r.saturation);
diff --git a/rtgui/controllines.cc b/rtgui/controllines.cc
index d28ef12ca..3ef144295 100644
--- a/rtgui/controllines.cc
+++ b/rtgui/controllines.cc
@@ -92,14 +92,14 @@ ControlLineManager::ControlLineManager():
canvas_area->topLeft = Coord(0, 0);
mouseOverGeometry.push_back(canvas_area.get());
- line_icon_h = Cairo::RefPtr(new RTSurface(
- "bidirectional-arrow-horizontal-hicontrast.png"));
- line_icon_v = Cairo::RefPtr(new RTSurface(
- "bidirectional-arrow-vertical-hicontrast.png"));
- line_icon_h_prelight = Cairo::RefPtr(new RTSurface(
- "bidirectional-arrow-horizontal-prelight.png"));
- line_icon_v_prelight = Cairo::RefPtr(new RTSurface(
- "bidirectional-arrow-vertical-prelight.png"));
+ line_icon_h = std::shared_ptr(new RTSurface(
+ "bidirectional-arrow-horizontal-hicontrast", Gtk::ICON_SIZE_BUTTON));
+ line_icon_v = std::shared_ptr(new RTSurface(
+ "bidirectional-arrow-vertical-hicontrast", Gtk::ICON_SIZE_BUTTON));
+ line_icon_h_prelight = std::shared_ptr(new RTSurface(
+ "bidirectional-arrow-horizontal-prelight", Gtk::ICON_SIZE_BUTTON));
+ line_icon_v_prelight = std::shared_ptr(new RTSurface(
+ "bidirectional-arrow-vertical-prelight", Gtk::ICON_SIZE_BUTTON));
}
ControlLineManager::~ControlLineManager() = default;
@@ -438,8 +438,8 @@ void ControlLineManager::addLine(Coord begin, Coord end,
line->begin = begin;
line->end = end;
- const Cairo::RefPtr null_surface =
- Cairo::RefPtr(nullptr);
+ const std::shared_ptr null_surface =
+ std::shared_ptr(nullptr);
icon_h = std::make_shared(line_icon_h, null_surface,
line_icon_h_prelight,
diff --git a/rtgui/controllines.h b/rtgui/controllines.h
index 9e850da1c..e440f838f 100644
--- a/rtgui/controllines.h
+++ b/rtgui/controllines.h
@@ -60,8 +60,8 @@ protected:
bool drawing_line;
bool edited;
std::size_t horizontalCount, verticalCount;
- Cairo::RefPtr line_icon_h, line_icon_v;
- Cairo::RefPtr line_icon_h_prelight, line_icon_v_prelight;
+ std::shared_ptr line_icon_h, line_icon_v;
+ std::shared_ptr line_icon_h_prelight, line_icon_v_prelight;
int prev_obj;
int selected_object;
diff --git a/rtgui/controlspotpanel.cc b/rtgui/controlspotpanel.cc
index 400309512..1e986eed7 100644
--- a/rtgui/controlspotpanel.cc
+++ b/rtgui/controlspotpanel.cc
@@ -72,14 +72,14 @@ ControlSpotPanel::ControlSpotPanel():
struc_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_THRES"), 1.0, 12.0, 0.1, 4.0))),
thresh_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_THRESDELTAE"), 0.0, 10.0, 0.1, 2.0))),
iter_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_PROXI"), 0.2, 10.0, 0.1, 2.0))),
- balan_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BALAN"), 0.2, 2.5, 0.1, 1.0, Gtk::manage(new RTImage("rawtherapee-logo-16.png")), Gtk::manage(new RTImage("circle-white-small.png"))))),
- balanh_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BALANH"), 0.2, 2.5, 0.1, 1.0, Gtk::manage(new RTImage("rawtherapee-logo-16.png")), Gtk::manage(new RTImage("circle-red-green-small.png"))))),
- colorde_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_COLORDE"), -15, 15, 2, 5, Gtk::manage(new RTImage("circle-blue-yellow-small.png")), Gtk::manage(new RTImage("circle-gray-green-small.png"))))),
+ balan_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BALAN"), 0.2, 2.5, 0.1, 1.0, Gtk::manage(new RTImage("rawtherapee")), Gtk::manage(new RTImage("circle-white-small"))))),
+ balanh_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BALANH"), 0.2, 2.5, 0.1, 1.0, Gtk::manage(new RTImage("rawtherapee")), Gtk::manage(new RTImage("circle-red-green-small"))))),
+ colorde_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_COLORDE"), -15, 15, 2, 5, Gtk::manage(new RTImage("circle-blue-yellow-small")), Gtk::manage(new RTImage("circle-gray-green-small"))))),
colorscope_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_COLORSCOPE"), 0., 100.0, 1., 30.))),
avoidrad_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_AVOIDRAD"), 0., 30.0, 0.1, 0.7))),
scopemask_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SCOPEMASK"), 0, 100, 1, 60))),
denoichmask_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_DENOIMASK"), 0., 100., 0.5, 0))),
- lumask_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LUMASK"), -50, 30, 1, 10, Gtk::manage(new RTImage("circle-yellow-small.png")), Gtk::manage(new RTImage("circle-gray-small.png")) ))),
+ lumask_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LUMASK"), -50, 30, 1, 10, Gtk::manage(new RTImage("circle-yellow-small")), Gtk::manage(new RTImage("circle-gray-small")) ))),
hishow_(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_PREVSHOW")))),
activ_(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ACTIVSPOT")))),
@@ -121,7 +121,7 @@ ControlSpotPanel::ControlSpotPanel():
prevMethodconn_ = prevMethod_->signal_changed().connect(
sigc::mem_fun(
*this, &ControlSpotPanel::prevMethodChanged));
-
+
// ctboxprevmethod->pack_start(*prevMethod_);
pack_start(*ctboxprevmethod);
@@ -253,7 +253,7 @@ ControlSpotPanel::ControlSpotPanel():
sensiexclu_->setAdjusterListener(this);
structexclu_->setAdjusterListener(this);
structexclu_->setLogScale(10, 0);
-
+
excluBox->pack_start(*sensiexclu_);
excluBox->pack_start(*structexclu_);
excluFrame->add(*excluBox);
@@ -385,7 +385,7 @@ ControlSpotPanel::ControlSpotPanel():
expShapeDetect_->add(*artifBox, false);
pack_start(*expShapeDetect_, false, false);
ToolParamBlock* const artifBox2 = Gtk::manage(new ToolParamBlock());
-
+
artifBox2->pack_start(*preview_);
artifBox2->pack_start(*colorscope_);
pack_start(*artifBox2);
@@ -401,7 +401,7 @@ ControlSpotPanel::ControlSpotPanel():
sigc::mem_fun(*this, &ControlSpotPanel::avoidChanged));
avoidmunConn_ = avoidmun_->signal_toggled().connect(
sigc::mem_fun(*this, &ControlSpotPanel::avoidmunChanged));
-
+
Gtk::Frame* const avFrame = Gtk::manage(new Gtk::Frame());
ToolParamBlock* const avbox = Gtk::manage(new ToolParamBlock());
avFrame->set_label_align(0.025, 0.5);
@@ -455,7 +455,7 @@ ControlSpotPanel::ControlSpotPanel():
ctboxwavmethod->pack_start(*wavMethod_);
specCaseBox->pack_start(*ctboxwavmethod);
-
+
expSpecCases_->add(*specCaseBox, false);
pack_start(*expSpecCases_, false, false);
@@ -1297,7 +1297,7 @@ void ControlSpotPanel::updateParamVisibility()
ctboxshape->show();
}
-
+
}
void ControlSpotPanel::adjusterChanged(Adjuster* a, double newval)
diff --git a/rtgui/crop.cc b/rtgui/crop.cc
index 853cec255..bf26dcc63 100644
--- a/rtgui/crop.cc
+++ b/rtgui/crop.cc
@@ -174,12 +174,12 @@ Crop::Crop():
selectCrop = Gtk::manage (new Gtk::Button (M("TP_CROP_SELECTCROP")));
setExpandAlignProperties(selectCrop, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
selectCrop->get_style_context()->add_class("independent");
- selectCrop->set_image (*Gtk::manage (new RTImage ("crop-small.png")));
+ selectCrop->set_image (*Gtk::manage (new RTImage ("crop-small", Gtk::ICON_SIZE_BUTTON)));
resetCrop = Gtk::manage (new Gtk::Button (M("TP_CROP_RESETCROP")));
setExpandAlignProperties(resetCrop, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
resetCrop->get_style_context()->add_class("independent");
- resetCrop->set_image (*Gtk::manage (new RTImage ("undo-small.png")));
+ resetCrop->set_image (*Gtk::manage (new RTImage ("undo-small", Gtk::ICON_SIZE_BUTTON)));
methodgrid->attach (*xlab, 0, 0, 1, 1);
methodgrid->attach (*x, 1, 0, 1, 1);
@@ -592,11 +592,11 @@ void Crop::doresetCrop ()
yDirty = true;
wDirty = true;
hDirty = true;
-
+
// Reset ratio, ratio lock and orientation as well
ratio->set_active(0);
orientation->set_active(2);
- fixr->set_active(true);
+ fixr->set_active(true);
int X = 0;
int Y = 0;
diff --git a/rtgui/cropwindow.cc b/rtgui/cropwindow.cc
index c7d7348b3..a5f332f9f 100644
--- a/rtgui/cropwindow.cc
+++ b/rtgui/cropwindow.cc
@@ -64,7 +64,21 @@ CropWindow::CropWindow (ImageArea* parent, bool isLowUpdatePriority_, bool isDet
Glib::RefPtr context = parent->get_pango_context () ;
Pango::FontDescription fontd = context->get_font_description ();
fontd.set_weight (Pango::WEIGHT_BOLD);
- fontd.set_size(8 * Pango::SCALE);
+ // Absolute size is defined in "Pango units" and shall be multiplied by
+ // Pango::SCALE from "px"
+ const int fontSize = 8;
+ const int absoluteFontSize = fontSize * Pango::SCALE;
+ // Guessing that absolute pixel size is given for a 96 DPI reference:
+#ifndef __APPLE__
+ const double fontScale = static_cast(RTScalable::getDPI())
+ / static_cast(RTScalable::pangoDPI)
+ * RTScalable::getScale(); // Refer to notes in rtscalable.h
+#else
+ // On MacOS, font is already scaled by the System library
+ // Refer to https://gitlab.gnome.org/GNOME/gtk/-/blob/gtk-3-24/gdk/quartz/gdkscreen-quartz.c
+ const double fontScale = 1.;
+#endif
+ fontd.set_absolute_size (static_cast(absoluteFontSize) * fontScale);
context->set_font_description (fontd);
Glib::RefPtr cllayout = parent->create_pango_layout("1000%");
@@ -80,11 +94,11 @@ CropWindow::CropWindow (ImageArea* parent, bool isLowUpdatePriority_, bool isDet
closett = "Close";
initialized = true;
}
- bZoomOut = new LWButton(Cairo::RefPtr(new RTSurface("magnifier-minus-small.png")), 0, nullptr, LWButton::Left, LWButton::Center, &zoomOuttt);
- bZoomIn = new LWButton(Cairo::RefPtr(new RTSurface("magnifier-plus-small.png")), 1, nullptr, LWButton::Left, LWButton::Center, &zoomIntt);
- bZoom100 = new LWButton(Cairo::RefPtr(new RTSurface("magnifier-1to1-small.png")), 2, nullptr, LWButton::Left, LWButton::Center, &zoom100tt);
- //bZoomFit = new LWButton (Cairo::RefPtr(new RTSurface("magnifier-fit.png")), 3, NULL, LWButton::Left, LWButton::Center, "Zoom Fit");
- bClose = new LWButton(Cairo::RefPtr(new RTSurface("cancel-small.png")), 4, nullptr, LWButton::Right, LWButton::Center, &closett);
+ bZoomOut = new LWButton(std::shared_ptr(new RTSurface("magnifier-minus-small", Gtk::ICON_SIZE_BUTTON)), 0, nullptr, LWButton::Left, LWButton::Center, &zoomOuttt);
+ bZoomIn = new LWButton(std::shared_ptr(new RTSurface("magnifier-plus-small", Gtk::ICON_SIZE_BUTTON)), 1, nullptr, LWButton::Left, LWButton::Center, &zoomIntt);
+ bZoom100 = new LWButton(std::shared_ptr(new RTSurface("magnifier-1to1-small", Gtk::ICON_SIZE_BUTTON)), 2, nullptr, LWButton::Left, LWButton::Center, &zoom100tt);
+ //bZoomFit = new LWButton (std::shared_ptr(new RTSurface("magnifier-fit", Gtk::ICON_SIZE_BUTTON)), 3, NULL, LWButton::Left, LWButton::Center, "Zoom Fit");
+ bClose = new LWButton(std::shared_ptr(new RTSurface("cancel-small", Gtk::ICON_SIZE_BUTTON)), 4, nullptr, LWButton::Right, LWButton::Center, &closett);
buttonSet.add (bZoomOut);
buttonSet.add (bZoomIn);
@@ -2451,7 +2465,21 @@ void CropWindow::drawDecoration (Cairo::RefPtr cr)
Glib::RefPtr context = iarea->get_pango_context () ;
Pango::FontDescription fontd = context->get_font_description ();
fontd.set_weight (Pango::WEIGHT_BOLD);
- fontd.set_size(8 * Pango::SCALE);
+ // Absolute size is defined in "Pango units" and shall be multiplied by
+ // Pango::SCALE from "px"
+ const int fontSize = 8;
+ const int absoluteFontSize = fontSize * Pango::SCALE;
+ // Guessing that absolute pixel size is given for a 96 DPI reference:
+#ifndef __APPLE__
+ const double fontScale = static_cast(RTScalable::getDPI())
+ / static_cast(RTScalable::pangoDPI)
+ * RTScalable::getScale(); // Refer to notes in rtscalable.h
+#else
+ // On MacOS, font is already scaled by the System library
+ // Refer to https://gitlab.gnome.org/GNOME/gtk/-/blob/gtk-3-24/gdk/quartz/gdkscreen-quartz.c
+ const double fontScale = 1.;
+#endif
+ fontd.set_absolute_size (static_cast(absoluteFontSize) * fontScale);
context->set_font_description (fontd);
Glib::RefPtr cllayout = iarea->create_pango_layout(cropLabel);
int iw, ih;
@@ -2515,7 +2543,21 @@ void CropWindow::drawStraightenGuide (Cairo::RefPtr cr)
Glib::RefPtr context = iarea->get_pango_context () ;
Pango::FontDescription fontd = context->get_font_description ();
fontd.set_weight (Pango::WEIGHT_BOLD);
- fontd.set_size (8 * Pango::SCALE);
+ // Absolute size is defined in "Pango units" and shall be multiplied by
+ // Pango::SCALE from "px"
+ const int fontSize = 8;
+ const int absoluteFontSize = fontSize * Pango::SCALE;
+ // Guessing that absolute pixel size is given for a 96 DPI reference:
+#ifndef __APPLE__
+ const double fontScale = static_cast(RTScalable::getDPI())
+ / static_cast(RTScalable::pangoDPI)
+ * RTScalable::getScale(); // Refer to notes in rtscalable.h
+#else
+ // On MacOS, font is already scaled by the System library
+ // Refer to https://gitlab.gnome.org/GNOME/gtk/-/blob/gtk-3-24/gdk/quartz/gdkscreen-quartz.c
+ const double fontScale = 1.;
+#endif
+ fontd.set_absolute_size (static_cast(absoluteFontSize) * fontScale);
context->set_font_description (fontd);
Glib::RefPtr deglayout = iarea->create_pango_layout(Glib::ustring::compose ("%1 deg", Glib::ustring::format(std::setprecision(2), rot_deg)));
diff --git a/rtgui/cursormanager.cc b/rtgui/cursormanager.cc
index e915150aa..f683e9964 100644
--- a/rtgui/cursormanager.cc
+++ b/rtgui/cursormanager.cc
@@ -17,8 +17,7 @@
* along with RawTherapee. If not, see .
*/
#include "cursormanager.h"
-
-#include "rtimage.h"
+#include "rtsurface.h"
CursorManager mainWindowCursorManager;
CursorManager editWindowCursorManager;
@@ -35,74 +34,46 @@ void CursorManager::init (Glib::RefPtr mainWindow)
#endif
- Glib::RefPtr add = RTImage::createPixbufFromFile("crosshair-small.png");
- Glib::RefPtr colPick = RTImage::createPixbufFromFile("color-picker-hicontrast.png");
- Glib::RefPtr colPickAdd = RTImage::createPixbufFromFile("color-picker-add-hicontrast.png");
- Glib::RefPtr cropDraw = RTImage::createPixbufFromFile("crop-point-hicontrast.png");
- Glib::RefPtr crosshair = RTImage::createPixbufFromFile("crosshair-hicontrast.png");
- Glib::RefPtr empty = RTImage::createPixbufFromFile("empty.png");
- Glib::RefPtr handClosed = RTImage::createPixbufFromFile("hand-closed-hicontrast.png");
- Glib::RefPtr handOpen = RTImage::createPixbufFromFile("hand-open-hicontrast.png");
- Glib::RefPtr moveBL = RTImage::createPixbufFromFile("node-move-sw-ne-hicontrast.png");
- Glib::RefPtr moveBR = RTImage::createPixbufFromFile("node-move-nw-se-hicontrast.png");
- Glib::RefPtr moveL = RTImage::createPixbufFromFile("node-move-x-hicontrast.png");
- Glib::RefPtr moveR = RTImage::createPixbufFromFile("node-move-x-hicontrast.png");
- Glib::RefPtr moveTL = RTImage::createPixbufFromFile("node-move-nw-se-hicontrast.png");
- Glib::RefPtr moveTR = RTImage::createPixbufFromFile("node-move-sw-ne-hicontrast.png");
- Glib::RefPtr moveX = RTImage::createPixbufFromFile("node-move-x-hicontrast.png");
- Glib::RefPtr moveXY = RTImage::createPixbufFromFile("node-move-xy-hicontrast.png");
- Glib::RefPtr moveY = RTImage::createPixbufFromFile("node-move-y-hicontrast.png");
- Glib::RefPtr rotate = RTImage::createPixbufFromFile("rotate-aroundnode-hicontrast.png");
- Glib::RefPtr wait = RTImage::createPixbufFromFile("gears.png"); // Currently unused, create *-hicontrast once used.
+ auto createCursor = [this] (const Glib::ustring &name, const Gdk::CursorType &fb_cursor) -> Glib::RefPtr
+ {
+ // Gdk Cursor Theme is not supported on some OS (ex : MacOS)
+ // Cursor is retrieved from theme thanks to an RTSurface
+ auto cursor_surf = RTSurface(name, Gtk::ICON_SIZE_MENU);
+ auto cursor = Gdk::Cursor::create(this->display,
+ cursor_surf.get(),
+ cursor_surf.getWidth() / 2,
+ cursor_surf.getHeight() / 2);
- double s = RTScalable::getTweakedDPI() / RTScalable::baseDPI; // RTScalable::getDPI() might be preferable, however it imply a lot of work to support this option
+ if (!cursor) {
+ cursor = Gdk::Cursor::create(this->display, fb_cursor);
+ }
- cAdd = add ? Gdk::Cursor::create(display, add, (int)(8.*s), (int)(8.*s)) : Gdk::Cursor::create(display, Gdk::PLUS);
- cAddPicker = colPickAdd ? Gdk::Cursor::create(display, colPickAdd, (int)(4.*s), (int)(21.*s)) : Gdk::Cursor::create(display, Gdk::PLUS);
- cCropDraw = cropDraw ? Gdk::Cursor::create(display, cropDraw, (int)(3.*s), (int)(3.*s)) : Gdk::Cursor::create(display, Gdk::DIAMOND_CROSS);
- cCrosshair = crosshair ? Gdk::Cursor::create(display, crosshair, (int)(12.*s), (int)(12.*s)) : Gdk::Cursor::create(display, Gdk::CROSSHAIR);
- cEmpty = empty ? Gdk::Cursor::create(display, empty, 12, 12) /* PNG: do not scale */ : Gdk::Cursor::create(display, Gdk::BLANK_CURSOR);
- cHandClosed = handClosed ? Gdk::Cursor::create(display, handClosed, (int)(12.*s), (int)(12.*s)) : Gdk::Cursor::create(display, Gdk::HAND1);
- cHandOpen = handOpen ? Gdk::Cursor::create(display, handOpen, (int)(12.*s), (int)(12.*s)) : Gdk::Cursor::create(display, Gdk::HAND2);
- cMoveBL = moveBL ? Gdk::Cursor::create(display, moveBL, (int)(12.*s), (int)(12.*s)) : Gdk::Cursor::create(display, Gdk::BOTTOM_LEFT_CORNER);
- cMoveBR = moveBR ? Gdk::Cursor::create(display, moveBR, (int)(12.*s), (int)(12.*s)) : Gdk::Cursor::create(display, Gdk::BOTTOM_RIGHT_CORNER);
- cMoveL = moveL ? Gdk::Cursor::create(display, moveL, (int)(12.*s), (int)(12.*s)) : Gdk::Cursor::create(display, Gdk::SB_LEFT_ARROW);
- cMoveR = moveR ? Gdk::Cursor::create(display, moveR, (int)(12.*s), (int)(12.*s)) : Gdk::Cursor::create(display, Gdk::SB_RIGHT_ARROW);
- cMoveTL = moveTL ? Gdk::Cursor::create(display, moveTL, (int)(12.*s), (int)(12.*s)) : Gdk::Cursor::create(display, Gdk::TOP_LEFT_CORNER);
- cMoveTR = moveTR ? Gdk::Cursor::create(display, moveTR, (int)(12.*s), (int)(12.*s)) : Gdk::Cursor::create(display, Gdk::TOP_RIGHT_CORNER);
- cMoveX = moveX ? Gdk::Cursor::create(display, moveX, (int)(12.*s), (int)(12.*s)) : Gdk::Cursor::create(display, Gdk::SB_H_DOUBLE_ARROW);
- cMoveXY = moveXY ? Gdk::Cursor::create(display, moveXY, (int)(12.*s), (int)(12.*s)) : Gdk::Cursor::create(display, Gdk::FLEUR);
- cMoveY = moveY ? Gdk::Cursor::create(display, moveY, (int)(12.*s), (int)(12.*s)) : Gdk::Cursor::create(display, Gdk::SB_V_DOUBLE_ARROW);
- cRotate = rotate ? Gdk::Cursor::create(display, rotate, (int)(12.*s), (int)(12.*s)) : Gdk::Cursor::create(display, Gdk::EXCHANGE);
- cWB = colPick ? Gdk::Cursor::create(display, colPick, (int)(4.*s), (int)(21.*s)) : Gdk::Cursor::create(display, Gdk::TARGET);
- cWait = wait ? Gdk::Cursor::create(display, wait, (int)(12.*s), (int)(12.*s)) : Gdk::Cursor::create(display, Gdk::CLOCK);
+ return cursor;
+ };
+
+ cAdd = createCursor("crosshair-small", Gdk::PLUS);
+ cAddPicker = createCursor("color-picker-add-hicontrast", Gdk::PLUS);
+ cCropDraw = createCursor("crop-point-hicontrast", Gdk::DIAMOND_CROSS);
+ cCrosshair = createCursor("crosshair-hicontrast", Gdk::CROSSHAIR);
+ cEmpty = createCursor("empty", Gdk::BLANK_CURSOR);
+ cHandClosed = createCursor("hand-closed-hicontrast", Gdk::HAND1);
+ cHandOpen = createCursor("hand-open-hicontrast", Gdk::HAND2);
+ cMoveBL = createCursor("node-move-sw-ne-hicontrast", Gdk::BOTTOM_LEFT_CORNER);
+ cMoveBR = createCursor("node-move-nw-se-hicontrast", Gdk::BOTTOM_RIGHT_CORNER);
+ cMoveL = createCursor("node-move-x-hicontrast", Gdk::SB_LEFT_ARROW);
+ cMoveR = createCursor("node-move-x-hicontrast", Gdk::SB_RIGHT_ARROW);
+ cMoveTL = createCursor("node-move-nw-se-hicontrast", Gdk::TOP_LEFT_CORNER);
+ cMoveTR = createCursor("node-move-sw-ne-hicontrast", Gdk::TOP_RIGHT_CORNER);
+ cMoveX = createCursor("node-move-x-hicontrast", Gdk::SB_H_DOUBLE_ARROW);
+ cMoveXY = createCursor("node-move-xy-hicontrast", Gdk::FLEUR);
+ cMoveY = createCursor("node-move-y-hicontrast", Gdk::SB_V_DOUBLE_ARROW);
+ cRotate = createCursor("rotate-aroundnode-hicontrast", Gdk::EXCHANGE);
+ cWB = createCursor("color-picker-hicontrast", Gdk::TARGET);
+ cWait = createCursor("gears", Gdk::CLOCK);
window = mainWindow;
}
-void CursorManager::cleanup()
-{
- cAdd.reset();
- cAddPicker.reset();
- cCropDraw.reset();
- cCrosshair.reset();
- cHandClosed.reset();
- cHandOpen.reset();
- cEmpty.reset();
- cMoveBL.reset();
- cMoveBR.reset();
- cMoveL.reset();
- cMoveR.reset();
- cMoveTL.reset();
- cMoveTR.reset();
- cMoveX.reset();
- cMoveY.reset();
- cMoveXY.reset();
- cRotate.reset();
- cWB.reset();
- cWait.reset();
-}
-
/* Set the cursor of the given window */
void CursorManager::setCursor (Glib::RefPtr window, CursorShape shape)
{
diff --git a/rtgui/cursormanager.h b/rtgui/cursormanager.h
index 38f198e32..8b506bb1d 100644
--- a/rtgui/cursormanager.h
+++ b/rtgui/cursormanager.h
@@ -81,7 +81,6 @@ private:
public:
void init (Glib::RefPtr mainWindow);
- void cleanup ();
static void setWidgetCursor (Glib::RefPtr window, CursorShape shape);
static void setCursorOfMainWindow (Glib::RefPtr window, CursorShape shape);
};
diff --git a/rtgui/curveeditor.cc b/rtgui/curveeditor.cc
index 67cea5174..efe2ef200 100644
--- a/rtgui/curveeditor.cc
+++ b/rtgui/curveeditor.cc
@@ -75,11 +75,11 @@ bool CurveEditor::reset()
DiagonalCurveEditor::DiagonalCurveEditor (Glib::ustring text, CurveEditorGroup* ceGroup, CurveEditorSubGroup* ceSubGroup) : CurveEditor::CurveEditor(text, static_cast(ceGroup), ceSubGroup)
{
- curveType->addEntry("curve-linear-small.png", M("CURVEEDITOR_LINEAR")); // 0 Linear
- curveType->addEntry("curve-spline-small.png", M("CURVEEDITOR_CUSTOM")); // 1 Spline
- curveType->addEntry("curve-catmullrom-small.png", M("CURVEEDITOR_CATMULLROM")); // 4 CatmullRom
- curveType->addEntry("curve-parametric-small.png", M("CURVEEDITOR_PARAMETRIC")); // 2 Parametric
- curveType->addEntry("curve-nurbs-small.png", M("CURVEEDITOR_NURBS")); // 3 NURBS
+ curveType->addEntry("curve-linear-small", M("CURVEEDITOR_LINEAR")); // 0 Linear
+ curveType->addEntry("curve-spline-small", M("CURVEEDITOR_CUSTOM")); // 1 Spline
+ curveType->addEntry("curve-catmullrom-small", M("CURVEEDITOR_CATMULLROM")); // 4 CatmullRom
+ curveType->addEntry("curve-parametric-small", M("CURVEEDITOR_PARAMETRIC")); // 2 Parametric
+ curveType->addEntry("curve-nurbs-small", M("CURVEEDITOR_NURBS")); // 3 NURBS
static_cast(curveType)->setPosIndexMap({ 0, 1, 4, 2, 3 });
curveType->setSelected(DCT_Linear);
@@ -199,8 +199,8 @@ FlatCurveEditor::FlatCurveEditor (Glib::ustring text, CurveEditorGroup* ceGroup,
identityValue = 0.5;
// Order set in the same order than "enum FlatCurveType". Shouldn't change, for compatibility reason
- curveType->addEntry("curve-flat-small.png", M("CURVEEDITOR_LINEAR")); // 0 Linear
- curveType->addEntry("curve-controlpoints-small.png", M("CURVEEDITOR_MINMAXCPOINTS")); // 1 Min/Max ControlPoints
+ curveType->addEntry("curve-flat-small", M("CURVEEDITOR_LINEAR")); // 0 Linear
+ curveType->addEntry("curve-controlpoints-small", M("CURVEEDITOR_MINMAXCPOINTS")); // 1 Min/Max ControlPoints
curveType->setSelected(FCT_Linear);
curveType->show();
}
diff --git a/rtgui/curveeditorgroup.cc b/rtgui/curveeditorgroup.cc
index d099e1a99..f348ac33b 100644
--- a/rtgui/curveeditorgroup.cc
+++ b/rtgui/curveeditorgroup.cc
@@ -28,6 +28,7 @@
#include "rtimage.h"
#include "options.h"
#include "pathutils.h"
+#include "rtscalable.h"
CurveEditorGroup::CurveEditorGroup (Glib::ustring& curveDir, Glib::ustring groupLabel, int blank) : curveDir(curveDir), line(0), curve_reset(nullptr),
displayedCurve(nullptr), flatSubGroup(nullptr), diagonalSubGroup(nullptr), cl(nullptr), numberOfPackedCurve(0)
@@ -39,9 +40,9 @@ CurveEditorGroup::CurveEditorGroup (Glib::ustring& curveDir, Glib::ustring group
} else if(blank == 1){
curveGroupLabel = Gtk::manage (new Gtk::Label (groupLabel, Gtk::ALIGN_START));
}
-
+
setExpandAlignProperties(curveGroupLabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
- set_row_spacing(RTScalable::getScale());
+ set_row_spacing(RTScalable::scalePixelSize(1));
}
CurveEditorGroup::~CurveEditorGroup()
@@ -129,7 +130,7 @@ void CurveEditorGroup::newLine()
if (curveEditors.size() > numberOfPackedCurve) {
Gtk::Grid* currLine = Gtk::manage (new Gtk::Grid ());
setExpandAlignProperties(currLine, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
- currLine->set_column_spacing(RTScalable::getScale());
+ currLine->set_column_spacing(RTScalable::scalePixelSize(1));
bool isHeader = false;
int x = 0;
@@ -162,7 +163,7 @@ void CurveEditorGroup::newLine()
if (isHeader) {
curve_reset = Gtk::manage (new Gtk::Button ());
setExpandAlignProperties(curve_reset, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL);
- curve_reset->add (*Gtk::manage (new RTImage ("undo-small.png", "redo-small.png")));
+ curve_reset->add (*Gtk::manage (new RTImage ("undo-small", Gtk::ICON_SIZE_BUTTON)));
curve_reset->set_relief (Gtk::RELIEF_NONE);
curve_reset->set_tooltip_text (M("CURVEEDITOR_TOOLTIPLINEAR"));
curve_reset->signal_clicked().connect( sigc::mem_fun(*this, &CurveEditorGroup::curveResetPressed) );
@@ -381,7 +382,7 @@ void CurveEditorGroup::setTooltip( Glib::ustring ttip)
void CurveEditorGroup::setBatchMode (bool batchMode)
{
for (std::vector::iterator i = curveEditors.begin(); i != curveEditors.end(); ++i) {
- (*i)->curveType->addEntry("template-24.png", M("GENERAL_UNCHANGED"));
+ (*i)->curveType->addEntry("template-24", M("GENERAL_UNCHANGED"));
(*i)->curveType->show();
}
}
@@ -441,7 +442,7 @@ void CurveEditorSubGroup::initButton (Gtk::Button &button, const Glib::ustring &
vAlign = options.curvebboxpos == 0 || options.curvebboxpos == 2 ? Gtk::ALIGN_FILL : Gtk::ALIGN_END;
}
- button.add (*Gtk::manage (new RTImage (iconName)));
+ button.add (*Gtk::manage (new RTImage(iconName, Gtk::ICON_SIZE_BUTTON)));
button.get_style_context()->add_class(GTK_STYLE_CLASS_FLAT);
if (!tooltip.empty()) {
button.set_tooltip_text(M(tooltip));
diff --git a/rtgui/darkframe.cc b/rtgui/darkframe.cc
index b6b1201a7..1d478b2a3 100644
--- a/rtgui/darkframe.cc
+++ b/rtgui/darkframe.cc
@@ -38,7 +38,7 @@ DarkFrame::DarkFrame () : FoldableToolPanel(this, "darkframe", M("TP_DARKFRAME_L
bindCurrentFolder (*darkFrameFile, options.lastDarkframeDir);
dfLabel = Gtk::manage(new Gtk::Label(M("GENERAL_FILE")));
btnReset = Gtk::manage(new Gtk::Button());
- btnReset->set_image (*Gtk::manage(new RTImage ("cancel-small.png")));
+ btnReset->set_image (*Gtk::manage(new RTImage ("cancel-small", Gtk::ICON_SIZE_BUTTON)));
hbdf->pack_start(*dfLabel, Gtk::PACK_SHRINK, 0);
hbdf->pack_start(*darkFrameFile);
hbdf->pack_start(*btnReset, Gtk::PACK_SHRINK, 0);
diff --git a/rtgui/diagonalcurveeditorsubgroup.cc b/rtgui/diagonalcurveeditorsubgroup.cc
index f4fc8449e..55d6d457f 100644
--- a/rtgui/diagonalcurveeditorsubgroup.cc
+++ b/rtgui/diagonalcurveeditorsubgroup.cc
@@ -33,6 +33,7 @@
#include "rtimage.h"
#include "options.h"
#include "popuptogglebutton.h"
+#include "rtscalable.h"
#include "../rtengine/curves.h"
@@ -85,18 +86,18 @@ DiagonalCurveEditorSubGroup::DiagonalCurveEditorSubGroup (CurveEditorGroup* prt,
}
editPointCustom = Gtk::manage (new Gtk::ToggleButton ());
- initButton(*editPointCustom, Glib::ustring("edit-point.png"), Gtk::ALIGN_START, false, "CURVEEDITOR_EDITPOINT_HINT");
+ initButton(*editPointCustom, Glib::ustring("edit-point"), Gtk::ALIGN_START, false, "CURVEEDITOR_EDITPOINT_HINT");
editCustom = Gtk::manage (new Gtk::ToggleButton());
- initButton(*editCustom, Glib::ustring("crosshair-node-curve.png"), Gtk::ALIGN_START, false, "EDIT_PIPETTE_TOOLTIP");
+ initButton(*editCustom, Glib::ustring("crosshair-node-curve"), Gtk::ALIGN_START, false, "EDIT_PIPETTE_TOOLTIP");
editCustom->hide();
copyCustom = Gtk::manage (new Gtk::Button ());
- initButton(*copyCustom, Glib::ustring("copy.png"), Gtk::ALIGN_END, true);
+ initButton(*copyCustom, Glib::ustring("copy"), Gtk::ALIGN_END, true);
pasteCustom = Gtk::manage (new Gtk::Button ());
- initButton(*pasteCustom, Glib::ustring("paste.png"), Gtk::ALIGN_END, false);
+ initButton(*pasteCustom, Glib::ustring("paste"), Gtk::ALIGN_END, false);
loadCustom = Gtk::manage (new Gtk::Button ());
- initButton(*loadCustom, Glib::ustring("folder-open.png"), Gtk::ALIGN_END, false);
+ initButton(*loadCustom, Glib::ustring("folder-open"), Gtk::ALIGN_END, false);
saveCustom = Gtk::manage (new Gtk::Button ());
- initButton(*saveCustom, Glib::ustring("save.png"), Gtk::ALIGN_END, false);
+ initButton(*saveCustom, Glib::ustring("save"), Gtk::ALIGN_END, false);
custombbox->attach_next_to(*editPointCustom, sideStart, 1, 1);
custombbox->attach_next_to(*editCustom, sideStart, 1, 1);
@@ -177,18 +178,18 @@ DiagonalCurveEditorSubGroup::DiagonalCurveEditorSubGroup (CurveEditorGroup* prt,
}
editPointNURBS = Gtk::manage (new Gtk::ToggleButton ());
- initButton(*editPointNURBS, Glib::ustring("edit-point.png"), Gtk::ALIGN_START, false, "CURVEEDITOR_EDITPOINT_HINT");
+ initButton(*editPointNURBS, Glib::ustring("edit-point"), Gtk::ALIGN_START, false, "CURVEEDITOR_EDITPOINT_HINT");
editNURBS = Gtk::manage (new Gtk::ToggleButton());
- initButton(*editNURBS, Glib::ustring("crosshair-node-curve.png"), Gtk::ALIGN_START, false, "EDIT_PIPETTE_TOOLTIP");
+ initButton(*editNURBS, Glib::ustring("crosshair-node-curve"), Gtk::ALIGN_START, false, "EDIT_PIPETTE_TOOLTIP");
editNURBS->hide();
copyNURBS = Gtk::manage (new Gtk::Button ());
- initButton(*copyNURBS, Glib::ustring("copy.png"), Gtk::ALIGN_END, true);
+ initButton(*copyNURBS, Glib::ustring("copy"), Gtk::ALIGN_END, true);
pasteNURBS = Gtk::manage (new Gtk::Button ());
- initButton(*pasteNURBS, Glib::ustring("paste.png"), Gtk::ALIGN_END, false);
+ initButton(*pasteNURBS, Glib::ustring("paste"), Gtk::ALIGN_END, false);
loadNURBS = Gtk::manage (new Gtk::Button ());
- initButton(*loadNURBS, Glib::ustring("folder-open.png"), Gtk::ALIGN_END, false);
+ initButton(*loadNURBS, Glib::ustring("folder-open"), Gtk::ALIGN_END, false);
saveNURBS = Gtk::manage (new Gtk::Button ());
- initButton(*saveNURBS, Glib::ustring("save.png"), Gtk::ALIGN_END, false);
+ initButton(*saveNURBS, Glib::ustring("save"), Gtk::ALIGN_END, false);
NURBSbbox->attach_next_to(*editPointNURBS, sideStart, 1, 1);
NURBSbbox->attach_next_to(*editNURBS, sideStart, 1, 1);
@@ -273,16 +274,16 @@ DiagonalCurveEditorSubGroup::DiagonalCurveEditorSubGroup (CurveEditorGroup* prt,
paramCurveBox->attach_next_to(*shcSelector, *paramCurve, Gtk::POS_BOTTOM, 1, 1);
editParam = Gtk::manage (new Gtk::ToggleButton());
- initButton(*editParam, Glib::ustring("crosshair-node-curve.png"), Gtk::ALIGN_START, false, "EDIT_PIPETTE_TOOLTIP");
+ initButton(*editParam, Glib::ustring("crosshair-node-curve"), Gtk::ALIGN_START, false, "EDIT_PIPETTE_TOOLTIP");
editParam->hide();
copyParam = Gtk::manage (new Gtk::Button ());
- initButton(*copyParam, Glib::ustring("copy.png"), Gtk::ALIGN_END, true);
+ initButton(*copyParam, Glib::ustring("copy"), Gtk::ALIGN_END, true);
pasteParam = Gtk::manage (new Gtk::Button ());
- initButton(*pasteParam, Glib::ustring("paste.png"), Gtk::ALIGN_END, false);
+ initButton(*pasteParam, Glib::ustring("paste"), Gtk::ALIGN_END, false);
loadParam = Gtk::manage (new Gtk::Button ());
- initButton(*loadParam, Glib::ustring("folder-open.png"), Gtk::ALIGN_END, false);
+ initButton(*loadParam, Glib::ustring("folder-open"), Gtk::ALIGN_END, false);
saveParam = Gtk::manage (new Gtk::Button ());
- initButton(*saveParam, Glib::ustring("save.png"), Gtk::ALIGN_END, false);
+ initButton(*saveParam, Glib::ustring("save"), Gtk::ALIGN_END, false);
parambbox->attach_next_to(*editParam, sideStart, 1, 1);
parambbox->attach_next_to(*copyParam, sideEnd, 1, 1);
@@ -753,7 +754,6 @@ void DiagonalCurveEditorSubGroup::switchGUI()
dCurve->paramCurveEd.at(3)
);
- double s = (double)RTScalable::getScale();
highlights->setValue (dCurve->paramCurveEd.at(4));
highlights->setLabel(label[3]);
lights->setValue (dCurve->paramCurveEd.at(5));
@@ -765,8 +765,8 @@ void DiagonalCurveEditorSubGroup::switchGUI()
shcSelector->coloredBar.setColorProvider(barColorProvider, dCurve->getBottomBarCallerId());
shcSelector->coloredBar.setBgGradient(bgGradient);
shcSelector->setMargins(
- (int)( ((leftBar ? (double)CBAR_WIDTH + 2. + (double)CBAR_MARGIN + RADIUS : RADIUS) - 1.5) * s ),
- (int)((RADIUS - 1.5) * s)
+ (int)( RTScalable::scalePixelSize((leftBar ? (double)CBAR_WIDTH + 2. + (double)CBAR_MARGIN + RADIUS : RADIUS) - 1.5) ),
+ (int)( RTScalable::scalePixelSize(RADIUS - 1.5) )
);
paramCurve->setColoredBar(leftBar, nullptr);
paramCurve->queue_resize_no_redraw();
diff --git a/rtgui/dirbrowser.cc b/rtgui/dirbrowser.cc
index 2be1e3f3a..369b69233 100644
--- a/rtgui/dirbrowser.cc
+++ b/rtgui/dirbrowser.cc
@@ -28,7 +28,7 @@
#endif
#include "guiutils.h"
-#include "rtimage.h"
+#include "rtsurface.h"
#include "multilangmgr.h"
#include "options.h"
@@ -121,13 +121,13 @@ DirBrowser::~DirBrowser()
void DirBrowser::fillDirTree ()
{
- openfolder = RTImage::createPixbufFromFile ("folder-open-small.png");
- closedfolder = RTImage::createPixbufFromFile ("folder-closed-small.png");
- icdrom = RTImage::createPixbufFromFile ("device-optical.png");
- ifloppy = RTImage::createPixbufFromFile ("device-floppy.png");
- ihdd = RTImage::createPixbufFromFile ("device-hdd.png");
- iremovable = RTImage::createPixbufFromFile ("device-usb.png");
- inetwork = RTImage::createPixbufFromFile ("device-network.png");
+ openfolder = std::shared_ptr(new RTPixbuf("folder-open-small", Gtk::ICON_SIZE_SMALL_TOOLBAR));
+ closedfolder = std::shared_ptr(new RTPixbuf("folder-closed-small", Gtk::ICON_SIZE_SMALL_TOOLBAR));
+ icdrom = std::shared_ptr(new RTPixbuf("device-optical", Gtk::ICON_SIZE_SMALL_TOOLBAR));
+ ifloppy = std::shared_ptr(new RTPixbuf("device-floppy", Gtk::ICON_SIZE_SMALL_TOOLBAR));
+ ihdd = std::shared_ptr(new RTPixbuf("device-hdd", Gtk::ICON_SIZE_SMALL_TOOLBAR));
+ iremovable = std::shared_ptr(new RTPixbuf("device-usb", Gtk::ICON_SIZE_SMALL_TOOLBAR));
+ inetwork = std::shared_ptr(new RTPixbuf("device-network", Gtk::ICON_SIZE_SMALL_TOOLBAR));
//Create the Tree model:
dirTreeModel = Gtk::TreeStore::create(dtColumns);
@@ -175,22 +175,22 @@ void DirBrowser::addRoot (char letter)
int type = GetDriveType (volume);
if (type == DRIVE_CDROM) {
- root->set_value (0, icdrom);
- root->set_value (1, icdrom);
+ root->set_value (0, icdrom->get());
+ root->set_value (1, icdrom->get());
} else if (type == DRIVE_REMOVABLE) {
if (letter - 'A' < 2) {
- root->set_value (0, ifloppy);
- root->set_value (1, ifloppy);
+ root->set_value (0, ifloppy->get());
+ root->set_value (1, ifloppy->get());
} else {
- root->set_value (0, iremovable);
- root->set_value (1, iremovable);
+ root->set_value (0, iremovable->get());
+ root->set_value (1, iremovable->get());
}
} else if (type == DRIVE_REMOTE) {
- root->set_value (0, inetwork);
- root->set_value (1, inetwork);
+ root->set_value (0, inetwork->get());
+ root->set_value (1, inetwork->get());
} else if (type == DRIVE_FIXED) {
- root->set_value (0, ihdd);
- root->set_value (1, ihdd);
+ root->set_value (0, ihdd->get());
+ root->set_value (1, ihdd->get());
}
Gtk::TreeModel::iterator child = dirTreeModel->append (root->children());
@@ -366,8 +366,8 @@ void DirBrowser::addDir (const Gtk::TreeModel::iterator& iter, const Glib::ustri
Gtk::TreeModel::iterator child = dirTreeModel->append(iter->children());
child->set_value (dtColumns.filename, dirname);
- child->set_value (dtColumns.icon1, openfolder);
- child->set_value (dtColumns.icon2, closedfolder);
+ child->set_value (dtColumns.icon1, openfolder->get());
+ child->set_value (dtColumns.icon2, closedfolder->get());
Glib::ustring fullname = Glib::build_filename (iter->get_value (dtColumns.dirname), dirname);
child->set_value (dtColumns.dirname, fullname);
Gtk::TreeModel::iterator fooRow = dirTreeModel->append(child->children());
diff --git a/rtgui/dirbrowser.h b/rtgui/dirbrowser.h
index 0254d6eb5..599f9fa16 100644
--- a/rtgui/dirbrowser.h
+++ b/rtgui/dirbrowser.h
@@ -23,6 +23,8 @@
#include "guiutils.h"
+class RTPixbuf;
+
class DirBrowser : public Gtk::Box
{
public:
@@ -62,13 +64,13 @@ private:
void fillRoot ();
- Glib::RefPtr openfolder;
- Glib::RefPtr closedfolder;
- Glib::RefPtr icdrom;
- Glib::RefPtr ifloppy;
- Glib::RefPtr ihdd;
- Glib::RefPtr inetwork;
- Glib::RefPtr iremovable;
+ std::shared_ptr openfolder;
+ std::shared_ptr closedfolder;
+ std::shared_ptr icdrom;
+ std::shared_ptr ifloppy;
+ std::shared_ptr ihdd;
+ std::shared_ptr inetwork;
+ std::shared_ptr iremovable;
bool expandSuccess;
diff --git a/rtgui/distortion.cc b/rtgui/distortion.cc
index 165ccee06..5089a2dfe 100644
--- a/rtgui/distortion.cc
+++ b/rtgui/distortion.cc
@@ -32,7 +32,7 @@ Distortion::Distortion (): FoldableToolPanel(this, "distortion", M("TP_DISTORTIO
rlistener = nullptr;
autoDistor = Gtk::manage (new Gtk::Button (M("GENERAL_AUTO")));
- autoDistor->set_image (*Gtk::manage (new RTImage ("distortion-auto-small.png")));
+ autoDistor->set_image (*Gtk::manage (new RTImage ("distortion-auto-small", Gtk::ICON_SIZE_BUTTON)));
autoDistor->get_style_context()->add_class("independent");
autoDistor->set_alignment(0.5f, 0.5f);
autoDistor->set_tooltip_text (M("TP_DISTORTION_AUTO_TIP"));
@@ -40,14 +40,14 @@ Distortion::Distortion (): FoldableToolPanel(this, "distortion", M("TP_DISTORTIO
autoDistor->show();
pack_start (*autoDistor);
- Gtk::Image* idistL = Gtk::manage (new RTImage ("distortion-pincushion-small.png"));
- Gtk::Image* idistR = Gtk::manage (new RTImage ("distortion-barrel-small.png"));
+ Gtk::Image* idistL = Gtk::manage (new RTImage ("distortion-pincushion-small"));
+ Gtk::Image* idistR = Gtk::manage (new RTImage ("distortion-barrel-small"));
distor = Gtk::manage (new Adjuster (M("TP_DISTORTION_AMOUNT"), -0.5, 0.5, 0.001, 0, idistL, idistR));
distor->setAdjusterListener (this);
distor->setLogScale(2, 0);
-
+
distor->show();
pack_start (*distor);
}
diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc
index 78a07ddd6..d21ef3917 100644
--- a/rtgui/editorpanel.cc
+++ b/rtgui/editorpanel.cc
@@ -186,9 +186,9 @@ private:
void prepareIntentBox ()
{
// same order as the enum
- intentBox.addEntry ("intent-perceptual.png", M ("PREFERENCES_INTENT_PERCEPTUAL"));
- intentBox.addEntry ("intent-relative.png", M ("PREFERENCES_INTENT_RELATIVE"));
- intentBox.addEntry ("intent-absolute.png", M ("PREFERENCES_INTENT_ABSOLUTE"));
+ intentBox.addEntry ("intent-perceptual", M ("PREFERENCES_INTENT_PERCEPTUAL"));
+ intentBox.addEntry ("intent-relative", M ("PREFERENCES_INTENT_RELATIVE"));
+ intentBox.addEntry ("intent-absolute", M ("PREFERENCES_INTENT_ABSOLUTE"));
setExpandAlignProperties (intentBox.buttonGroup, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL);
intentBox.setSelected (1);
@@ -197,7 +197,7 @@ private:
void prepareSoftProofingBox ()
{
- Gtk::Image *softProofImage = Gtk::manage (new RTImage ("gamut-softproof.png"));
+ Gtk::Image *softProofImage = Gtk::manage (new RTImage ("gamut-softproof", Gtk::ICON_SIZE_LARGE_TOOLBAR));
softProofImage->set_padding (0, 0);
softProof.add (*softProofImage);
softProof.set_relief (Gtk::RELIEF_NONE);
@@ -206,7 +206,7 @@ private:
softProof.set_active (false);
softProof.show ();
- Gtk::Image *spGamutCheckImage = Gtk::manage (new RTImage ("gamut-warning.png"));
+ Gtk::Image *spGamutCheckImage = Gtk::manage (new RTImage ("gamut-warning", Gtk::ICON_SIZE_LARGE_TOOLBAR));
spGamutCheckImage->set_padding (0, 0);
spGamutCheck.add (*spGamutCheckImage);
spGamutCheck.set_relief (Gtk::RELIEF_NONE);
@@ -509,7 +509,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel)
//leftsubpaned->pack_start (*ppframe, Gtk::PACK_SHRINK, 4);
navigator = Gtk::manage(new Navigator());
- navigator->previewWindow->set_size_request(-1, 150 * RTScalable::getScale());
+ navigator->previewWindow->set_size_request(-1, RTScalable::scalePixelSize(150));
leftsubpaned->pack1(*navigator, false, false);
history = Gtk::manage(new History());
@@ -525,19 +525,19 @@ EditorPanel::EditorPanel (FilePanel* filePanel)
Gtk::Box* editbox = Gtk::manage (new Gtk::Box (Gtk::ORIENTATION_VERTICAL));
info = Gtk::manage (new Gtk::ToggleButton ());
- Gtk::Image* infoimg = Gtk::manage (new RTImage ("info.png"));
+ Gtk::Image* infoimg = Gtk::manage (new RTImage ("info", Gtk::ICON_SIZE_LARGE_TOOLBAR));
info->add (*infoimg);
info->set_relief (Gtk::RELIEF_NONE);
info->set_tooltip_markup (M ("MAIN_TOOLTIP_QINFO"));
beforeAfter = Gtk::manage (new Gtk::ToggleButton ());
- Gtk::Image* beforeAfterIcon = Gtk::manage (new RTImage ("beforeafter.png"));
+ Gtk::Image* beforeAfterIcon = Gtk::manage (new RTImage ("beforeafter", Gtk::ICON_SIZE_LARGE_TOOLBAR));
beforeAfter->add (*beforeAfterIcon);
beforeAfter->set_relief (Gtk::RELIEF_NONE);
beforeAfter->set_tooltip_markup (M ("MAIN_TOOLTIP_TOGGLE"));
- iBeforeLockON = new RTImage ("padlock-locked-small.png");
- iBeforeLockOFF = new RTImage ("padlock-unlocked-small.png");
+ iBeforeLockON = new RTImage ("padlock-locked-small", Gtk::ICON_SIZE_LARGE_TOOLBAR);
+ iBeforeLockOFF = new RTImage ("padlock-unlocked-small", Gtk::ICON_SIZE_LARGE_TOOLBAR);
Gtk::Separator* vsept = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_VERTICAL));
Gtk::Separator* vsepz = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_VERTICAL));
@@ -546,8 +546,8 @@ EditorPanel::EditorPanel (FilePanel* filePanel)
hidehp = Gtk::manage (new Gtk::ToggleButton ());
- iHistoryShow = new RTImage ("panel-to-right.png");
- iHistoryHide = new RTImage ("panel-to-left.png");
+ iHistoryShow = new RTImage ("panel-to-right", Gtk::ICON_SIZE_LARGE_TOOLBAR);
+ iHistoryHide = new RTImage ("panel-to-left", Gtk::ICON_SIZE_LARGE_TOOLBAR);
hidehp->set_relief (Gtk::RELIEF_NONE);
hidehp->set_active (options.showHistory);
@@ -563,8 +563,8 @@ EditorPanel::EditorPanel (FilePanel* filePanel)
if (!simpleEditor && filePanel) {
tbTopPanel_1 = new Gtk::ToggleButton ();
- iTopPanel_1_Show = new RTImage ("panel-to-bottom.png");
- iTopPanel_1_Hide = new RTImage ("panel-to-top.png");
+ iTopPanel_1_Show = new RTImage ("panel-to-bottom", Gtk::ICON_SIZE_LARGE_TOOLBAR);
+ iTopPanel_1_Hide = new RTImage ("panel-to-top", Gtk::ICON_SIZE_LARGE_TOOLBAR);
tbTopPanel_1->set_relief (Gtk::RELIEF_NONE);
tbTopPanel_1->set_active (true);
tbTopPanel_1->set_tooltip_markup (M ("MAIN_TOOLTIP_SHOWHIDETP1"));
@@ -581,7 +581,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel)
// Histogram profile toggle controls
toggleHistogramProfile = Gtk::manage (new Gtk::ToggleButton ());
- Gtk::Image* histProfImg = Gtk::manage (new RTImage ("gamut-hist.png"));
+ Gtk::Image* histProfImg = Gtk::manage (new RTImage ("gamut-hist", Gtk::ICON_SIZE_LARGE_TOOLBAR));
toggleHistogramProfile->add (*histProfImg);
toggleHistogramProfile->set_relief (Gtk::RELIEF_NONE);
toggleHistogramProfile->set_active (options.rtSettings.HistogramWorking);
@@ -654,21 +654,21 @@ EditorPanel::EditorPanel (FilePanel* filePanel)
iops->set_row_spacing (2);
iops->set_column_spacing (2);
- Gtk::Image *saveButtonImage = Gtk::manage (new RTImage ("save.png"));
+ Gtk::Image *saveButtonImage = Gtk::manage (new RTImage ("save", Gtk::ICON_SIZE_LARGE_TOOLBAR));
saveimgas = Gtk::manage (new Gtk::Button ());
saveimgas->set_relief(Gtk::RELIEF_NONE);
saveimgas->add (*saveButtonImage);
saveimgas->set_tooltip_markup (M ("MAIN_BUTTON_SAVE_TOOLTIP"));
setExpandAlignProperties (saveimgas, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL);
- Gtk::Image *queueButtonImage = Gtk::manage (new RTImage ("gears.png"));
+ Gtk::Image *queueButtonImage = Gtk::manage (new RTImage ("gears", Gtk::ICON_SIZE_LARGE_TOOLBAR));
queueimg = Gtk::manage (new Gtk::Button ());
queueimg->set_relief(Gtk::RELIEF_NONE);
queueimg->add (*queueButtonImage);
queueimg->set_tooltip_markup (M ("MAIN_BUTTON_PUTTOQUEUE_TOOLTIP"));
setExpandAlignProperties (queueimg, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL);
- Gtk::Image *sendToEditorButtonImage = Gtk::manage (new RTImage ("palette-brush.png"));
+ Gtk::Image *sendToEditorButtonImage = Gtk::manage (new RTImage ("palette-brush", Gtk::ICON_SIZE_LARGE_TOOLBAR));
sendtogimp = Gtk::manage (new Gtk::Button ());
sendtogimp->set_relief(Gtk::RELIEF_NONE);
sendtogimp->add (*sendToEditorButtonImage);
@@ -683,8 +683,8 @@ EditorPanel::EditorPanel (FilePanel* filePanel)
// tbRightPanel_1
tbRightPanel_1 = Gtk::manage(new Gtk::ToggleButton());
- iRightPanel_1_Show = new RTImage ("panel-to-left.png");
- iRightPanel_1_Hide = new RTImage ("panel-to-right.png");
+ iRightPanel_1_Show = new RTImage ("panel-to-left", Gtk::ICON_SIZE_LARGE_TOOLBAR);
+ iRightPanel_1_Hide = new RTImage ("panel-to-right", Gtk::ICON_SIZE_LARGE_TOOLBAR);
tbRightPanel_1->set_relief (Gtk::RELIEF_NONE);
tbRightPanel_1->set_active (true);
tbRightPanel_1->set_tooltip_markup (M ("MAIN_TOOLTIP_SHOWHIDERP1"));
@@ -693,8 +693,8 @@ EditorPanel::EditorPanel (FilePanel* filePanel)
// ShowHideSidePanels
tbShowHideSidePanels = Gtk::manage(new Gtk::ToggleButton());
- iShowHideSidePanels = new RTImage ("crossed-arrows-out.png");
- iShowHideSidePanels_exit = new RTImage ("crossed-arrows-in.png");
+ iShowHideSidePanels = new RTImage ("crossed-arrows-out", Gtk::ICON_SIZE_LARGE_TOOLBAR);
+ iShowHideSidePanels_exit = new RTImage ("crossed-arrows-in", Gtk::ICON_SIZE_LARGE_TOOLBAR);
tbShowHideSidePanels->set_relief (Gtk::RELIEF_NONE);
tbShowHideSidePanels->set_active (false);
tbShowHideSidePanels->set_tooltip_markup (M ("MAIN_BUTTON_SHOWHIDESIDEPANELS_TOOLTIP"));
@@ -705,7 +705,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel)
if (!simpleEditor && !options.tabbedUI) {
// Navigation buttons
- Gtk::Image *navPrevImage = Gtk::manage (new RTImage ("arrow2-left.png"));
+ Gtk::Image *navPrevImage = Gtk::manage (new RTImage ("arrow2-left", Gtk::ICON_SIZE_LARGE_TOOLBAR));
navPrevImage->set_padding (0, 0);
navPrev = Gtk::manage (new Gtk::Button ());
navPrev->add (*navPrevImage);
@@ -713,7 +713,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel)
navPrev->set_tooltip_markup (M ("MAIN_BUTTON_NAVPREV_TOOLTIP"));
setExpandAlignProperties (navPrev, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL);
- Gtk::Image *navNextImage = Gtk::manage (new RTImage ("arrow2-right.png"));
+ Gtk::Image *navNextImage = Gtk::manage (new RTImage ("arrow2-right", Gtk::ICON_SIZE_LARGE_TOOLBAR));
navNextImage->set_padding (0, 0);
navNext = Gtk::manage (new Gtk::Button ());
navNext->add (*navNextImage);
@@ -721,7 +721,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel)
navNext->set_tooltip_markup (M ("MAIN_BUTTON_NAVNEXT_TOOLTIP"));
setExpandAlignProperties (navNext, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL);
- Gtk::Image *navSyncImage = Gtk::manage (new RTImage ("arrow-updown.png"));
+ Gtk::Image *navSyncImage = Gtk::manage (new RTImage ("arrow-updown", Gtk::ICON_SIZE_LARGE_TOOLBAR));
navSyncImage->set_padding (0, 0);
navSync = Gtk::manage (new Gtk::Button ());
navSync->add (*navSyncImage);
@@ -2072,7 +2072,7 @@ bool EditorPanel::idle_sendToGimp ( ProgressConnector *p
sf.tiffBits = 16;
sf.tiffFloat = false;
}
-
+
sf.tiffUncompressed = true;
sf.saveParams = true;
diff --git a/rtgui/editwidgets.cc b/rtgui/editwidgets.cc
index f9c9b3781..ff662f1fa 100644
--- a/rtgui/editwidgets.cc
+++ b/rtgui/editwidgets.cc
@@ -989,11 +989,11 @@ void OPIcon::drivenPointToRectangle(const rtengine::Coord &pos,
bottomRight.y = topLeft.y + H - 1;
}
-OPIcon::OPIcon(const Cairo::RefPtr &normal,
- const Cairo::RefPtr &active,
- const Cairo::RefPtr &prelight,
- const Cairo::RefPtr &dragged,
- const Cairo::RefPtr &insensitive,
+OPIcon::OPIcon(const std::shared_ptr &normal,
+ const std::shared_ptr &active,
+ const std::shared_ptr &prelight,
+ const std::shared_ptr &dragged,
+ const std::shared_ptr&insensitive,
DrivenPoint drivenPoint) :
drivenPoint(drivenPoint)
{
@@ -1022,48 +1022,48 @@ OPIcon::OPIcon(Glib::ustring normalImage, Glib::ustring activeImage, Glib::ustri
Glib::ustring draggedImage, Glib::ustring insensitiveImage, DrivenPoint drivenPoint) : drivenPoint(drivenPoint)
{
if (!normalImage.empty()) {
- normalImg = Cairo::RefPtr(new RTSurface(normalImage));
+ normalImg = std::shared_ptr(new RTSurface(normalImage, Gtk::ICON_SIZE_MENU));
}
if (!prelightImage.empty()) {
- prelightImg = Cairo::RefPtr(new RTSurface(prelightImage));
+ prelightImg = std::shared_ptr(new RTSurface(prelightImage, Gtk::ICON_SIZE_MENU));
}
if (!activeImage.empty()) {
- activeImg = Cairo::RefPtr(new RTSurface(activeImage));
+ activeImg = std::shared_ptr(new RTSurface(activeImage, Gtk::ICON_SIZE_MENU));
}
if (!draggedImage.empty()) {
- draggedImg = Cairo::RefPtr(new RTSurface(draggedImage));
+ draggedImg = std::shared_ptr(new RTSurface(draggedImage, Gtk::ICON_SIZE_MENU));
}
if (!insensitiveImage.empty()) {
- insensitiveImg = Cairo::RefPtr(new RTSurface(insensitiveImage));
+ insensitiveImg = std::shared_ptr(new RTSurface(insensitiveImage, Gtk::ICON_SIZE_MENU));
}
}
-const Cairo::RefPtr OPIcon::getNormalImg()
+const std::shared_ptr OPIcon::getNormalImg()
{
return normalImg;
}
-const Cairo::RefPtr OPIcon::getPrelightImg()
+const std::shared_ptr OPIcon::getPrelightImg()
{
return prelightImg;
}
-const Cairo::RefPtr OPIcon::getActiveImg()
+const std::shared_ptr OPIcon::getActiveImg()
{
return activeImg;
}
-const Cairo::RefPtr OPIcon::getDraggedImg()
+const std::shared_ptr OPIcon::getDraggedImg()
{
return draggedImg;
}
-const Cairo::RefPtr OPIcon::getInsensitiveImg()
+const std::shared_ptr OPIcon::getInsensitiveImg()
{
return insensitiveImg;
}
-void OPIcon::drawImage(Cairo::RefPtr &img,
+void OPIcon::drawImage(std::shared_ptr &img,
Cairo::RefPtr &cr, ObjectMOBuffer *objectBuffer,
EditCoordSystem &coordSystem)
{
@@ -1089,7 +1089,7 @@ void OPIcon::drawImage(Cairo::RefPtr &img,
cr->fill();
}
-void OPIcon::drawMOImage(Cairo::RefPtr &img, Cairo::RefPtr &cr,
+void OPIcon::drawMOImage(std::shared_ptr &img, Cairo::RefPtr &cr,
unsigned short id, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem)
{
// test of F_HOVERABLE has already been done
diff --git a/rtgui/editwidgets.h b/rtgui/editwidgets.h
index fd539c355..968796ceb 100644
--- a/rtgui/editwidgets.h
+++ b/rtgui/editwidgets.h
@@ -354,34 +354,32 @@ class OPIcon : public Geometry // OP stands for "On Preview"
{
private:
- Cairo::RefPtr normalImg;
- Cairo::RefPtr prelightImg;
- Cairo::RefPtr activeImg;
- Cairo::RefPtr draggedImg;
- Cairo::RefPtr insensitiveImg;
+ std::shared_ptr normalImg;
+ std::shared_ptr prelightImg;
+ std::shared_ptr activeImg;
+ std::shared_ptr draggedImg;
+ std::shared_ptr insensitiveImg;
- static void updateImages();
- void changeImage(Glib::ustring &newImage);
- void drawImage (Cairo::RefPtr &img, Cairo::RefPtr &cr, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem);
- void drawMOImage (Cairo::RefPtr &img, Cairo::RefPtr &cr, unsigned short id, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem);
+ void drawImage (std::shared_ptr &img, Cairo::RefPtr &cr, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem);
+ void drawMOImage (std::shared_ptr &img, Cairo::RefPtr &cr, unsigned short id, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem);
void drivenPointToRectangle(const rtengine::Coord &pos, rtengine::Coord &topLeft, rtengine::Coord &bottomRight, int W, int H);
public:
DrivenPoint drivenPoint;
rtengine::Coord position;
- OPIcon (const Cairo::RefPtr &normal,
- const Cairo::RefPtr &active,
- const Cairo::RefPtr &prelight = {},
- const Cairo::RefPtr &dragged = {},
- const Cairo::RefPtr &insensitive = {},
+ OPIcon (const std::shared_ptr &normal,
+ const std::shared_ptr &active,
+ const std::shared_ptr &prelight = nullptr,
+ const std::shared_ptr &dragged = nullptr,
+ const std::shared_ptr &insensitive = nullptr,
DrivenPoint drivenPoint = DP_CENTERCENTER);
OPIcon (Glib::ustring normalImage, Glib::ustring activeImage, Glib::ustring prelightImage = "", Glib::ustring draggedImage = "", Glib::ustring insensitiveImage = "", DrivenPoint drivenPoint = DP_CENTERCENTER);
- const Cairo::RefPtr getNormalImg();
- const Cairo::RefPtr getPrelightImg();
- const Cairo::RefPtr getActiveImg();
- const Cairo::RefPtr getDraggedImg();
- const Cairo::RefPtr getInsensitiveImg();
+ const std::shared_ptr getNormalImg();
+ const std::shared_ptr getPrelightImg();
+ const std::shared_ptr getActiveImg();
+ const std::shared_ptr getDraggedImg();
+ const std::shared_ptr getInsensitiveImg();
void drawOuterGeometry (Cairo::RefPtr &cr, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem) override;
void drawInnerGeometry (Cairo::RefPtr &cr, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem) override;
void drawToMOChannel (Cairo::RefPtr &cr, unsigned short id, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem) override;
diff --git a/rtgui/editwindow.cc b/rtgui/editwindow.cc
index d0e53d730..5b57e35c7 100644
--- a/rtgui/editwindow.cc
+++ b/rtgui/editwindow.cc
@@ -57,15 +57,14 @@ EditWindow* EditWindow::getInstance(RTWindow* p)
}
EditWindow::EditWindow (RTWindow* p)
- : resolution(RTScalable::baseDPI)
- , parent(p)
+ : parent(p)
, isFullscreen(false)
, isClosed(true)
, isMinimized(false)
{
+ // Set window icon
+ set_default_icon_name("rawtherapee");
- updateResolution();
- setAppIcon();
set_title_decorated("");
set_modal(false);
set_resizable(true);
@@ -165,56 +164,8 @@ void EditWindow::on_realize ()
editWindowCursorManager.init (get_window());
}
-bool EditWindow::updateResolution()
-{
- int scale = get_scale_factor();
- double res = get_screen()->get_resolution();
- if (scale == 2) {
- // from Windows' behavior : if scale==2, resolution = 192. (Gtk shows 96 dpi !?), there's no higher value
- res = RTScalable::baseHiDPI;
- }
- bool retVal = res != resolution;
- resolution = res;
- return retVal;
-}
-
-void EditWindow::setAppIcon()
-{
- Glib::ustring fName;
- bool downsize = false;
- // findIconAbsolutePath won't be able to select the image based on resolution with the
- // storage of the images, we're doing the selection here
- if (resolution == RTScalable::baseDPI) {
- fName = "rawtherapee-logo-24.png";
- } else {
- fName = "rawtherapee-logo-48.png";
- if (resolution < RTScalable::baseHiDPI) {
- downsize = true;
- }
- }
- Glib::ustring icon_path = Glib::build_filename (argv0, "images", fName);
- const Glib::RefPtr pixbuf = Gdk::Pixbuf::create_from_file(icon_path);
- if (!pixbuf) {
- return;
- }
- if (downsize) {
- int size = int((48. * resolution) / RTScalable::baseHiDPI);
- pixbuf->scale_simple(size, size, Gdk::InterpType::INTERP_BILINEAR);
- }
-
- try {
- set_default_icon(pixbuf);
- } catch(Glib::Exception& ex) {
- printf ("%s\n", ex.what().c_str());
- }
-}
-
bool EditWindow::on_configure_event(GdkEventConfigure* event)
{
- if (updateResolution()) {
- setAppIcon();
- }
-
if (!options.meowMaximized && !isFullscreen && !isMinimized) {
get_position(options.meowX, options.meowY);
get_size(options.meowWidth, options.meowHeight);
@@ -253,11 +204,11 @@ void EditWindow::addEditorPanel (EditorPanel* ep, const std::string &name)
// construct closeable tab for the image
Gtk::Box* hb = Gtk::manage (new Gtk::Box ());
- hb->pack_start (*Gtk::manage (new RTImage ("aperture.png")));
+ hb->pack_start (*Gtk::manage (new RTImage ("aperture")));
hb->pack_start (*Gtk::manage (new Gtk::Label (Glib::path_get_basename (name))));
hb->set_tooltip_markup (name);
Gtk::Button* closeb = Gtk::manage (new Gtk::Button ());
- closeb->set_image (*Gtk::manage(new RTImage ("cancel-small.png")));
+ closeb->set_image (*Gtk::manage(new RTImage ("cancel-small", Gtk::ICON_SIZE_BUTTON)));
closeb->set_relief (Gtk::RELIEF_NONE);
closeb->set_focus_on_click (false);
diff --git a/rtgui/editwindow.h b/rtgui/editwindow.h
index b8eeaee82..bbe9a14c2 100644
--- a/rtgui/editwindow.h
+++ b/rtgui/editwindow.h
@@ -31,7 +31,6 @@ class EditWindow :
{
private:
- double resolution;
RTWindow* parent;
RTImage appIcon;
@@ -44,8 +43,6 @@ private:
bool isMinimized;
sigc::connection onConfEventConn;
void toggleFullscreen ();
- bool updateResolution();
- void setAppIcon();
IdleRegister idle_register;
diff --git a/rtgui/exifpanel.cc b/rtgui/exifpanel.cc
index eeff0c8c7..246a75388 100644
--- a/rtgui/exifpanel.cc
+++ b/rtgui/exifpanel.cc
@@ -31,7 +31,11 @@ using namespace rtexif;
ExifPanel::ExifPanel() :
idata(nullptr),
changeList(new rtengine::procparams::ExifPairs),
- defChangeList(new rtengine::procparams::ExifPairs)
+ defChangeList(new rtengine::procparams::ExifPairs),
+
+ delicon("cancel-small"),
+ keepicon("tick-small"),
+ editicon("add-small")
{
set_orientation(Gtk::ORIENTATION_VERTICAL);
recursiveOp = true;
@@ -54,17 +58,14 @@ ExifPanel::ExifPanel() :
exifTree->set_grid_lines (Gtk::TREE_VIEW_GRID_LINES_NONE);
exifTree->set_row_separator_func (sigc::mem_fun(*this, &ExifPanel::rowSeperatorFunc));
- delicon = RTImage::createPixbufFromFile ("cancel-small.png");
- keepicon = RTImage::createPixbufFromFile ("tick-small.png");
- editicon = RTImage::createPixbufFromFile ("add-small.png");
-
Gtk::TreeView::Column *viewcol = Gtk::manage (new Gtk::TreeView::Column ("Field Name"));
- Gtk::CellRendererPixbuf* render_pb = Gtk::manage (new Gtk::CellRendererPixbuf ());
+ Gtk::CellRendererPixbuf* render_pb = Gtk::manage (new Gtk::CellRendererPixbuf());
+ render_pb->property_stock_size() = Gtk::ICON_SIZE_SMALL_TOOLBAR;
Gtk::CellRendererText *render_txt = Gtk::manage (new Gtk::CellRendererText());
render_txt->property_ellipsize() = Pango::ELLIPSIZE_END;
viewcol->pack_start (*render_pb, false);
viewcol->pack_start (*render_txt, true);
- viewcol->add_attribute (*render_pb, "pixbuf", exifColumns.icon);
+ viewcol->add_attribute (*render_pb, "icon-name", exifColumns.icon);
viewcol->add_attribute (*render_txt, "markup", exifColumns.field);
viewcol->set_expand (true);
viewcol->set_resizable (true);
@@ -106,21 +107,21 @@ ExifPanel::ExifPanel() :
setExpandAlignProperties (buttons2, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
remove = Gtk::manage (new Gtk::Button ()); // M("EXIFPANEL_REMOVE")
- remove->set_image (*Gtk::manage (new RTImage(delicon)));
+ remove->set_image (*Gtk::manage (new RTImage(delicon, Gtk::ICON_SIZE_BUTTON)));
remove->set_tooltip_text (M ("EXIFPANEL_REMOVEHINT"));
remove->get_style_context()->add_class ("Left");
setExpandAlignProperties (remove, true, true, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL);
buttons1->attach_next_to (*remove, Gtk::POS_LEFT, 1, 1);
keep = Gtk::manage (new Gtk::Button ()); // M("EXIFPANEL_KEEP")
- keep->set_image (*Gtk::manage (new RTImage(keepicon)));
+ keep->set_image (*Gtk::manage (new RTImage(keepicon, Gtk::ICON_SIZE_BUTTON)));
keep->set_tooltip_text (M ("EXIFPANEL_KEEPHINT"));
keep->get_style_context()->add_class ("MiddleH");
setExpandAlignProperties (keep, true, true, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL);
buttons1->attach_next_to (*keep, Gtk::POS_RIGHT, 1, 1);
add = Gtk::manage (new Gtk::Button ()); // M("EXIFPANEL_ADDEDIT")
- add->set_image (*Gtk::manage (new RTImage(editicon)));
+ add->set_image (*Gtk::manage (new RTImage(editicon, Gtk::ICON_SIZE_BUTTON)));
add->set_tooltip_text (M ("EXIFPANEL_ADDEDITHINT"));
add->get_style_context()->add_class ("Right");
setExpandAlignProperties (add, true, true, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL);
@@ -134,14 +135,14 @@ ExifPanel::ExifPanel() :
buttons2->attach_next_to (*showAll, Gtk::POS_LEFT, 1, 1);
reset = Gtk::manage (new Gtk::Button ()); // M("EXIFPANEL_RESET")
- reset->set_image (*Gtk::manage (new RTImage("undo.png", "redo.png")));
+ reset->set_image (*Gtk::manage (new RTImage ("undo", Gtk::ICON_SIZE_BUTTON)));
reset->set_tooltip_text (M ("EXIFPANEL_RESETHINT"));
reset->get_style_context()->add_class ("MiddleH");
setExpandAlignProperties (reset, true, true, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL);
buttons2->attach_next_to (*reset, Gtk::POS_RIGHT, 1, 1);
resetAll = Gtk::manage (new Gtk::Button ()); // M("EXIFPANEL_RESETALL")
- resetAll->set_image (*Gtk::manage (new RTImage ("undo-all.png", "redo-all.png")));
+ resetAll->set_image (*Gtk::manage (new RTImage ("undo-all", Gtk::ICON_SIZE_BUTTON)));
resetAll->set_tooltip_text (M ("EXIFPANEL_RESETALLHINT"));
resetAll->get_style_context()->add_class ("Right");
setExpandAlignProperties (resetAll, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL);
diff --git a/rtgui/exifpanel.h b/rtgui/exifpanel.h
index 4c28af289..7723e56c3 100644
--- a/rtgui/exifpanel.h
+++ b/rtgui/exifpanel.h
@@ -39,7 +39,7 @@ private:
class ExifColumns : public Gtk::TreeModelColumnRecord
{
public:
- Gtk::TreeModelColumn > icon;
+ Gtk::TreeModelColumn icon;
Gtk::TreeModelColumn field;
Gtk::TreeModelColumn field_nopango;
Gtk::TreeModelColumn value;
@@ -64,9 +64,10 @@ private:
add (isSeparator);
}
};
- Glib::RefPtr delicon;
- Glib::RefPtr keepicon;
- Glib::RefPtr editicon;
+
+ Glib::ustring delicon;
+ Glib::ustring keepicon;
+ Glib::ustring editicon;
ExifColumns exifColumns;
Gtk::TreeView* exifTree;
diff --git a/rtgui/exportpanel.cc b/rtgui/exportpanel.cc
index a4ce63c1d..3c299e714 100644
--- a/rtgui/exportpanel.cc
+++ b/rtgui/exportpanel.cc
@@ -185,14 +185,14 @@ ExportPanel::ExportPanel () : listener (nullptr)
// Buttons
btnFastExport = Gtk::manage ( new Gtk::Button () );
btnFastExport->set_tooltip_text (M ("EXPORT_PUTTOQUEUEFAST"));
- btnFastExport->set_image (*Gtk::manage (new RTImage ("gears.png")));
+ btnFastExport->set_image (*Gtk::manage (new RTImage ("gears")));
pack_start (*btnFastExport, Gtk::PACK_SHRINK, 4);
// 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.png"));
+ Gtk::Image* peImg = Gtk::manage (new RTImage ("ornament1"));
vboxpe->pack_start (*hseptpe, Gtk::PACK_SHRINK, 4);
vboxpe->pack_start (*peImg);
pack_start (*vboxpe, Gtk::PACK_SHRINK, 0);
diff --git a/rtgui/fattaltonemap.cc b/rtgui/fattaltonemap.cc
index 89a1e9e30..1e3c7171a 100644
--- a/rtgui/fattaltonemap.cc
+++ b/rtgui/fattaltonemap.cc
@@ -1,5 +1,5 @@
/** -*- C++ -*-
- *
+ *
* This file is part of RawTherapee.
*
* Copyright (c) 2017 Alberto Griggio
@@ -39,8 +39,8 @@ FattalToneMapping::FattalToneMapping(): FoldableToolPanel(this, "fattal", M("TP_
amount = Gtk::manage(new Adjuster (M("TP_TM_FATTAL_AMOUNT"), 1., 100., 1., 30.));
threshold = Gtk::manage(new Adjuster (M("TP_TM_FATTAL_THRESHOLD"), -100., 300., 1., 0.0));
threshold->setLogScale(10, 0);
- Gtk::Image *al = Gtk::manage(new RTImage("circle-black-small.png"));
- Gtk::Image *ar = Gtk::manage(new RTImage("circle-white-small.png"));
+ Gtk::Image *al = Gtk::manage(new RTImage("circle-black-small"));
+ Gtk::Image *ar = Gtk::manage(new RTImage("circle-white-small"));
anchor = Gtk::manage(new Adjuster(M("TP_TM_FATTAL_ANCHOR"), 1, 100, 1, 50, al, ar));
amount->setAdjusterListener(this);
diff --git a/rtgui/favoritbrowser.cc b/rtgui/favoritbrowser.cc
index 0481847cb..2b16aadcc 100644
--- a/rtgui/favoritbrowser.cc
+++ b/rtgui/favoritbrowser.cc
@@ -16,7 +16,8 @@
* You should have received a copy of the GNU General Public License
* along with RawTherapee. If not, see .
*/
-#include
+#include "favoritbrowser.h"
+
#include "multilangmgr.h"
#include "rtimage.h"
@@ -57,7 +58,7 @@ FavoritBrowser::FavoritBrowser () : listener (NULL)
add->set_vexpand(false);
add->set_halign(Gtk::ALIGN_FILL);
add->set_valign(Gtk::ALIGN_START);
- add->set_image (*Gtk::manage (new RTImage ("add-small.png")));
+ add->set_image (*Gtk::manage (new RTImage ("add-small", Gtk::ICON_SIZE_BUTTON)));
add->get_style_context()->add_class("Left");
del = Gtk::manage (new Gtk::Button ());
del->set_tooltip_text(M("MAIN_FRAME_PLACES_DEL"));
@@ -65,7 +66,7 @@ FavoritBrowser::FavoritBrowser () : listener (NULL)
del->set_vexpand(false);
del->set_halign(Gtk::ALIGN_FILL);
del->set_valign(Gtk::ALIGN_START);
- del->set_image (*Gtk::manage (new RTImage ("remove-small.png")));
+ del->set_image (*Gtk::manage (new RTImage ("remove-small", Gtk::ICON_SIZE_BUTTON)));
del->get_style_context()->add_class("Right");
Gtk::Box* buttonBox = Gtk::manage (new Gtk::Box ());
buttonBox->pack_start (*add);
diff --git a/rtgui/filebrowser.cc b/rtgui/filebrowser.cc
index 97e724174..91eb8dc72 100644
--- a/rtgui/filebrowser.cc
+++ b/rtgui/filebrowser.cc
@@ -157,7 +157,7 @@ FileBrowser::FileBrowser () :
pmenu->attach (*Gtk::manage(inspect = new Gtk::MenuItem (M("FILEBROWSER_POPUPINSPECT"))), 0, 1, p, p + 1);
p++;
}
- pmenu->attach (*Gtk::manage(develop = new MyImageMenuItem (M("FILEBROWSER_POPUPPROCESS"), "gears.png")), 0, 1, p, p + 1);
+ pmenu->attach (*Gtk::manage(develop = new MyImageMenuItem (M("FILEBROWSER_POPUPPROCESS"), "gears")), 0, 1, p, p + 1);
p++;
pmenu->attach (*Gtk::manage(developfast = new Gtk::MenuItem (M("FILEBROWSER_POPUPPROCESSFAST"))), 0, 1, p, p + 1);
p++;
@@ -209,8 +209,8 @@ FileBrowser::FileBrowser () :
// Thumbnail context menu
// Similar image arrays in filecatalog.cc
- std::array clabelActiveIcons = {"circle-empty-gray-small.png", "circle-red-small.png", "circle-yellow-small.png", "circle-green-small.png", "circle-blue-small.png", "circle-purple-small.png"};
- std::array clabelInactiveIcons = {"circle-empty-darkgray-small.png", "circle-empty-red-small.png", "circle-empty-yellow-small.png", "circle-empty-green-small.png", "circle-empty-blue-small.png", "circle-empty-purple-small.png"};
+ std::array clabelActiveIcons = {"circle-empty-gray-small", "circle-red-small", "circle-yellow-small", "circle-green-small", "circle-blue-small", "circle-purple-small"};
+ std::array clabelInactiveIcons = {"circle-empty-darkgray-small", "circle-empty-red-small", "circle-empty-yellow-small", "circle-empty-green-small", "circle-empty-blue-small", "circle-empty-purple-small"};
if (options.menuGroupLabel) {
pmenu->attach (*Gtk::manage(menuLabel = new Gtk::MenuItem (M("FILEBROWSER_POPUPCOLORLABEL"))), 0, 1, p, p + 1);
diff --git a/rtgui/filebrowserentry.cc b/rtgui/filebrowserentry.cc
index bf3f11a79..9f9be2eff 100644
--- a/rtgui/filebrowserentry.cc
+++ b/rtgui/filebrowserentry.cc
@@ -25,7 +25,7 @@
#include "cursormanager.h"
#include "guiutils.h"
#include "inspector.h"
-#include "rtimage.h"
+#include "rtsurface.h"
#include "threadutils.h"
#include "thumbbrowserbase.h"
#include "thumbnail.h"
@@ -38,11 +38,11 @@
//extern Glib::Threads::Thread* mainThread;
bool FileBrowserEntry::iconsLoaded(false);
-Glib::RefPtr FileBrowserEntry::editedIcon;
-Glib::RefPtr FileBrowserEntry::recentlySavedIcon;
-Glib::RefPtr FileBrowserEntry::enqueuedIcon;
-Glib::RefPtr FileBrowserEntry::hdr;
-Glib::RefPtr FileBrowserEntry::ps;
+std::shared_ptr FileBrowserEntry::editedIcon(std::shared_ptr(nullptr));
+std::shared_ptr FileBrowserEntry::recentlySavedIcon(std::shared_ptr(nullptr));
+std::shared_ptr FileBrowserEntry::enqueuedIcon(std::shared_ptr(nullptr));
+std::shared_ptr FileBrowserEntry::hdr(std::shared_ptr(nullptr));
+std::shared_ptr FileBrowserEntry::ps(std::shared_ptr(nullptr));
FileBrowserEntry::FileBrowserEntry (Thumbnail* thm, const Glib::ustring& fname)
: ThumbBrowserEntryBase (fname), wasInside(false), iatlistener(nullptr), press_x(0), press_y(0), action_x(0), action_y(0), rot_deg(0.0), landscape(true), cropParams(new rtengine::procparams::CropParams), cropgl(nullptr), state(SNormal), crop_custom_ratio(0.f)
@@ -61,11 +61,11 @@ FileBrowserEntry::FileBrowserEntry (Thumbnail* thm, const Glib::ustring& fname)
scale = 1;
if (!iconsLoaded) {
- editedIcon = RTImage::createPixbufFromFile ("tick-small.png");
- recentlySavedIcon = RTImage::createPixbufFromFile ("save-small.png");
- enqueuedIcon = RTImage::createPixbufFromFile ("gears-small.png");
- hdr = RTImage::createPixbufFromFile ("filetype-hdr.png");
- ps = RTImage::createPixbufFromFile ("filetype-ps.png");
+ editedIcon = std::shared_ptr(new RTPixbuf("tick-small", Gtk::ICON_SIZE_SMALL_TOOLBAR));
+ recentlySavedIcon = std::shared_ptr(new RTPixbuf("save-small", Gtk::ICON_SIZE_SMALL_TOOLBAR));
+ enqueuedIcon = std::shared_ptr(new RTPixbuf("gears-small", Gtk::ICON_SIZE_SMALL_TOOLBAR));
+ hdr = std::shared_ptr(new RTPixbuf("filetype-hdr", Gtk::ICON_SIZE_SMALL_TOOLBAR));
+ ps = std::shared_ptr(new RTPixbuf("filetype-ps", Gtk::ICON_SIZE_SMALL_TOOLBAR));
iconsLoaded = true;
}
@@ -134,15 +134,15 @@ std::vector> FileBrowserEntry::getIconsOnImageArea ()
std::vector> ret;
if (thumbnail->hasProcParams() && editedIcon) {
- ret.push_back(editedIcon);
+ ret.push_back(editedIcon->get());
}
if (thumbnail->isRecentlySaved() && recentlySavedIcon) {
- ret.push_back(recentlySavedIcon);
+ ret.push_back(recentlySavedIcon->get());
}
if (thumbnail->isEnqueued () && enqueuedIcon) {
- ret.push_back(enqueuedIcon);
+ ret.push_back(enqueuedIcon->get());
}
return ret;
@@ -157,11 +157,11 @@ std::vector> FileBrowserEntry::getSpecificityIconsOnIm
std::vector> ret;
if (thumbnail->isHDR() && hdr) {
- ret.push_back (hdr);
+ ret.push_back (hdr->get());
}
if (thumbnail->isPixelShift() && ps) {
- ret.push_back (ps);
+ ret.push_back (ps->get());
}
return ret;
@@ -195,8 +195,8 @@ void FileBrowserEntry::customBackBufferUpdate (Cairo::RefPtr c)
void FileBrowserEntry::getIconSize (int& w, int& h) const
{
- w = editedIcon->get_width ();
- h = editedIcon->get_height ();
+ w = editedIcon->get()->get_width ();
+ h = editedIcon->get()->get_height ();
}
FileThumbnailButtonSet* FileBrowserEntry::getThumbButtonSet ()
diff --git a/rtgui/filebrowserentry.h b/rtgui/filebrowserentry.h
index 67b953514..fcf916f00 100644
--- a/rtgui/filebrowserentry.h
+++ b/rtgui/filebrowserentry.h
@@ -35,6 +35,7 @@
class FileBrowserEntry;
class Thumbnail;
+class RTPixbuf;
struct FileBrowserEntryIdleHelper {
FileBrowserEntry* fbentry;
@@ -72,11 +73,11 @@ class FileBrowserEntry final : public ThumbBrowserEntryBase,
public:
- static Glib::RefPtr editedIcon;
- static Glib::RefPtr recentlySavedIcon;
- static Glib::RefPtr enqueuedIcon;
- static Glib::RefPtr hdr;
- static Glib::RefPtr ps;
+ static std::shared_ptr editedIcon;
+ static std::shared_ptr recentlySavedIcon;
+ static std::shared_ptr enqueuedIcon;
+ static std::shared_ptr hdr;
+ static std::shared_ptr ps;
FileBrowserEntry (Thumbnail* thm, const Glib::ustring& fname);
~FileBrowserEntry () override;
diff --git a/rtgui/filecatalog.cc b/rtgui/filecatalog.cc
index d6c440570..b01d83223 100644
--- a/rtgui/filecatalog.cc
+++ b/rtgui/filecatalog.cc
@@ -83,7 +83,7 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
trashButtonBox = Gtk::manage( new Gtk::Box(Gtk::ORIENTATION_VERTICAL) );
Gtk::Button* emptyT = Gtk::manage( new Gtk::Button ());
emptyT->set_tooltip_markup (M("FILEBROWSER_EMPTYTRASHHINT"));
- emptyT->set_image (*Gtk::manage(new RTImage ("trash-delete.png")));
+ emptyT->set_image (*Gtk::manage(new RTImage ("trash-delete", Gtk::ICON_SIZE_LARGE_TOOLBAR)));
emptyT->signal_pressed().connect (sigc::mem_fun(*this, &FileCatalog::emptyTrash));
trashButtonBox->pack_start (*emptyT, Gtk::PACK_SHRINK, 4);
emptyT->show ();
@@ -93,8 +93,8 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
hbToolBar1 = Gtk::manage(new Gtk::Box ());
//setup BrowsePath
- iRefreshWhite = new RTImage("refresh-small.png");
- iRefreshRed = new RTImage("refresh-red-small.png");
+ iRefreshWhite = new RTImage("refresh-small", Gtk::ICON_SIZE_BUTTON);
+ iRefreshRed = new RTImage("refresh-red-small", Gtk::ICON_SIZE_BUTTON);
BrowsePath = Gtk::manage(new Gtk::Entry ());
BrowsePath->set_width_chars (50);
@@ -113,7 +113,7 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
BrowsePath->signal_key_press_event().connect(sigc::mem_fun(*this, &FileCatalog::BrowsePath_key_pressed));
//setup Query
- iQueryClear = new RTImage("cancel-small.png");
+ iQueryClear = new RTImage("cancel-small", Gtk::ICON_SIZE_BUTTON);
Gtk::Label* labelQuery = Gtk::manage(new Gtk::Label(M("FILEBROWSER_QUERYLABEL")));
Query = Gtk::manage(new Gtk::Entry ()); // cannot use Gtk::manage here as FileCatalog::getFilter will fail on Query->get_text()
Query->set_text("");
@@ -151,8 +151,8 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
pack_start (*stb, Gtk::PACK_SHRINK);
tbLeftPanel_1 = new Gtk::ToggleButton ();
- iLeftPanel_1_Show = new RTImage("panel-to-right.png");
- iLeftPanel_1_Hide = new RTImage("panel-to-left.png");
+ iLeftPanel_1_Show = new RTImage("panel-to-right", Gtk::ICON_SIZE_LARGE_TOOLBAR);
+ iLeftPanel_1_Hide = new RTImage("panel-to-left", Gtk::ICON_SIZE_LARGE_TOOLBAR);
tbLeftPanel_1->set_relief(Gtk::RELIEF_NONE);
tbLeftPanel_1->set_active (true);
@@ -164,11 +164,11 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
vSepiLeftPanel = new Gtk::Separator(Gtk::ORIENTATION_VERTICAL);
buttonBar->pack_start (*vSepiLeftPanel, Gtk::PACK_SHRINK);
- iFilterClear = new RTImage ("filter-clear.png");
- igFilterClear = new RTImage ("filter.png");
+ iFilterClear = new RTImage ("filter-clear", Gtk::ICON_SIZE_LARGE_TOOLBAR);
+ igFilterClear = new RTImage ("filter", Gtk::ICON_SIZE_LARGE_TOOLBAR);
bFilterClear = Gtk::manage(new Gtk::ToggleButton ());
bFilterClear->set_active (true);
- bFilterClear->set_image(*iFilterClear);// (*Gtk::manage(new RTImage ("filter-clear.png")));
+ bFilterClear->set_image(*iFilterClear);
bFilterClear->set_relief (Gtk::RELIEF_NONE);
bFilterClear->set_tooltip_markup (M("FILEBROWSER_SHOWDIRHINT"));
bFilterClear->signal_button_press_event().connect (sigc::mem_fun(*this, &FileCatalog::capture_event), false);
@@ -182,8 +182,8 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
fltrLabelbox = Gtk::manage (new Gtk::Box());
fltrLabelbox->get_style_context()->add_class("smallbuttonbox");
- iUnRanked = new RTImage ("star-gold-hollow-small.png");
- igUnRanked = new RTImage ("star-hollow-small.png");
+ iUnRanked = new RTImage ("star-gold-hollow-small", Gtk::ICON_SIZE_BUTTON);
+ igUnRanked = new RTImage ("star-hollow-small", Gtk::ICON_SIZE_BUTTON);
bUnRanked = Gtk::manage( new Gtk::ToggleButton () );
bUnRanked->get_style_context()->add_class("smallbutton");
bUnRanked->set_active (false);
@@ -195,8 +195,8 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
bUnRanked->signal_button_press_event().connect (sigc::mem_fun(*this, &FileCatalog::capture_event), false);
for (int i = 0; i < 5; i++) {
- iranked[i] = new RTImage ("star-gold-small.png");
- igranked[i] = new RTImage ("star-small.png");
+ iranked[i] = new RTImage ("star-gold-small", Gtk::ICON_SIZE_BUTTON);
+ igranked[i] = new RTImage ("star-small", Gtk::ICON_SIZE_BUTTON);
iranked[i]->show ();
igranked[i]->show ();
bRank[i] = Gtk::manage( new Gtk::ToggleButton () );
@@ -210,11 +210,11 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
// Toolbar
// Similar image arrays in filebrowser.cc
- std::array clabelActiveIcons = {"circle-gray-small.png", "circle-red-small.png", "circle-yellow-small.png", "circle-green-small.png", "circle-blue-small.png", "circle-purple-small.png"};
- std::array