Big update: 1) implemented scalable histogram (TooWaBoo's CSS untested but probably unnecessary now); 2) reverted graphical changes; 3) gridlines now multiply based on height and width; 4) removed cube-scaling; 5) implementend double-log scaling as the third alternative based on suggestion by @iliasg
This commit is contained in:
@@ -497,8 +497,11 @@ EditorPanel::EditorPanel (FilePanel* filePanel)
|
||||
// build GUI
|
||||
|
||||
// build left side panel
|
||||
leftbox = new Gtk::VBox ();
|
||||
leftbox->set_size_request (230, 250);
|
||||
leftbox = new Gtk::Paned (Gtk::ORIENTATION_VERTICAL);
|
||||
|
||||
// make a subbox to allow resizing of the histogram (if it's on the left)
|
||||
leftsubbox = new Gtk::Box (Gtk::ORIENTATION_VERTICAL);
|
||||
leftsubbox->set_size_request (230, 250);
|
||||
|
||||
histogramPanel = nullptr;
|
||||
|
||||
@@ -507,19 +510,21 @@ EditorPanel::EditorPanel (FilePanel* filePanel)
|
||||
ppframe->set_name ("ProfilePanel");
|
||||
ppframe->add (*profilep);
|
||||
ppframe->set_label (M ("PROFILEPANEL_LABEL"));
|
||||
//leftbox->pack_start (*ppframe, Gtk::PACK_SHRINK, 4);
|
||||
//leftsubbox->pack_start (*ppframe, Gtk::PACK_SHRINK, 4);
|
||||
|
||||
navigator = Gtk::manage (new Navigator ());
|
||||
navigator->previewWindow->set_size_request (-1, 150);
|
||||
leftbox->pack_start (*navigator, Gtk::PACK_SHRINK, 2);
|
||||
leftsubbox->pack_start (*navigator, Gtk::PACK_SHRINK, 2);
|
||||
|
||||
history = Gtk::manage (new History ());
|
||||
leftbox->pack_start (*history);
|
||||
leftsubbox->pack_start (*history);
|
||||
|
||||
leftbox->show_all ();
|
||||
leftsubbox->show_all ();
|
||||
|
||||
leftbox->pack2 (*leftsubbox, true, true);
|
||||
|
||||
// build the middle of the screen
|
||||
Gtk::VBox* editbox = Gtk::manage (new Gtk::VBox ());
|
||||
Gtk::Box* editbox = Gtk::manage (new Gtk::Box (Gtk::ORIENTATION_VERTICAL));
|
||||
|
||||
info = Gtk::manage (new Gtk::ToggleButton ());
|
||||
Gtk::Image* infoimg = Gtk::manage (new RTImage ("info.png"));
|
||||
@@ -590,7 +595,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel)
|
||||
tpc->setEditProvider (iareapanel->imageArea);
|
||||
tpc->getToolBar()->setLockablePickerToolListener (iareapanel->imageArea);
|
||||
|
||||
Gtk::HBox* toolBarPanel = Gtk::manage (new Gtk::HBox ());
|
||||
Gtk::Box* toolBarPanel = Gtk::manage (new Gtk::Box (Gtk::ORIENTATION_HORIZONTAL));
|
||||
toolBarPanel->set_name ("EditorTopPanel");
|
||||
toolBarPanel->pack_start (*hidehp, Gtk::PACK_SHRINK, 1);
|
||||
toolBarPanel->pack_start (*vseph, Gtk::PACK_SHRINK, 2);
|
||||
@@ -617,10 +622,10 @@ EditorPanel::EditorPanel (FilePanel* filePanel)
|
||||
toolBarPanel->pack_end (*iareapanel->imageArea->previewModePanel, Gtk::PACK_SHRINK, 0);
|
||||
toolBarPanel->pack_end (*vsepz4, Gtk::PACK_SHRINK, 2);
|
||||
|
||||
afterBox = Gtk::manage (new Gtk::VBox ());
|
||||
afterBox = Gtk::manage (new Gtk::Box (Gtk::ORIENTATION_VERTICAL));
|
||||
afterBox->pack_start (*iareapanel);
|
||||
|
||||
beforeAfterBox = Gtk::manage (new Gtk::HBox());
|
||||
beforeAfterBox = Gtk::manage (new Gtk::Box (Gtk::ORIENTATION_HORIZONTAL));
|
||||
beforeAfterBox->set_name ("BeforeAfterContainer");
|
||||
beforeAfterBox->pack_start (*afterBox);
|
||||
|
||||
@@ -628,12 +633,16 @@ EditorPanel::EditorPanel (FilePanel* filePanel)
|
||||
editbox->pack_start (*beforeAfterBox);
|
||||
|
||||
// build right side panel
|
||||
vboxright = new Gtk::VBox (false, 0);
|
||||
vboxright->set_size_request (300, 250);
|
||||
vboxright = new Gtk::Paned (Gtk::ORIENTATION_VERTICAL);
|
||||
|
||||
vsubboxright = new Gtk::Box (Gtk::ORIENTATION_VERTICAL, 0);
|
||||
vsubboxright->set_size_request (300, 250);
|
||||
|
||||
vboxright->pack_start (*ppframe, Gtk::PACK_SHRINK, 2);
|
||||
vsubboxright->pack_start (*ppframe, Gtk::PACK_SHRINK, 2);
|
||||
// main notebook
|
||||
vboxright->pack_start (*tpc->toolPanelNotebook);
|
||||
vsubboxright->pack_start (*tpc->toolPanelNotebook);
|
||||
|
||||
vboxright->pack2 (*vsubboxright, true, true);
|
||||
|
||||
// Save buttons
|
||||
Gtk::Grid *iops = new Gtk::Grid ();
|
||||
@@ -769,8 +778,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel)
|
||||
hpanedl->set_position (options.historyPanelWidth);
|
||||
}
|
||||
|
||||
|
||||
Gtk::VPaned * viewpaned = Gtk::manage (new Gtk::VPaned());
|
||||
Gtk::Paned *viewpaned = Gtk::manage (new Gtk::Paned (Gtk::ORIENTATION_VERTICAL));
|
||||
fPanel = filePanel;
|
||||
|
||||
if (filePanel) {
|
||||
@@ -886,7 +894,9 @@ EditorPanel::~EditorPanel ()
|
||||
delete tpc;
|
||||
|
||||
delete ppframe;
|
||||
delete leftsubbox;
|
||||
delete leftbox;
|
||||
delete vsubboxright;
|
||||
delete vboxright;
|
||||
|
||||
//delete saveAsDialog;
|
||||
@@ -2165,7 +2175,7 @@ void EditorPanel::beforeAfterToggled ()
|
||||
tbBeforeLock = Gtk::manage (new Gtk::ToggleButton ());
|
||||
tbBeforeLock->set_tooltip_markup (M ("MAIN_TOOLTIP_BEFOREAFTERLOCK"));
|
||||
tbBeforeLock->signal_toggled().connect ( sigc::mem_fun (*this, &EditorPanel::tbBeforeLock_toggled) );
|
||||
beforeHeaderBox = Gtk::manage (new Gtk::HBox ());
|
||||
beforeHeaderBox = Gtk::manage (new Gtk::Box (Gtk::ORIENTATION_HORIZONTAL));
|
||||
beforeHeaderBox->pack_end (*tbBeforeLock, Gtk::PACK_SHRINK, 2);
|
||||
beforeHeaderBox->pack_end (*beforeLabel, Gtk::PACK_SHRINK, 2);
|
||||
beforeHeaderBox->set_size_request (0, HeaderBoxHeight);
|
||||
@@ -2179,7 +2189,7 @@ void EditorPanel::beforeAfterToggled ()
|
||||
|
||||
afterLabel = Gtk::manage (new Gtk::Label ());
|
||||
afterLabel->set_markup (Glib::ustring ("<b>") + M ("GENERAL_AFTER") + "</b>");
|
||||
afterHeaderBox = Gtk::manage (new Gtk::HBox ());
|
||||
afterHeaderBox = Gtk::manage (new Gtk::Box (Gtk::ORIENTATION_HORIZONTAL));
|
||||
afterHeaderBox->set_size_request (0, HeaderBoxHeight);
|
||||
afterHeaderBox->pack_end (*afterLabel, Gtk::PACK_SHRINK, 2);
|
||||
afterBox->pack_start (*afterHeaderBox, Gtk::PACK_SHRINK, 2);
|
||||
@@ -2321,17 +2331,16 @@ void EditorPanel::updateHistogramPosition (int oldPosition, int newPosition)
|
||||
if (oldPosition == 0) {
|
||||
// There was no Histogram before, so we create it
|
||||
histogramPanel = Gtk::manage (new HistogramPanel ());
|
||||
leftbox->pack_start (*histogramPanel, Gtk::PACK_SHRINK, 2);
|
||||
leftbox->pack1(*histogramPanel, true, false);
|
||||
} else if (oldPosition == 2) {
|
||||
// The histogram was on the right side, so we move it to the left
|
||||
histogramPanel->reference();
|
||||
removeIfThere (vboxright, histogramPanel, false);
|
||||
leftbox->pack_start (*histogramPanel, Gtk::PACK_SHRINK, 2);
|
||||
leftbox->pack1(*histogramPanel, true, false);
|
||||
histogramPanel->unreference();
|
||||
}
|
||||
|
||||
histogramPanel->reorder (Gtk::POS_LEFT);
|
||||
leftbox->reorder_child (*histogramPanel, 0);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
@@ -2341,17 +2350,16 @@ void EditorPanel::updateHistogramPosition (int oldPosition, int newPosition)
|
||||
if (oldPosition == 0) {
|
||||
// There was no Histogram before, so we create it
|
||||
histogramPanel = Gtk::manage (new HistogramPanel ());
|
||||
vboxright->pack_start (*histogramPanel, Gtk::PACK_SHRINK, 2);
|
||||
vboxright->pack1 (*histogramPanel, true, false);
|
||||
} else if (oldPosition == 1) {
|
||||
// The histogram was on the left side, so we move it to the right
|
||||
histogramPanel->reference();
|
||||
removeIfThere (leftbox, histogramPanel, false);
|
||||
vboxright->pack_start (*histogramPanel, Gtk::PACK_SHRINK, 2);
|
||||
vboxright->pack1 (*histogramPanel, true, false);
|
||||
histogramPanel->unreference();
|
||||
}
|
||||
|
||||
histogramPanel->reorder (Gtk::POS_RIGHT);
|
||||
vboxright->reorder_child (*histogramPanel, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user