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;