Left and right panels in File Browser and Editor now don't resize below a usable minimum width

This commit is contained in:
Morgan Hardwood 2015-09-17 17:53:40 +02:00
parent 303e69b5fb
commit c026c8bcf0
2 changed files with 17 additions and 11 deletions

View File

@ -51,7 +51,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel)
// build left side panel
leftbox = new Gtk::VBox ();
leftbox->set_border_width (2);
leftbox->set_size_request(100, 250);
leftbox->set_size_request(230, 250);
histogramPanel = NULL;
@ -169,7 +169,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel)
// build right side panel
vboxright = new Gtk::VBox (false, 0);
vboxright->set_size_request(100, 250);
vboxright->set_size_request(250, 250);
vboxright->set_border_width (2);
@ -278,7 +278,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel)
vboxright->reference ();
if (options.showHistory) {
hpanedl->pack1(*leftbox, false, true);
hpanedl->pack1(*leftbox, false, false);
hpanedl->set_position (options.historyPanelWidth);
}
@ -299,8 +299,8 @@ EditorPanel::EditorPanel (FilePanel* filePanel)
vbfr->set_size_request(100, 250);
hpanedl->pack2(*vbfr, true, true);
hpanedr->pack1(*hpanedl, true, true);
hpanedr->pack2(*vboxright, false, true);
hpanedr->pack1(*hpanedl, true, false);
hpanedr->pack2(*vboxright, false, false);
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) );
@ -911,7 +911,7 @@ void EditorPanel::hideHistoryActivated ()
removeIfThere (hpanedl, leftbox, false);
if (hidehp->get_active()) {
hpanedl->pack1 (*leftbox, false, true);
hpanedl->pack1 (*leftbox, false, false);
}
options.showHistory = hidehp->get_active();

View File

@ -31,15 +31,20 @@ int FilePanelInitUI (void* data)
FilePanel::FilePanel () : parent(NULL)
{
// Contains everything except for the batch Tool Panel and tabs (Fast Export, Inspect, etc)
dirpaned = Gtk::manage ( new Gtk::HPaned () );
dirpaned->set_position (options.dirBrowserWidth);
// The directory tree
dirBrowser = Gtk::manage ( new DirBrowser () );
// Places
placesBrowser = Gtk::manage ( new PlacesBrowser () );
// Recent Folders
recentBrowser = Gtk::manage ( new RecentBrowser () );
// The whole left panel. Contains Places, Recent Folders and Folders.
placespaned = Gtk::manage ( new Gtk::VPaned () );
placespaned->set_size_request(50, 100);
placespaned->set_size_request(250, 100);
placespaned->set_position (options.dirBrowserHeight);
Gtk::VBox* obox = Gtk::manage (new Gtk::VBox ());
@ -49,11 +54,13 @@ FilePanel::FilePanel () : parent(NULL)
placespaned->pack1 (*placesBrowser, false, true);
placespaned->pack2 (*obox, true, true);
dirpaned->pack1 (*placespaned, false, true);
dirpaned->pack1 (*placespaned, false, false);
tpc = new BatchToolPanelCoordinator (this);
tpc->removeWbTool();
// Location bar
fileCatalog = Gtk::manage ( new FileCatalog (tpc->coarse, tpc->getToolBar(), this) );
// Holds the location bar and thumbnails
ribbonPane = Gtk::manage ( new Gtk::Paned() );
ribbonPane->add(*fileCatalog);
ribbonPane->set_size_request(50, 150);
@ -69,7 +76,7 @@ FilePanel::FilePanel () : parent(NULL)
fileCatalog->setDirBrowserRemoteInterface (dirBrowser);
rightBox = Gtk::manage ( new Gtk::HBox () );
rightBox->set_size_request(50, 100);
rightBox->set_size_request(270, 100);
rightNotebook = Gtk::manage ( new Gtk::Notebook () );
rightNotebookSwitchConn = rightNotebook->signal_switch_page().connect_notify( sigc::mem_fun(*this, &FilePanel::on_NB_switch_page) );
//Gtk::VBox* taggingBox = Gtk::manage ( new Gtk::VBox () );
@ -82,7 +89,6 @@ FilePanel::FilePanel () : parent(NULL)
Gtk::ScrolledWindow* sFilterPanel = Gtk::manage ( new Gtk::ScrolledWindow() );
filterPanel = Gtk::manage ( new FilterPanel () );
sFilterPanel->add (*filterPanel);
sFilterPanel->set_policy(Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
inspectorPanel = new Inspector();
fileCatalog->setInspector(inspectorPanel);
@ -125,7 +131,7 @@ FilePanel::FilePanel () : parent(NULL)
rightBox->pack_start (*rightNotebook);
pack1(*dirpaned, true, true);
pack2(*rightBox, false, true);
pack2(*rightBox, false, false);
fileCatalog->setFileSelectionChangeListener (tpc);