From bcbb45454a0038c0d28923382de379fd17831d36 Mon Sep 17 00:00:00 2001 From: Hombre Date: Tue, 29 Dec 2015 03:52:50 +0100 Subject: [PATCH] Updated icons (from Drslony), code cleanup and bugfix --- .../images/Dark/actions/intent-absolute.png | Bin 670 -> 710 bytes .../images/Dark/actions/intent-relative.png | Bin 1072 -> 1140 bytes .../images/Light/actions/intent-absolute.png | Bin 674 -> 700 bytes .../images/Light/actions/intent-relative.png | Bin 1057 -> 1101 bytes rtdata/languages/default | 1 + rtengine/iccstore.h | 4 +- rtengine/improccoordinator.cc | 4 +- rtengine/improccoordinator.h | 6 +- rtengine/improcfun.cc | 2 +- rtengine/improcfun.h | 8 +- rtengine/iplab2rgb.cc | 6 +- rtengine/procparams.h | 6 +- rtengine/rtengine.h | 4 +- rtengine/settings.h | 2 +- rtgui/editorpanel.cc | 37 +++++--- rtgui/icmpanel.cc | 14 ++- rtgui/icmpanel.h | 1 + rtgui/options.cc | 4 +- rtgui/options.h | 2 +- rtgui/preferences.cc | 29 ++++++- .../source_icons/scalable/intent-absolute.svg | 60 ++++--------- .../source_icons/scalable/intent-relative.svg | 80 ++++++------------ 22 files changed, 135 insertions(+), 135 deletions(-) diff --git a/rtdata/images/Dark/actions/intent-absolute.png b/rtdata/images/Dark/actions/intent-absolute.png index 7732eba534d0ac33ee87d0275054fa27426bcb94..6d274a2c0aa81d1a0965843aa6040aacbe205a22 100644 GIT binary patch delta 611 zcmV-p0-XJx1;z!CZhu2bL_t(YiN%)9OH@%9#((d*7t@i^E>Zz z4(B}vP_0(`Tdh`y_x^WRSJ%%{snjAv89=2{c?b*wn3;edz<+1pQxrvWrBZ46*pOm`jr6Q4A15XgKGNbxrqD z2%(X+=e}wm{Jjvu#jMSpb4%rN`H9Qg_`j)ryCx)^&41k7>|2r~lQDp#E6%yASwlhy z-C29?D+8FCn!1xdBiWjptqu+9>+3xz_V*=**bD2jm|NquRA z{lE!H09+epHXA~C@4cTLA0MwBrkxldilV#T`$6X%l1Qgv!^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TegE<0?!hahwI<5m6q%QnDNo zQBzfG0P3oGR45eQRw@R#w7FrDC_Yw@tNL zeP*o>2{}Rz}0QQOKkciHVF@xJQh=4>cX8tm5kVFJk1rc2UcqJmg zI)9E+&tx)twOXwQ0IRF3b8~ZZAIEY0P((7;+H8vC6u_I&don*94$U~q%-ZYqCLX17 zx%{Z#?{6^kr_8*ms!uUyJ9o;kA;YxhUCKTC`z{-ub_r$J*( jUqsHsFg%;}z-jRxH8sv)OjXS600000NkvXXu0mjfc<8`G diff --git a/rtdata/languages/default b/rtdata/languages/default index 4f0dae8f7..d83171de2 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -657,6 +657,7 @@ HISTORY_MSG_423;Retinex - Gamma slope HISTORY_MSG_424;Retinex - HL threshold HISTORY_MSG_425;Retinex - Log base HISTORY_MSG_426;Retinex - Hue equalizer +HISTORY_MSG_427;Output rendering intent HISTORY_NEWSNAPSHOT;Add HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s HISTORY_SNAPSHOT;Snapshot diff --git a/rtengine/iccstore.h b/rtengine/iccstore.h index 6b41987f7..8b6e6465c 100644 --- a/rtengine/iccstore.h +++ b/rtengine/iccstore.h @@ -91,7 +91,7 @@ public: // Main monitors standard profile name, from OS void findDefaultMonitorProfile (); cmsHPROFILE getDefaultMonitorProfile () const; - Glib::ustring getDefaultMonitorProfileStr () const; + Glib::ustring getDefaultMonitorProfileName () const; cmsHPROFILE workingSpace (const Glib::ustring& name) const; cmsHPROFILE workingSpaceGamma (const Glib::ustring& name) const; @@ -135,7 +135,7 @@ inline cmsHPROFILE ICCStore::getDefaultMonitorProfile () const return getProfile (defaultMonitorProfile); } -inline Glib::ustring ICCStore::getDefaultMonitorProfileStr () const +inline Glib::ustring ICCStore::getDefaultMonitorProfileName () const { return defaultMonitorProfile; } diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index 62de26076..8d700a0cc 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -1138,7 +1138,7 @@ void ImProcCoordinator::setSoftProofing (bool softProof) softProofing = softProof; } -void ImProcCoordinator::setMonitorProfile (Glib::ustring profile, eRenderingIntent intent) +void ImProcCoordinator::setMonitorProfile (Glib::ustring profile, RenderingIntent intent) { if (profile != monitorProfile) { monitorProfile = profile; @@ -1150,7 +1150,7 @@ void ImProcCoordinator::setMonitorProfile (Glib::ustring profile, eRenderingInte } } -void ImProcCoordinator::getMonitorProfile (Glib::ustring &profile, eRenderingIntent &intent) +void ImProcCoordinator::getMonitorProfile (Glib::ustring &profile, RenderingIntent &intent) { profile = monitorProfile; intent = monitorIntent; diff --git a/rtengine/improccoordinator.h b/rtengine/improccoordinator.h index 901804eba..31f9543b6 100644 --- a/rtengine/improccoordinator.h +++ b/rtengine/improccoordinator.h @@ -74,7 +74,7 @@ protected: Glib::ustring monitorProfile; - eRenderingIntent monitorIntent; + RenderingIntent monitorIntent; int scale; bool highDetailPreprocessComputed; @@ -256,8 +256,8 @@ public: void getSpotWB (int x, int y, int rectSize, double& temp, double& green); void getAutoCrop (double ratio, int &x, int &y, int &w, int &h); - void setMonitorProfile (Glib::ustring profile, eRenderingIntent intent); - void getMonitorProfile (Glib::ustring &profile, eRenderingIntent &intent); + void setMonitorProfile (Glib::ustring profile, RenderingIntent intent); + void getMonitorProfile (Glib::ustring &profile, RenderingIntent &intent); void setSoftProofing (bool softProof); bool updateTryLock () diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 18b5eed6d..18ffc0e8d 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -188,7 +188,7 @@ void ImProcFunctions::CAT02 (Imagefloat* baseImg, const ProcParams* params) */ -void ImProcFunctions::updateColorProfiles (const ColorManagementParams &icm, Glib::ustring monitorProfile, eRenderingIntent monitorIntent, bool softProofing) +void ImProcFunctions::updateColorProfiles (const ColorManagementParams &icm, Glib::ustring monitorProfile, RenderingIntent monitorIntent, bool softProofing) { // set up monitor transform if (monitorTransform != NULL) { diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index c34219c0d..af49cb937 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -233,7 +233,7 @@ public: bool needsPCVignetting (); void firstAnalysis (Imagefloat* working, const ProcParams* params, LUTu & vhist16); - void updateColorProfiles (const ColorManagementParams &icm, Glib::ustring monitorProfile, eRenderingIntent monitorIntent, bool softProofing); + void updateColorProfiles (const ColorManagementParams &icm, Glib::ustring monitorProfile, RenderingIntent monitorIntent, bool softProofing); void rgbProc (Imagefloat* working, LabImage* lab, EditBuffer *editBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit , float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clcurve, LUTf & cl2curve, const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, const ToneCurve & customToneCurvebw1, const ToneCurve & customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, DCPProfile *dcpProf); @@ -380,9 +380,9 @@ public: void Badpixelscam(CieImage * src, CieImage * dst, double radius, int thresh, int mode, float b_l, float t_l, float t_r, float b_r, float skinprot, float chrom, int hotbad); void BadpixelsLab(LabImage * src, LabImage * dst, double radius, int thresh, int mode, float b_l, float t_l, float t_r, float b_r, float skinprot, float chrom); - Image8* lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, Glib::ustring profile, eRenderingIntent intent, bool standard_gamma); - Image16* lab2rgb16b (LabImage* lab, int cx, int cy, int cw, int ch, Glib::ustring profile, eRenderingIntent intent, Glib::ustring profi, Glib::ustring gam, bool freegamma, double gampos, double slpos, double &ga0, double &ga1, double &ga2, double &ga3, double &ga4, double &ga5, double &ga6, bool bw);// for gamma output - Image16* lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int ch, Glib::ustring profile, eRenderingIntent intent, bool bw);//without gamma ==>default + Image8* lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, Glib::ustring profile, RenderingIntent intent, bool standard_gamma); + Image16* lab2rgb16b (LabImage* lab, int cx, int cy, int cw, int ch, Glib::ustring profile, RenderingIntent intent, Glib::ustring profi, Glib::ustring gam, bool freegamma, double gampos, double slpos, double &ga0, double &ga1, double &ga2, double &ga3, double &ga4, double &ga5, double &ga6, bool bw);// for gamma output + Image16* lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int ch, Glib::ustring profile, RenderingIntent intent, bool bw);//without gamma ==>default // CieImage *ciec; bool transCoord (int W, int H, int x, int y, int w, int h, int& xv, int& yv, int& wv, int& hv, double ascaleDef = -1, const LCPMapper *pLCPMap = NULL); diff --git a/rtengine/iplab2rgb.cc b/rtengine/iplab2rgb.cc index a727423ef..a53bdb8e1 100644 --- a/rtengine/iplab2rgb.cc +++ b/rtengine/iplab2rgb.cc @@ -134,7 +134,7 @@ void ImProcFunctions::lab2monitorRgb (LabImage* lab, Image8* image, bool softPro } } -Image8* ImProcFunctions::lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, Glib::ustring profile, eRenderingIntent intent, bool standard_gamma) +Image8* ImProcFunctions::lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, Glib::ustring profile, RenderingIntent intent, bool standard_gamma) { //gamutmap(lab); @@ -259,7 +259,7 @@ Image8* ImProcFunctions::lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, return image; } // for default (not gamma) -Image16* ImProcFunctions::lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int ch, Glib::ustring profile, eRenderingIntent intent, bool bw) +Image16* ImProcFunctions::lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int ch, Glib::ustring profile, RenderingIntent intent, bool bw) { //gamutmap(lab); @@ -363,7 +363,7 @@ Image16* ImProcFunctions::lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int // for gamma options (BT709...sRGB linear...) -Image16* ImProcFunctions::lab2rgb16b (LabImage* lab, int cx, int cy, int cw, int ch, Glib::ustring profile, eRenderingIntent intent, Glib::ustring profi, Glib::ustring gam, bool freegamma, double gampos, double slpos, double &ga0, double &ga1, double &ga2, double &ga3, double &ga4, double &ga5, double &ga6, bool bw) +Image16* ImProcFunctions::lab2rgb16b (LabImage* lab, int cx, int cy, int cw, int ch, Glib::ustring profile, RenderingIntent intent, Glib::ustring profi, Glib::ustring gam, bool freegamma, double gampos, double slpos, double &ga0, double &ga1, double &ga2, double &ga3, double &ga4, double &ga5, double &ga6, bool bw) { //gamutmap(lab); diff --git a/rtengine/procparams.h b/rtengine/procparams.h index cbbbed7a5..1103d274d 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -42,13 +42,13 @@ class WavOpacityCurveW; class WavOpacityCurveWL; class RetinextransmissionCurve; -typedef enum RenderingIntent { +enum RenderingIntent { RI_PERCEPTUAL = INTENT_PERCEPTUAL, RI_RELATIVE = INTENT_RELATIVE_COLORIMETRIC, RI_SATURATION = INTENT_SATURATION, RI_ABSOLUTE = INTENT_ABSOLUTE_COLORIMETRIC, RI__COUNT -} eRenderingIntent; +}; namespace procparams { @@ -950,7 +950,7 @@ public: int dcpIlluminant; Glib::ustring working; Glib::ustring output; - eRenderingIntent outputIntent; + RenderingIntent outputIntent; static const Glib::ustring NoICMString; Glib::ustring gamma; diff --git a/rtengine/rtengine.h b/rtengine/rtengine.h index d10acb561..0c6999158 100644 --- a/rtengine/rtengine.h +++ b/rtengine/rtengine.h @@ -416,8 +416,8 @@ public: virtual void setRetinexListener (RetinexListener* l) = 0; virtual void setWaveletListener (WaveletListener* l) = 0; - virtual void setMonitorProfile (Glib::ustring monitorProfile, eRenderingIntent intent) = 0; - virtual void getMonitorProfile (Glib::ustring &monitorProfile, eRenderingIntent &intent) = 0; + virtual void setMonitorProfile (Glib::ustring monitorProfile, RenderingIntent intent) = 0; + virtual void getMonitorProfile (Glib::ustring &monitorProfile, RenderingIntent &intent) = 0; virtual void setSoftProofing (bool softProof) = 0; virtual ~StagedImageProcessor () {} diff --git a/rtengine/settings.h b/rtengine/settings.h index 98c85ba6f..3e9c9d38a 100644 --- a/rtengine/settings.h +++ b/rtengine/settings.h @@ -39,7 +39,7 @@ public: int leveldnautsimpl; // STD or EXPERT Glib::ustring monitorProfile; ///< ICC profile name used for the monitor - eRenderingIntent monitorIntent; ///< Colorimetric intent used with the above profile + RenderingIntent monitorIntent; ///< Colorimetric intent used with the above profile bool autoMonitorProfile; ///< Try to auto-determine the correct monitor color profile bool autocielab; bool rgbcurveslumamode_gamut;// controls gamut enforcement for RGB curves in lumamode diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index f27e27467..518b5ad8d 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -62,7 +62,7 @@ private: profileBox->append_text (M("PREFERENCES_PROFILE_NONE")); #if defined(WIN32) - profileBox->append_text (M("MONITOR_PROFILE_SYSTEM") + " (" + rtengine::iccStore->getDefaultMonitorProfileStr() + ")"); + profileBox->append_text (M("MONITOR_PROFILE_SYSTEM") + " (" + rtengine::iccStore->getDefaultMonitorProfileName() + ")"); profileBox->set_active (options.rtSettings.autoMonitorProfile ? 1 : 0); #else profileBox->set_active (0); @@ -77,8 +77,7 @@ private: void prepareIntentBox () { - PopUpButton *bt = new PopUpButton(Glib::ustring(), true); - intentBox = Gtk::manage(bt); + intentBox = Gtk::manage(new PopUpButton(Glib::ustring(), true)); intentBox->addEntry("intent-relative.png", M("PREFERENCES_INTENT_RELATIVE")); intentBox->addEntry("intent-perceptual.png", M("PREFERENCES_INTENT_PERCEPTUAL")); intentBox->addEntry("intent-absolute.png", M("PREFERENCES_INTENT_ABSOLUTE")); @@ -90,6 +89,7 @@ private: void softProofToggled () { if (processor) { + processor->beginUpdateParams (); processor->setSoftProofing( softProof->get_active() ); processor->endUpdateParams ( rtengine::EvMonitorTransform ); } @@ -106,7 +106,7 @@ private: profileBox->set_tooltip_text(profileBox->get_active_text ()); #ifdef WIN32 if (profileBox->get_active_row_number () == 1) { - profile = rtengine::iccStore->getDefaultMonitorProfileStr (); + profile = rtengine::iccStore->getDefaultMonitorProfileName (); if (profile.empty()) { profile = options.rtSettings.monitorProfile; } @@ -152,7 +152,15 @@ private: softProof->set_sensitive(true); } - rtengine::eRenderingIntent intent = intentBox->getSelected() > 0 ? (intentBox->getSelected() == 1 ? rtengine::RI_PERCEPTUAL : rtengine::RI_ABSOLUTE) : rtengine::RI_RELATIVE; + rtengine::RenderingIntent intent = rtengine::RI_PERCEPTUAL; + switch (intentBox->getSelected()) { + case (0): + intent = rtengine::RI_RELATIVE; + break; + case (2): + intent = rtengine::RI_ABSOLUTE; + break; + } if (!processor) { return; @@ -165,10 +173,20 @@ private: // ...or store them locally processor->beginUpdateParams (); if (options.rtSettings.verbose) { - printf("Monitor profile: %s, Intent: %s)\n", - profile.empty() ? "None" : profile.c_str(), - intent > 0 ? M("PREFERENCES_INTENT_PERCEPTUAL").c_str() : M("PREFERENCES_INTENT_RELATIVE").c_str() - ); + Glib::ustring intentName; + switch (intent) { + case (0): + intentName = M("PREFERENCES_INTENT_RELATIVE"); + break; + case (1): + intentName = M("PREFERENCES_INTENT_PERCEPTUAL"); + break; + case (2): + default: // to avoid complains from gcc + intentName = M("PREFERENCES_INTENT_ABSOLUTE"); + break; + } + printf("Monitor profile: %s, Intent: %s)\n", profile.empty() ? "None" : profile.c_str(), intentName.c_str()); } processor->setMonitorProfile(profile, intent); processor->endUpdateParams (rtengine::EvMonitorTransform); @@ -185,7 +203,6 @@ public: reset (); } - // HOMBRE: renamed to 'pack_end_in', because 'pack_end' already widely used by Gtk::Widget in a different way void pack_end_in (Gtk::Box* box) { box->pack_end (*softProof, Gtk::PACK_SHRINK, 0); diff --git a/rtgui/icmpanel.cc b/rtgui/icmpanel.cc index 8b2965cab..d24ec9312 100644 --- a/rtgui/icmpanel.cc +++ b/rtgui/icmpanel.cc @@ -292,7 +292,7 @@ ICMPanel::ICMPanel () : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iunch wnames->signal_changed().connect( sigc::mem_fun(*this, &ICMPanel::wpChanged) ); onames->signal_changed().connect( sigc::mem_fun(*this, &ICMPanel::opChanged) ); - ointent->signal_changed().connect( sigc::mem_fun(*this, &ICMPanel::opChanged) ); + ointent->signal_changed().connect( sigc::mem_fun(*this, &ICMPanel::oiChanged) ); wgamma->signal_changed().connect( sigc::mem_fun(*this, &ICMPanel::gpChanged) ); dcpIll->signal_changed().connect( sigc::mem_fun(*this, &ICMPanel::dcpIlluminantChanged) ); @@ -623,7 +623,7 @@ void ICMPanel::write (ProcParams* pp, ParamsEdited* pedited) int ointentVal = ointent->get_active_row_number(); if (ointentVal >= 0 && ointentVal < RI__COUNT) { - pp->icm.outputIntent = static_cast(ointentVal); + pp->icm.outputIntent = static_cast(ointentVal); } else { pp->icm.outputIntent = rtengine::RI_PERCEPTUAL; } @@ -900,7 +900,15 @@ void ICMPanel::opChanged () { if (listener) { - listener->panelChanged (EvOProfile, Glib::ustring(onames->get_active_text())+Glib::ustring("\n")+ointent->get_active_text()); + listener->panelChanged (EvOProfile, onames->get_active_text()); + } +} + +void ICMPanel::oiChanged () +{ + + if (listener) { + listener->panelChanged (EvOIntent, ointent->get_active_text()); } } diff --git a/rtgui/icmpanel.h b/rtgui/icmpanel.h index e10f42b20..863e88a46 100644 --- a/rtgui/icmpanel.h +++ b/rtgui/icmpanel.h @@ -108,6 +108,7 @@ public: void wpChanged (); void opChanged (); + void oiChanged (); void ipChanged (); void gpChanged (); void GamChanged (); diff --git a/rtgui/options.cc b/rtgui/options.cc index 1ffc74e2b..c2e31ec38 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -1462,7 +1462,7 @@ int Options::readFromFile (Glib::ustring fname) } if (keyFile.has_key ("Color Management", "Intent")) { - rtSettings.monitorIntent = static_cast(keyFile.get_integer("Color Management", "Intent")); + rtSettings.monitorIntent = static_cast(keyFile.get_integer("Color Management", "Intent")); } if (keyFile.has_key ("Color Management", "CRI")) { @@ -1714,7 +1714,7 @@ int Options::readFromFile (Glib::ustring fname) } if (keyFile.has_key ("Fast Export", "fastexport_icm_output_intent" )) { - fastexport_icm_outputIntent = static_cast(keyFile.get_integer ("Fast Export", "fastexport_icm_output_intent" )); + fastexport_icm_outputIntent = static_cast(keyFile.get_integer ("Fast Export", "fastexport_icm_output_intent" )); } if (keyFile.has_key ("Fast Export", "fastexport_icm_gamma" )) { diff --git a/rtgui/options.h b/rtgui/options.h index 969b66642..b896f4129 100644 --- a/rtgui/options.h +++ b/rtgui/options.h @@ -264,7 +264,7 @@ public: Glib::ustring fastexport_icm_input; Glib::ustring fastexport_icm_working; Glib::ustring fastexport_icm_output; - rtengine::eRenderingIntent fastexport_icm_outputIntent; + rtengine::RenderingIntent fastexport_icm_outputIntent; Glib::ustring fastexport_icm_gamma; bool fastexport_resize_enabled; double fastexport_resize_scale; diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index 4551b6bad..68f8206e1 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -705,7 +705,8 @@ Gtk::Widget* Preferences::getColorManagementPanel () monIntent->append_text (M("PREFERENCES_INTENT_RELATIVE")); monIntent->append_text (M("PREFERENCES_INTENT_PERCEPTUAL")); - monIntent->set_active (0); + monIntent->append_text (M("PREFERENCES_INTENT_ABSOLUTE")); + monIntent->set_active (1); iccDir->signal_selection_changed ().connect (sigc::mem_fun (this, &Preferences::iccDirChanged)); @@ -1446,7 +1447,18 @@ void Preferences::storePreferences () #if !defined(__APPLE__) // monitor profile not supported on apple moptions.rtSettings.monitorProfile = monProfile->get_active_text (); - moptions.rtSettings.monitorIntent = monIntent->get_active_row_number () > 0 ? rtengine::RI_PERCEPTUAL : rtengine::RI_RELATIVE; + switch (monIntent->get_active_row_number ()) { + case (0): + moptions.rtSettings.monitorIntent = rtengine::RI_RELATIVE; + break; + case (2): + moptions.rtSettings.monitorIntent = rtengine::RI_ABSOLUTE; + break; + case (1): + default: + moptions.rtSettings.monitorIntent = rtengine::RI_PERCEPTUAL; + break; + } #if defined(WIN32) moptions.rtSettings.autoMonitorProfile = cbAutoMonProfile->get_active (); #endif @@ -1565,7 +1577,18 @@ void Preferences::fillPreferences () #if !defined(__APPLE__) // monitor profile not supported on apple setActiveTextOrIndex (*monProfile, moptions.rtSettings.monitorProfile, 0); - monIntent->set_active (moptions.rtSettings.monitorIntent == INTENT_PERCEPTUAL ? 1 : 0); + switch (moptions.rtSettings.monitorIntent) { + case(0) : + monIntent->set_active (0); + break; + case(2) : + monIntent->set_active (2); + break; + case(1) : + default: + monIntent->set_active (1); + break; + } #if defined(WIN32) cbAutoMonProfile->set_active(moptions.rtSettings.autoMonitorProfile); #endif diff --git a/tools/source_icons/scalable/intent-absolute.svg b/tools/source_icons/scalable/intent-absolute.svg index 799deffc0..b5092b0c5 100644 --- a/tools/source_icons/scalable/intent-absolute.svg +++ b/tools/source_icons/scalable/intent-absolute.svg @@ -15,7 +15,7 @@ id="svg2" sodipodi:version="0.32" inkscape:version="0.91 r13725" - sodipodi:docname="intent-absolute.svg" + sodipodi:docname="intent-absolute-3.svg" inkscape:export-filename="/home/philippe/devel/rawtherapee/icons/NewIcons/distorsion.png" inkscape:export-xdpi="1.98" inkscape:export-ydpi="1.98" @@ -27,9 +27,9 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="0.28397906" - inkscape:cx="497.94487" - inkscape:cy="-71.539587" + inkscape:zoom="0.5" + inkscape:cx="400" + inkscape:cy="350" inkscape:document-units="px" inkscape:current-layer="svg2" showguides="true" @@ -47,7 +47,13 @@ inkscape:bbox-nodes="true" inkscape:snap-bbox-edge-midpoints="true" inkscape:snap-bbox-midpoints="true" - inkscape:snap-global="false" /> + inkscape:snap-global="true" + inkscape:object-paths="false" + inkscape:snap-intersection-paths="false" + inkscape:object-nodes="true" + inkscape:snap-smooth-nodes="false" + inkscape:snap-midpoints="false" + inkscape:snap-nodes="true" /> - + id="path5187" + style="opacity:0.7;fill:none;fill-rule:evenodd;stroke:#2a7fff;stroke-width:50;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 39.8267,50 c 372.08564,0 376.87989,202 720.3466,202 M 39.8267,150 c 372.08564,0 376.87989,102 720.3466,102 m -720.346599,0 720.346599,0" /> - - - + id="path5189" + style="opacity:0.7;fill:none;fill-rule:evenodd;stroke:#2a7fff;stroke-width:50;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 39.826704,649.33407 C 408.29238,649.33407 404.24771,550 760.1733,550 m -720.346599,0 720.346599,0" /> diff --git a/tools/source_icons/scalable/intent-relative.svg b/tools/source_icons/scalable/intent-relative.svg index 1cd7135f2..706de23d1 100644 --- a/tools/source_icons/scalable/intent-relative.svg +++ b/tools/source_icons/scalable/intent-relative.svg @@ -15,7 +15,7 @@ id="svg2" sodipodi:version="0.32" inkscape:version="0.91 r13725" - sodipodi:docname="intent-relative.svg" + sodipodi:docname="intent-relative-3.svg" inkscape:export-filename="/home/philippe/devel/rawtherapee/icons/NewIcons/distorsion.png" inkscape:export-xdpi="1.98" inkscape:export-ydpi="1.98" @@ -27,9 +27,9 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="0.20080352" - inkscape:cx="1490.3375" - inkscape:cy="469.77917" + inkscape:zoom="0.40160704" + inkscape:cx="315.89751" + inkscape:cy="196.7604" inkscape:document-units="px" inkscape:current-layer="svg2" showguides="true" @@ -47,7 +47,14 @@ inkscape:bbox-nodes="true" inkscape:snap-bbox-edge-midpoints="true" inkscape:snap-bbox-midpoints="true" - inkscape:snap-global="false" /> + inkscape:snap-global="true" + inkscape:object-paths="false" + inkscape:snap-intersection-paths="false" + inkscape:object-nodes="true" + inkscape:snap-smooth-nodes="false" + inkscape:snap-midpoints="false" + inkscape:snap-nodes="true" + inkscape:snap-page="false" /> + id="clipPath7774"> + + + + d="m -48.208488,-24.69248 0,219.02655 896.416978,0 0,-219.02655 -896.416978,0 z" + id="path7780" + inkscape:connector-curvature="0" /> image/svg+xml - + - - - - - - + d="m 39.826704,649.33407 c 368.465676,0 364.421006,-201.42391 720.346596,-201.42391 M 39.8267,50 c 372.08564,0 376.87989,99.91016 720.3466,99.91016 M 39.8267,150 c 372.08564,0 376.87989,-0.0898 720.3466,-0.0898 M 39.826701,550 C 403.19705,550 404.27294,447.91016 760.1733,447.91016 M 39.826701,450 C 405.68704,450 405.51794,347.91016 760.1733,347.91016 M 39.826701,252 C 411.99422,252 414.41617,149.91016 760.1733,149.91016 M 39.826701,350 C 410.66703,350 410.49793,247.91016 760.1733,247.91016" />