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:
@@ -47,7 +47,7 @@ FilePanel::FilePanel () : parent(NULL) {
|
||||
placespaned->pack1 (*placesBrowser, false, true);
|
||||
placespaned->pack2 (*obox, true, true);
|
||||
|
||||
dirpaned->pack1 (*placespaned, true, true);
|
||||
dirpaned->pack1 (*placespaned, false, true);
|
||||
|
||||
tpc = new BatchToolPanelCoordinator (this);
|
||||
fileCatalog = new FileCatalog (tpc->coarse, tpc->getToolBar());
|
||||
@@ -88,8 +88,8 @@ FilePanel::FilePanel () : parent(NULL) {
|
||||
Gtk::Label* tagLab = new Gtk::Label (M("MAIN_TAB_TAGGING"));
|
||||
tagLab->set_angle (90);
|
||||
|
||||
Gtk::VPaned* tpcPaned = new Gtk::VPaned ();
|
||||
tpcPaned->pack1 (*tpc->toolPanelNotebook, true, true);
|
||||
tpcPaned = new Gtk::VPaned ();
|
||||
tpcPaned->pack1 (*tpc->toolPanelNotebook, false, true);
|
||||
tpcPaned->pack2 (*history, true, true);
|
||||
|
||||
rightNotebook->append_page (*tpcPaned, *devLab);
|
||||
@@ -99,9 +99,7 @@ FilePanel::FilePanel () : parent(NULL) {
|
||||
rightBox->pack_start (*rightNotebook);
|
||||
|
||||
pack1(*dirpaned, true, true);
|
||||
pack2(*rightBox, true, true);
|
||||
|
||||
//set_position(options.browserToolPanelWidth);////Hombre's change which screws up OSX build
|
||||
pack2(*rightBox, false, true);
|
||||
|
||||
fileCatalog->setFileSelectionChangeListener (tpc);
|
||||
|
||||
@@ -111,6 +109,15 @@ FilePanel::FilePanel () : parent(NULL) {
|
||||
show_all ();
|
||||
}
|
||||
|
||||
void FilePanel::setAspect () {
|
||||
int winW, winH;
|
||||
parent->get_size(winW, winH);
|
||||
placespaned->set_position(options.dirBrowserHeight);
|
||||
dirpaned->set_position(options.dirBrowserWidth);
|
||||
tpcPaned->set_position(options.browserToolPanelHeight);
|
||||
set_position(winW - options.browserToolPanelWidth);
|
||||
}
|
||||
|
||||
void FilePanel::init () {
|
||||
|
||||
dirBrowser->fillDirTree ();
|
||||
@@ -161,9 +168,12 @@ bool FilePanel::imageLoaded( Thumbnail* thm, ProgressConnector<rtengine::Initial
|
||||
|
||||
void FilePanel::saveOptions () {
|
||||
|
||||
//options.dirBrowserWidth = dirpaned->get_position ();
|
||||
//options.dirBrowserHeight = placespaned->get_position ();
|
||||
//options.browserToolPanelWidth = get_position();
|
||||
int winW, winH;
|
||||
parent->get_size(winW, winH);
|
||||
options.dirBrowserWidth = dirpaned->get_position ();
|
||||
options.dirBrowserHeight = placespaned->get_position ();
|
||||
options.browserToolPanelWidth = winW - get_position();
|
||||
options.browserToolPanelHeight = tpcPaned->get_position ();
|
||||
if (options.startupDir==STARTUPDIR_LAST && fileCatalog->lastSelectedDir ()!="")
|
||||
options.startupPath = fileCatalog->lastSelectedDir ();
|
||||
fileCatalog->closeDir ();
|
||||
|
Reference in New Issue
Block a user