Final fix? Included shorthand suggested by Hombre
This commit is contained in:
@@ -2333,12 +2333,12 @@ void EditorPanel::updateHistogramPosition (int oldPosition, int newPosition)
|
|||||||
if (oldPosition == 0) {
|
if (oldPosition == 0) {
|
||||||
// There was no Histogram before, so we create it
|
// There was no Histogram before, so we create it
|
||||||
histogramPanel = Gtk::manage (new HistogramPanel ());
|
histogramPanel = Gtk::manage (new HistogramPanel ());
|
||||||
leftbox->pack1(*histogramPanel, true, false);
|
leftbox->pack1(*histogramPanel, false, false);
|
||||||
} else if (oldPosition == 2) {
|
} else if (oldPosition == 2) {
|
||||||
// The histogram was on the right side, so we move it to the left
|
// The histogram was on the right side, so we move it to the left
|
||||||
histogramPanel->reference();
|
histogramPanel->reference();
|
||||||
removeIfThere (vboxright, histogramPanel, false);
|
removeIfThere (vboxright, histogramPanel, false);
|
||||||
leftbox->pack1(*histogramPanel, true, false);
|
leftbox->pack1(*histogramPanel, false, false);
|
||||||
histogramPanel->unreference();
|
histogramPanel->unreference();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2353,12 +2353,12 @@ void EditorPanel::updateHistogramPosition (int oldPosition, int newPosition)
|
|||||||
if (oldPosition == 0) {
|
if (oldPosition == 0) {
|
||||||
// There was no Histogram before, so we create it
|
// There was no Histogram before, so we create it
|
||||||
histogramPanel = Gtk::manage (new HistogramPanel ());
|
histogramPanel = Gtk::manage (new HistogramPanel ());
|
||||||
vboxright->pack1 (*histogramPanel, true, false);
|
vboxright->pack1 (*histogramPanel, false, false);
|
||||||
} else if (oldPosition == 1) {
|
} else if (oldPosition == 1) {
|
||||||
// The histogram was on the left side, so we move it to the right
|
// The histogram was on the left side, so we move it to the right
|
||||||
histogramPanel->reference();
|
histogramPanel->reference();
|
||||||
removeIfThere (leftbox, histogramPanel, false);
|
removeIfThere (leftbox, histogramPanel, false);
|
||||||
vboxright->pack1 (*histogramPanel, true, false);
|
vboxright->pack1 (*histogramPanel, false, false);
|
||||||
histogramPanel->unreference();
|
histogramPanel->unreference();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -38,24 +38,14 @@ extern Options options;
|
|||||||
// HistogramPanel
|
// HistogramPanel
|
||||||
HistogramPanel::HistogramPanel ()
|
HistogramPanel::HistogramPanel ()
|
||||||
{
|
{
|
||||||
|
setExpandAlignProperties(this, true, true, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL);
|
||||||
set_vexpand(true);
|
|
||||||
set_hexpand(true);
|
|
||||||
set_valign(Gtk::ALIGN_FILL);
|
|
||||||
set_halign(Gtk::ALIGN_FILL);
|
|
||||||
set_name("HistogramPanel");
|
set_name("HistogramPanel");
|
||||||
|
|
||||||
histogramArea = Gtk::manage (new HistogramArea (this));
|
histogramArea = Gtk::manage (new HistogramArea (this));
|
||||||
histogramArea->set_hexpand(true);
|
setExpandAlignProperties(histogramArea, true, true, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL);
|
||||||
histogramArea->set_vexpand(true);
|
|
||||||
histogramArea->set_halign(Gtk::ALIGN_FILL);
|
|
||||||
histogramArea->set_valign(Gtk::ALIGN_FILL);
|
|
||||||
|
|
||||||
histogramRGBArea = Gtk::manage (new HistogramRGBArea ());
|
histogramRGBArea = Gtk::manage (new HistogramRGBArea ());
|
||||||
histogramRGBArea->set_hexpand(true);
|
setExpandAlignProperties(histogramArea, false, true, Gtk::ALIGN_END, Gtk::ALIGN_FILL);
|
||||||
histogramRGBArea->set_vexpand(false);
|
|
||||||
histogramRGBArea->set_halign(Gtk::ALIGN_FILL);
|
|
||||||
histogramRGBArea->set_valign(Gtk::ALIGN_END);
|
|
||||||
histogramRGBArea->show();
|
histogramRGBArea->show();
|
||||||
|
|
||||||
gfxGrid = Gtk::manage (new Gtk::Grid ());
|
gfxGrid = Gtk::manage (new Gtk::Grid ());
|
||||||
@@ -157,38 +147,14 @@ HistogramPanel::HistogramPanel ()
|
|||||||
showMode->set_image(*modeImage_g2);
|
showMode->set_image(*modeImage_g2);
|
||||||
showBAR->set_image (showBAR->get_active() ? *barImage : *barImage_g);
|
showBAR->set_image (showBAR->get_active() ? *barImage : *barImage_g);
|
||||||
|
|
||||||
showRed->set_hexpand(false);
|
setExpandAlignProperties(showRed , false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
|
||||||
showRed->set_vexpand(false);
|
setExpandAlignProperties(showGreen, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
|
||||||
showRed->set_halign(Gtk::ALIGN_CENTER);
|
setExpandAlignProperties(showBlue , false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
|
||||||
showRed->set_valign(Gtk::ALIGN_START);
|
setExpandAlignProperties(showValue, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
|
||||||
showGreen->set_hexpand(false);
|
setExpandAlignProperties(showChro , false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
|
||||||
showGreen->set_vexpand(false);
|
setExpandAlignProperties(showRAW , false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
|
||||||
showGreen->set_halign(Gtk::ALIGN_CENTER);
|
setExpandAlignProperties(showMode , false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
|
||||||
showGreen->set_valign(Gtk::ALIGN_START);
|
setExpandAlignProperties(showBAR , false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
|
||||||
showBlue->set_hexpand(false);
|
|
||||||
showRed->set_vexpand(false);
|
|
||||||
showBlue->set_halign(Gtk::ALIGN_CENTER);
|
|
||||||
showBlue->set_valign(Gtk::ALIGN_START);
|
|
||||||
showValue->set_hexpand(false);
|
|
||||||
showValue->set_vexpand(false);
|
|
||||||
showValue->set_halign(Gtk::ALIGN_CENTER);
|
|
||||||
showValue->set_valign(Gtk::ALIGN_START);
|
|
||||||
showChro->set_hexpand(false);
|
|
||||||
showChro->set_vexpand(false);
|
|
||||||
showChro->set_halign(Gtk::ALIGN_CENTER);
|
|
||||||
showChro->set_valign(Gtk::ALIGN_START);
|
|
||||||
showRAW->set_hexpand(false);
|
|
||||||
showRAW->set_vexpand(false);
|
|
||||||
showRAW->set_halign(Gtk::ALIGN_CENTER);
|
|
||||||
showRAW->set_valign(Gtk::ALIGN_START);
|
|
||||||
showMode->set_hexpand(false);
|
|
||||||
showMode->set_vexpand(false);
|
|
||||||
showMode->set_halign(Gtk::ALIGN_CENTER);
|
|
||||||
showMode->set_valign(Gtk::ALIGN_START);
|
|
||||||
showBAR->set_hexpand(false);
|
|
||||||
showBAR->set_vexpand(false);
|
|
||||||
showBAR->set_halign(Gtk::ALIGN_CENTER);
|
|
||||||
showBAR->set_valign(Gtk::ALIGN_START);
|
|
||||||
|
|
||||||
showRed->signal_toggled().connect( sigc::mem_fun(*this, &HistogramPanel::red_toggled), showRed );
|
showRed->signal_toggled().connect( sigc::mem_fun(*this, &HistogramPanel::red_toggled), showRed );
|
||||||
showGreen->signal_toggled().connect( sigc::mem_fun(*this, &HistogramPanel::green_toggled), showGreen );
|
showGreen->signal_toggled().connect( sigc::mem_fun(*this, &HistogramPanel::green_toggled), showGreen );
|
||||||
|
Reference in New Issue
Block a user