Left and right panels of the directory browser and the editor tab now remember theire position when RT is restarted. When a new editor tab opens, it remember the last width value. Morever, if you change the width if the left or right panel in one editor tab, it does propagate in all the others.
Those values are stored in the options file. This is not related to the automatic grow of the window when an editor opens (not solved yet). To avoid having too wide windows at the first start, the font of all styles are now "sans 10".
This commit is contained in:
@@ -192,7 +192,8 @@ EditorPanel::EditorPanel () : beforePreviewHandler(NULL), beforeIarea(NULL), par
|
||||
|
||||
hpanedr->pack1(*hpanedl, true, true);
|
||||
hpanedr->pack2(*vboxright, false, true);
|
||||
//hpanedr->set_position(options.toolPanelWidth);
|
||||
hpanedl->signal_button_release_event().connect_notify( sigc::mem_fun(*this, &EditorPanel::leftPaneButtonReleased) );
|
||||
hpanedr->signal_button_release_event().connect_notify( sigc::mem_fun(*this, &EditorPanel::rightPaneButtonReleased) );
|
||||
|
||||
pack_start (*hpanedr);
|
||||
show_all ();
|
||||
@@ -263,6 +264,40 @@ EditorPanel::~EditorPanel () {
|
||||
delete saveAsDialog;
|
||||
}
|
||||
|
||||
void EditorPanel::leftPaneButtonReleased(GdkEventButton *event) {
|
||||
if (event->button == 1) {
|
||||
// Button 1 released : it's a resize
|
||||
options.historyPanelWidth = hpanedl->get_position();
|
||||
}
|
||||
/*else if (event->button == 3) {
|
||||
}*/
|
||||
}
|
||||
|
||||
void EditorPanel::rightPaneButtonReleased(GdkEventButton *event) {
|
||||
if (event->button == 1) {
|
||||
int winW, winH;
|
||||
parent->get_size(winW, winH);
|
||||
// Button 1 released : it's a resize
|
||||
options.toolPanelWidth = winW - hpanedr->get_position();
|
||||
}
|
||||
/*else if (event->button == 3) {
|
||||
}*/
|
||||
}
|
||||
|
||||
void EditorPanel::setAspect () {
|
||||
int winW, winH;
|
||||
parent->get_size(winW, winH);
|
||||
hpanedl->set_position(options.historyPanelWidth);
|
||||
hpanedr->set_position(winW - options.toolPanelWidth);
|
||||
}
|
||||
|
||||
void EditorPanel::on_realize () {
|
||||
|
||||
Gtk::VBox::on_realize ();
|
||||
// This line is needed to avoid autoexpansion of the window :-/
|
||||
vboxright->set_size_request (options.toolPanelWidth, -1);
|
||||
}
|
||||
|
||||
void EditorPanel::open (Thumbnail* tmb, rtengine::InitialImage* isrc) {
|
||||
|
||||
// initialize everything
|
||||
@@ -849,12 +884,10 @@ bool EditorPanel::idle_sentToGimp(ProgressConnector<int> *pc,rtengine::IImage16*
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
void EditorPanel::saveOptions () {
|
||||
|
||||
//options.historyPanelWidth = hpanedl->get_position ();//older code
|
||||
//options.toolPanelWidth = vboxright->get_width ();//older code
|
||||
//options.toolPanelWidth = hpanedr->get_position ();//Hombre's change which screws up OSX build
|
||||
}
|
||||
*/
|
||||
|
||||
void EditorPanel::historyBeforeLineChanged (const rtengine::procparams::ProcParams& params) {
|
||||
|
||||
|
Reference in New Issue
Block a user