diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index b59a607f4..a9c5e523e 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -2342,7 +2342,7 @@ void EditorPanel::updateHistogramPosition (int oldPosition, int newPosition) histogramPanel->unreference(); } - leftbox->set_position(options.historyPanelWidth * options.histogramAspect); // Make sure the panel gets the right aspect ratio + leftbox->set_position(options.histogramHeight); histogramPanel->reorder (Gtk::POS_LEFT); break; @@ -2362,7 +2362,7 @@ void EditorPanel::updateHistogramPosition (int oldPosition, int newPosition) histogramPanel->unreference(); } - vboxright->set_position(options.toolPanelWidth * options.histogramAspect); // Make sure the panel gets the right aspect ratio + vboxright->set_position(options.histogramHeight); histogramPanel->reorder (Gtk::POS_RIGHT); break; } diff --git a/rtgui/histogrampanel.cc b/rtgui/histogrampanel.cc index 407d7fd34..3d1095f8d 100644 --- a/rtgui/histogrampanel.cc +++ b/rtgui/histogrampanel.cc @@ -247,9 +247,6 @@ HistogramPanel::~HistogramPanel () void HistogramPanel::resized (Gtk::Allocation& req) { - - // Store current aspect ratio of the histogram - options.histogramAspect = histogramArea->get_height() / (float)histogramArea->get_width(); histogramArea->updateBackBuffer (); histogramArea->queue_draw (); @@ -266,6 +263,10 @@ void HistogramPanel::resized (Gtk::Allocation& req) histogramRGBArea->updateBackBuffer(-1, -1, -1); histogramRGBArea->queue_draw (); } + + // Store current height of the histogram + options.histogramHeight = get_height(); + } void HistogramPanel::red_toggled () diff --git a/rtgui/options.cc b/rtgui/options.cc index d78fd272a..7350ba056 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -415,7 +415,7 @@ void Options::setDefaults () multiDisplayMode = 0; histogramPosition = 1; histogramBar = true; - histogramAspect = 0.618; + histogramHeight = 200; histogramDrawMode = 0; curvebboxpos = 1; prevdemo = PD_Sidecar; @@ -1290,9 +1290,9 @@ void Options::readFromFile (Glib::ustring fname) if (keyFile.has_key ("GUI", "HistogramBar")) { histogramBar = keyFile.get_boolean ("GUI", "HistogramBar"); } - - if (keyFile.has_key ("GUI", "HistogramAspect")) { - histogramAspect = keyFile.get_double ("GUI", "HistogramAspect"); + + if (keyFile.has_key ("GUI", "HistogramHeight")) { + histogramHeight = keyFile.get_integer ("GUI", "HistogramHeight"); } if (keyFile.has_key ("GUI", "HistogramDrawMode")) { @@ -1943,7 +1943,7 @@ void Options::saveToFile (Glib::ustring fname) keyFile.set_double_list ("GUI", "NavGuideBrush", navGuideBrush); keyFile.set_integer ("GUI", "HistogramPosition", histogramPosition); keyFile.set_boolean ("GUI", "HistogramBar", histogramBar); - keyFile.set_double ("GUI", "HistogramAspect", histogramAspect); + keyFile.set_integer ("GUI", "HistogramHeight", histogramHeight); keyFile.set_integer ("GUI", "HistogramDrawMode", histogramDrawMode); keyFile.set_integer ("GUI", "NavigatorRGBUnit", (int)navRGBUnit); keyFile.set_integer ("GUI", "NavigatorHSVUnit", (int)navHSVUnit); diff --git a/rtgui/options.h b/rtgui/options.h index 976ea545b..c8d287e08 100644 --- a/rtgui/options.h +++ b/rtgui/options.h @@ -256,7 +256,7 @@ public: int histogramPosition; // 0=disabled, 1=left pane, 2=right pane //int histogramWorking; // 0=disabled, 1=left pane, 2=right pane bool histogramBar; - float histogramAspect; + int histogramHeight; int histogramDrawMode; bool FileBrowserToolbarSingleRow; bool hideTPVScrollbar;