Add dedicated buttons for scope switching

Previously, changing to a different scope was done by clicking the scope
type button and cycling through all scopes. This commit decreases the
number of clicks needed to switch between two scopes by adding a radio
selector. The radio buttons can be shown or hidden by pressing the scope
type button. This commit also makes the raw histogram one of the scope
types.
This commit is contained in:
Lawrence Lee
2020-09-12 17:52:24 -07:00
parent bb0c625960
commit c03efe4878
14 changed files with 791 additions and 100 deletions

View File

@@ -446,11 +446,11 @@ void Options::setDefaults()
histogramBlue = true;
histogramLuma = false;
histogramChroma = false;
histogramRAW = false;
histogramBar = true;
histogramHeight = 200;
histogramDrawMode = 0;
histogramScopeType = ScopeType::HISTOGRAM;
histogramShowScopeButtons = false;
curvebboxpos = 1;
complexity = 2;
prevdemo = PD_Sidecar;
@@ -1418,7 +1418,10 @@ void Options::readFromFile(Glib::ustring fname)
}
if (keyFile.has_key("GUI", "HistogramRAW")) {
histogramRAW = keyFile.get_boolean("GUI", "HistogramRAW");
// Legacy option, replaced by HistogramScopeType.
if (keyFile.get_boolean("GUI", "HistogramRAW")) {
histogramScopeType = ScopeType::HISTOGRAM_RAW;
}
}
if (keyFile.has_key("GUI", "HistogramBar")) {
@@ -1437,6 +1440,10 @@ void Options::readFromFile(Glib::ustring fname)
histogramScopeType = static_cast<ScopeType>(keyFile.get_integer("GUI", "HistogramScopeType"));
}
if (keyFile.has_key("GUI", "HistogramShowScopeButtons")) {
histogramShowScopeButtons = keyFile.get_boolean("GUI", "HistogramShowScopeButtons");
}
if (keyFile.has_key("GUI", "NavigatorRGBUnit")) {
navRGBUnit = (NavigatorUnit)keyFile.get_integer("GUI", "NavigatorRGBUnit");
}
@@ -2256,11 +2263,11 @@ void Options::saveToFile(Glib::ustring fname)
keyFile.set_boolean("GUI", "HistogramBlue", histogramBlue);
keyFile.set_boolean("GUI", "HistogramLuma", histogramLuma);
keyFile.set_boolean("GUI", "HistogramChroma", histogramChroma);
keyFile.set_boolean("GUI", "HistogramRAW", histogramRAW);
keyFile.set_boolean("GUI", "HistogramBar", histogramBar);
keyFile.set_integer("GUI", "HistogramHeight", histogramHeight);
keyFile.set_integer("GUI", "HistogramDrawMode", histogramDrawMode);
keyFile.set_integer("GUI", "HistogramScopeType", histogramScopeType);
keyFile.set_boolean("GUI", "HistogramShowScopeButtons", histogramShowScopeButtons);
keyFile.set_integer("GUI", "NavigatorRGBUnit", (int)navRGBUnit);
keyFile.set_integer("GUI", "NavigatorHSVUnit", (int)navHSVUnit);
keyFile.set_boolean("GUI", "ShowFilmStripToolBar", showFilmStripToolBar);