From 84379ffb7d6c46879fd466ae374c74aa6d051693 Mon Sep 17 00:00:00 2001 From: Oleg Koncevoy Date: Mon, 27 Nov 2017 17:00:09 +0200 Subject: [PATCH 1/7] Removed histogram profile settings from preferences window. modified: ../rtgui/preferences.cc modified: ../rtgui/preferences.h --- rtgui/preferences.cc | 8 +------- rtgui/preferences.h | 1 - 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index 3f414321b..7e6018ff0 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -990,18 +990,14 @@ Gtk::Widget* Preferences::getGeneralPanel () ckbHistogramPositionLeft = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_HISTOGRAMPOSITIONLEFT")) ); setExpandAlignProperties (ckbHistogramPositionLeft, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - ckbHistogramWorking = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_HISTOGRAMWORKING")) ); - setExpandAlignProperties (ckbHistogramWorking, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - ckbHistogramWorking->set_tooltip_markup (M ("PREFERENCES_HISTOGRAM_TOOLTIP")); workflowGrid->attach_next_to (*ckbHistogramPositionLeft, *curveBBoxPosL, Gtk::POS_BOTTOM, 1, 1); - workflowGrid->attach_next_to (*ckbHistogramWorking, *curveBBoxPosC, Gtk::POS_BOTTOM, 2, 1); ckbFileBrowserToolbarSingleRow = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_FILEBROWSERTOOLBARSINGLEROW")) ); setExpandAlignProperties (ckbFileBrowserToolbarSingleRow, false, false, Gtk::ALIGN_START, Gtk::ALIGN_START); ckbShowFilmStripToolBar = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_SHOWFILMSTRIPTOOLBAR")) ); setExpandAlignProperties (ckbShowFilmStripToolBar, false, false, Gtk::ALIGN_START, Gtk::ALIGN_START); workflowGrid->attach_next_to (*ckbFileBrowserToolbarSingleRow, *ckbHistogramPositionLeft, Gtk::POS_BOTTOM, 1, 1); - workflowGrid->attach_next_to (*ckbShowFilmStripToolBar, *ckbHistogramWorking, Gtk::POS_BOTTOM, 2, 1); + workflowGrid->attach_next_to (*ckbShowFilmStripToolBar, *curveBBoxPosC, Gtk::POS_BOTTOM, 2, 1); Gtk::Label* hb4label = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_TP_LABEL")) ); setExpandAlignProperties (hb4label, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); @@ -1757,7 +1753,6 @@ void Preferences::storePreferences () // moptions.rtSettings.viewinggreySc = greySc->get_active_row_number (); // moptions.rtSettings.autocielab = cbAutocielab->get_active (); moptions.rtSettings.ciecamfloat = cbciecamfloat->get_active (); - moptions.rtSettings.HistogramWorking = ckbHistogramWorking->get_active (); moptions.rtSettings.leveldnv = dnv->get_active_row_number (); moptions.rtSettings.leveldnti = dnti->get_active_row_number (); moptions.rtSettings.leveldnliss = dnliss->get_active_row_number (); @@ -1928,7 +1923,6 @@ void Preferences::fillPreferences () // cbAutocielab->set_active (moptions.rtSettings.autocielab); cbciecamfloat->set_active (moptions.rtSettings.ciecamfloat); - ckbHistogramWorking->set_active (moptions.rtSettings.HistogramWorking); languages->set_active_text (moptions.language); ckbLangAutoDetect->set_active (moptions.languageAutoDetect); int themeNbr = getThemeRowNumber (moptions.theme); diff --git a/rtgui/preferences.h b/rtgui/preferences.h index b3efd8b6a..70cef4bee 100644 --- a/rtgui/preferences.h +++ b/rtgui/preferences.h @@ -195,7 +195,6 @@ class Preferences : public Gtk::Dialog, public ProfileStoreListener Gtk::ComboBoxText* custProfBuilderLabelType; Gtk::CheckButton* ckbHistogramPositionLeft; - Gtk::CheckButton* ckbHistogramWorking; Gtk::CheckButton* ckbFileBrowserToolbarSingleRow; Gtk::CheckButton* ckbShowFilmStripToolBar; Gtk::CheckButton* ckbHideTPVScrollbar; From 4c76c7456f9cc6707450606d52c7c735a50d54da Mon Sep 17 00:00:00 2001 From: Oleg Koncevoy Date: Mon, 27 Nov 2017 17:00:51 +0200 Subject: [PATCH 2/7] Added a histogram profile settings toggle button. Now working histogram profile can be changed without entering the preferences window. modified: ../rtgui/editorpanel.cc modified: ../rtgui/editorpanel.h --- rtgui/editorpanel.cc | 17 +++++++++++++++++ rtgui/editorpanel.h | 2 ++ 2 files changed, 19 insertions(+) diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index cf5dcba89..21286ca01 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -585,6 +585,13 @@ EditorPanel::EditorPanel (FilePanel* filePanel) Gtk::VSeparator* vsep1 = Gtk::manage (new Gtk::VSeparator ()); Gtk::VSeparator* vsep2 = Gtk::manage (new Gtk::VSeparator ()); + // Histogram profile toggle controls + toggleHistogramProfile = Gtk::manage (new Gtk::ToggleButton ()); + toggleHistogramProfile->set_relief(Gtk::RELIEF_NONE); + toggleHistogramProfile->set_active(options.rtSettings.HistogramWorking); + + Gtk::VSeparator* vsep3 = Gtk::manage (new Gtk::VSeparator ()); + iareapanel = new ImageAreaPanel (); tpc->setEditProvider (iareapanel->imageArea); tpc->getToolBar()->setLockablePickerToolListener (iareapanel->imageArea); @@ -607,6 +614,10 @@ EditorPanel::EditorPanel (FilePanel* filePanel) toolBarPanel->pack_end (*tpc->coarse, Gtk::PACK_SHRINK, 2); toolBarPanel->pack_end (*vsepcl, Gtk::PACK_SHRINK, 2); + // Histogram profile toggle + toolBarPanel->pack_end (*toggleHistogramProfile, Gtk::PACK_SHRINK, 1); + toolBarPanel->pack_end (*vsep3, Gtk::PACK_SHRINK, 2); + toolBarPanel->pack_end (*iareapanel->imageArea->indClippedPanel, Gtk::PACK_SHRINK, 0); toolBarPanel->pack_end (*vsepz, Gtk::PACK_SHRINK, 2); toolBarPanel->pack_end (*iareapanel->imageArea->previewModePanel, Gtk::PACK_SHRINK, 0); @@ -819,6 +830,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel) saveimgas->signal_pressed().connect ( sigc::mem_fun (*this, &EditorPanel::saveAsPressed) ); queueimg->signal_pressed().connect ( sigc::mem_fun (*this, &EditorPanel::queueImgPressed) ); sendtogimp->signal_pressed().connect ( sigc::mem_fun (*this, &EditorPanel::sendToGimpPressed) ); + toggleHistogramProfile->signal_toggled().connect( sigc::mem_fun (*this, &EditorPanel::histogramProfile_toggled) ); if (navPrev) { navPrev->signal_pressed().connect ( sigc::mem_fun (*this, &EditorPanel::openPreviousEditorImage) ); @@ -2015,6 +2027,11 @@ void EditorPanel::syncFileBrowser() // synchronize filebrowser with image in E } } +void EditorPanel::histogramProfile_toggled() +{ + options.rtSettings.HistogramWorking = toggleHistogramProfile->get_active(); +} + bool EditorPanel::idle_sendToGimp ( ProgressConnector *pc, Glib::ustring fname) { diff --git a/rtgui/editorpanel.h b/rtgui/editorpanel.h index 5beb9ee7d..9ccbbef2d 100644 --- a/rtgui/editorpanel.h +++ b/rtgui/editorpanel.h @@ -115,6 +115,7 @@ public: void openNextEditorImage (); void openPreviousEditorImage (); void syncFileBrowser (); + void histogramProfile_toggled (); void tbTopPanel_1_visible (bool visible); bool CheckSidePanelsVisibility(); @@ -196,6 +197,7 @@ private: Gtk::HBox* beforeAfterBox; Gtk::HBox* beforeHeaderBox; Gtk::HBox* afterHeaderBox; + Gtk::ToggleButton* toggleHistogramProfile; Gtk::Frame* ppframe; ProfilePanel* profilep; From f071d321fdf61f1536b958bc8b44a9c087d8d44f Mon Sep 17 00:00:00 2001 From: Oleg Koncevoy Date: Mon, 27 Nov 2017 17:38:09 +0200 Subject: [PATCH 3/7] Added tooltip for histogram profile toggle button --- rtgui/editorpanel.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index 21286ca01..855458b93 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -587,8 +587,9 @@ EditorPanel::EditorPanel (FilePanel* filePanel) // Histogram profile toggle controls toggleHistogramProfile = Gtk::manage (new Gtk::ToggleButton ()); - toggleHistogramProfile->set_relief(Gtk::RELIEF_NONE); - toggleHistogramProfile->set_active(options.rtSettings.HistogramWorking); + toggleHistogramProfile->set_relief (Gtk::RELIEF_NONE); + toggleHistogramProfile->set_active (options.rtSettings.HistogramWorking); + toggleHistogramProfile->set_tooltip_markup ( (M ("PREFERENCES_HISTOGRAM_TOOLTIP"))); Gtk::VSeparator* vsep3 = Gtk::manage (new Gtk::VSeparator ()); From 4d616e2782b3d80b1d18fbaae098594309b19bd7 Mon Sep 17 00:00:00 2001 From: Oleg Koncevoy Date: Tue, 5 Dec 2017 17:34:18 +0200 Subject: [PATCH 4/7] Added updateHistogram method to ColorManagementToolbar class. This method get's called on histogram profile icon toggle and updated histogram. modified: rtgui/editorpanel.cc --- rtgui/editorpanel.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index 855458b93..d5cd42dcb 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -464,6 +464,13 @@ public: updateParameters (); } + void updateHistogram() + { + intentBox.setSelected(intentBox.getSelected()); + updateParameters(); + } + + void defaultMonitorProfileChanged (const Glib::ustring &profile_name, bool auto_monitor_profile) { ConnectionBlocker profileBlocker (profileConn); @@ -2031,6 +2038,7 @@ void EditorPanel::syncFileBrowser() // synchronize filebrowser with image in E void EditorPanel::histogramProfile_toggled() { options.rtSettings.HistogramWorking = toggleHistogramProfile->get_active(); + colorMgmtToolBar->updateHistogram(); } bool EditorPanel::idle_sendToGimp ( ProgressConnector *pc, Glib::ustring fname) From edc1175271e43d6aebca8ece3136f427e98d0d60 Mon Sep 17 00:00:00 2001 From: Oleg Koncevoy Date: Tue, 5 Dec 2017 19:04:34 +0200 Subject: [PATCH 5/7] Clean up for updateHistogram() method --- rtgui/editorpanel.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index d5cd42dcb..98854d67b 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -466,7 +466,6 @@ public: void updateHistogram() { - intentBox.setSelected(intentBox.getSelected()); updateParameters(); } From 95af7dd65c4773167ac30f72a8bb00ffb6ad7b2c Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Wed, 6 Dec 2017 11:03:56 +0100 Subject: [PATCH 6/7] Added histogram profile button images, #4066 --- rtdata/images/Dark/actions/gamut-hist.png | Bin 0 -> 761 bytes rtdata/images/Light/actions/gamut-hist.png | Bin 0 -> 763 bytes rtgui/editorpanel.cc | 2 + tools/source_icons/scalable/gamut-hist.file | 1 + tools/source_icons/scalable/gamut-hist.svg | 852 ++++++++++++++++++++ 5 files changed, 855 insertions(+) create mode 100644 rtdata/images/Dark/actions/gamut-hist.png create mode 100644 rtdata/images/Light/actions/gamut-hist.png create mode 100644 tools/source_icons/scalable/gamut-hist.file create mode 100644 tools/source_icons/scalable/gamut-hist.svg diff --git a/rtdata/images/Dark/actions/gamut-hist.png b/rtdata/images/Dark/actions/gamut-hist.png new file mode 100644 index 0000000000000000000000000000000000000000..8a60118ddb5c741891ed9d763a84b0d4a2376592 GIT binary patch literal 761 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4fEX7WqAsj$Z!;#Vf4nJ z@ErkR#;MwT(m+AU64!{5;QX|b^2DN4hVt@qz0ADq;^f4FRK5J7^x5xhq=1UVK#Cko zOEU6{7<_@kiFpbhiA5>p`S~dc0i`#AD%2pxlolnYG6W@-hh(G{0gXsi02x@6SY86< z>m}#sUXA#e2GkJ*(&3z6P+63jo>9W!?5yBeQc{$eR9cdmpQjs~0d$UIPG)whLPkkR zft9{~a#3nxNoH9p(1hIlykd~+^m8(kQ}c>bi}jN#b&C`AP4o=(4~HbNGB7Y6@pN$v zvFP1;)wWwWP=xKl_d6%W4v8_k3QU>1apPvMsYOP@!CkIz-duCq5}>4Wqo>tgX}^Px z$e&f`?kw>VlinSB!Eqie;$APZdHY%j#6FTozSbxvl~6xcJ}`fn|S-Q zntlu8kDdR78>|_$R_!X!o3TV)>3Y%T-bF8tCm8HtKM;JiWyu-P+MwqCpEKk3Po%>rh}eq4@o zd9%kjP(-%RZE^qAtgjz)J_R{G622i(%$2wOcC@3w9n)hr3YCVwmvb4;pKoDgIi9({ zHL>E;?#UwAZ*>{`J>FS7-`8=%d(!&pUN)_aFG>zZMQ^>fjp5CNEyrf4@EooceE8<+ z&Vv2-_fJT@naUv1f85OX^6Yav#ZKljtUvYi({Hb(pH?eesj)b1B;UX=V~W>OwubpC z^IZeKY~`>PHaixh`17FU_hr{#zg72qG>w(}Vbt1dj29wBf2-g5AET$m_-~)WYnR6s f`!;SoBE8z)^8dk}Ye$4Z37f&w)z4*}Q$iB}A<;&Z literal 0 HcmV?d00001 diff --git a/rtdata/images/Light/actions/gamut-hist.png b/rtdata/images/Light/actions/gamut-hist.png new file mode 100644 index 0000000000000000000000000000000000000000..8c81e0213533842906b9bc72ec9fed769b605e47 GIT binary patch literal 763 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4fEX7WqAsj$Z!;#Vf4nJ z@ErkR#;MwT(m+AU64!{5;QX|b^2DN4hVt@qz0ADq;^f4FRK5J7^x5xhq=1UVK#Cko zOEU6{7<_@kiFpbhiA5>p`S~dc0i`#AD%2pxlolnYG6W@-hh(G{0gXsi02x@6SY86< z>m}#sUXA#e2GkJ*(&3z6P+63jo>9W!?5yBeQc{$eR9cdmpQjs~0d$UIPG)whLPkkR zft9{~a#3nxNoH9p(1hIlykd~+^m8(kQ}c>bi}jN#b&C`AP4o=(4~HbNGB7Y6^K@|x zvFP1;b?@rS2_kGCo_pSM+))z9;<(ZD&1GHKmmXrB{`$dvB|fe? z-%HiUyD#hton^LAL{QMkLsKlu=J-K2r`${Yw~Y5b-*d9ReR>VUZ=LIU;8?-xtGiaLs$@`D zdHLlR76z-i=eFE`zh7XY{;?T{O>9KB|3>pSJ0B-!>Ry{J^9;j@4xJ{^iZIPXy{ax{~afM zC+&B65-HJkf76Dk8#-bXejePk#(dxV`Aic^5BgZ}98P99K0E1T)K|eadd (*histProfImg); toggleHistogramProfile->set_relief (Gtk::RELIEF_NONE); toggleHistogramProfile->set_active (options.rtSettings.HistogramWorking); toggleHistogramProfile->set_tooltip_markup ( (M ("PREFERENCES_HISTOGRAM_TOOLTIP"))); diff --git a/tools/source_icons/scalable/gamut-hist.file b/tools/source_icons/scalable/gamut-hist.file new file mode 100644 index 000000000..5eb359187 --- /dev/null +++ b/tools/source_icons/scalable/gamut-hist.file @@ -0,0 +1 @@ +gamut-hist.png,w22,actions diff --git a/tools/source_icons/scalable/gamut-hist.svg b/tools/source_icons/scalable/gamut-hist.svg new file mode 100644 index 000000000..cf163df83 --- /dev/null +++ b/tools/source_icons/scalable/gamut-hist.svg @@ -0,0 +1,852 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + Morgan Hardwood + + + RawTherapee www.rawtherapee.com + + + + + + + + + + + + + + + + + From d6037a880ee423a67b05a7b6d457c655ca115921 Mon Sep 17 00:00:00 2001 From: Oleg Koncevoy Date: Fri, 8 Dec 2017 09:59:46 +0200 Subject: [PATCH 7/7] Moved histogramProfile_toggled() to EditorPanel private section. modified: rtgui/editorpanel.h --- rtgui/editorpanel.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rtgui/editorpanel.h b/rtgui/editorpanel.h index 9ccbbef2d..0249e77ca 100644 --- a/rtgui/editorpanel.h +++ b/rtgui/editorpanel.h @@ -115,7 +115,6 @@ public: void openNextEditorImage (); void openPreviousEditorImage (); void syncFileBrowser (); - void histogramProfile_toggled (); void tbTopPanel_1_visible (bool visible); bool CheckSidePanelsVisibility(); @@ -151,6 +150,8 @@ private: bool idle_saveImage (ProgressConnector *pc, Glib::ustring fname, SaveFormat sf, rtengine::procparams::ProcParams &pparams); bool idle_sendToGimp ( ProgressConnector *pc, Glib::ustring fname); bool idle_sentToGimp (ProgressConnector *pc, rtengine::IImage16* img, Glib::ustring filename); + void histogramProfile_toggled (); + Glib::ustring lastSaveAsFileName; bool realized;