GTK3 fixes, handles issue #3446 and fixes #3495

This commit is contained in:
Morgan Hardwood
2016-11-12 20:13:10 +01:00
parent b3167eadce
commit 666698dc02
8 changed files with 39 additions and 19 deletions

View File

@@ -439,13 +439,13 @@ EditorPanel::EditorPanel (FilePanel* filePanel)
vboxright = new Gtk::VBox (false, 0);
vboxright->set_size_request (300, 250);
vboxright->pack_start (*ppframe, Gtk::PACK_SHRINK, 2);
// main notebook
vboxright->pack_start (*tpc->toolPanelNotebook);
// Save buttons
Gtk::Grid *iops = new Gtk::Grid ();
iops->set_name ("IopsPanel");
iops->set_orientation (Gtk::ORIENTATION_HORIZONTAL);
iops->set_row_spacing (2);
iops->set_column_spacing (2);

View File

@@ -131,8 +131,6 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
buttonBar->set_name ("ToolBarPanelFileBrowser");
pack_start (*buttonBar, Gtk::PACK_SHRINK);
buttonBar->pack_start (*Gtk::manage(new Gtk::VSeparator), Gtk::PACK_SHRINK);
tbLeftPanel_1 = new Gtk::ToggleButton ();
iLeftPanel_1_Show = new RTImage("panel-to-right.png");
iLeftPanel_1_Hide = new RTImage("panel-to-left.png");
@@ -144,8 +142,8 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
tbLeftPanel_1->signal_toggled().connect( sigc::mem_fun(*this, &FileCatalog::tbLeftPanel_1_toggled) );
buttonBar->pack_start (*tbLeftPanel_1, Gtk::PACK_SHRINK);
buttonBar->pack_start (*(new Gtk::VSeparator), Gtk::PACK_SHRINK);
vSepiLeftPanel = new Gtk::VSeparator ();
buttonBar->pack_start (*vSepiLeftPanel, Gtk::PACK_SHRINK);
iFilterClear = new RTImage ("filterclear.png");
igFilterClear = new RTImage ("filter.png");
@@ -2084,8 +2082,10 @@ void FileCatalog::tbLeftPanel_1_visible (bool visible)
{
if (visible) {
tbLeftPanel_1->show();
vSepiLeftPanel->show();
} else {
tbLeftPanel_1->hide();
vSepiLeftPanel->hide();
}
}
void FileCatalog::tbRightPanel_1_visible (bool visible)

View File

@@ -96,6 +96,8 @@ private:
Gtk::HBox* fltrRecentlySavedBox;
Gtk::VBox* fltrVbox2;
Gtk::VSeparator* vSepiLeftPanel;
Gtk::ToggleButton* tbLeftPanel_1;
Gtk::ToggleButton* tbRightPanel_1;
Gtk::ToggleButton* bFilterClear;

View File

@@ -44,6 +44,7 @@ FilePanel::FilePanel () : parent(nullptr)
// The whole left panel. Contains Places, Recent Folders and Folders.
placespaned = Gtk::manage ( new Gtk::VPaned () );
placespaned->set_name ("PlacesPaned");
placespaned->set_size_request(250, 100);
placespaned->set_position (options.dirBrowserHeight);

View File

@@ -88,9 +88,6 @@ History::History (bool bookmarkSupport) : blistener(nullptr), tpc (nullptr), bmn
// Bookmark List
// ~~~~~~~~~~~~~
Gtk::HSeparator* hsepb = Gtk::manage (new Gtk::HSeparator ());
pack_end (*hsepb, Gtk::PACK_SHRINK, 0);
Gtk::HBox* ahbox = Gtk::manage (new Gtk::HBox ());
addBookmark = Gtk::manage (new Gtk::Button ()); // M("HISTORY_NEWSNAPSHOT")
setExpandAlignProperties(addBookmark, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);

View File

@@ -61,10 +61,6 @@ Preferences::Preferences (RTWindow *rtwindow)
nb->set_name ("PrefNotebook");
mainBox->pack_start (*nb);
Gtk::HBox* buttonpanel = Gtk::manage (new Gtk::HBox ());
buttonpanel->set_spacing(8);
mainBox->pack_start (*buttonpanel, Gtk::PACK_SHRINK, 0);
Gtk::Button* about = Gtk::manage (new Gtk::Button (M("GENERAL_ABOUT")));
Gtk::Button* ok = Gtk::manage (new Gtk::Button (M("GENERAL_OK")));
Gtk::Button* cancel = Gtk::manage (new Gtk::Button (M("GENERAL_CANCEL")));
@@ -73,9 +69,10 @@ Preferences::Preferences (RTWindow *rtwindow)
ok->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::okPressed) );
cancel->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::cancelPressed) );
buttonpanel->pack_start (*about, Gtk::PACK_SHRINK, 0);
buttonpanel->pack_end (*ok, Gtk::PACK_SHRINK, 0);
buttonpanel->pack_end (*cancel, Gtk::PACK_SHRINK, 0);
get_action_area()->pack_start (*about);
get_action_area()->pack_end (*ok);
get_action_area()->pack_end (*cancel);
nb->append_page (*getGeneralPanel(), M("PREFERENCES_TAB_GENERAL"));
nb->append_page (*getProcParamsPanel(), M("PREFERENCES_TAB_IMPROC"));
nb->append_page (*getFileBrowserPanel(), M("PREFERENCES_TAB_BROWSER"));

View File

@@ -105,17 +105,16 @@ Splash::Splash (Gtk::Window& parent) : Gtk::Dialog(M("GENERAL_ABOUT"), parent, t
releaseNotesSW = nullptr;
nb = Gtk::manage (new Gtk::Notebook ());
nb->set_name ("AboutNotebook");
get_content_area()->pack_start (*nb);
// Add close button to bottom of the notebook
Gtk::Button* closeButton = Gtk::manage (new Gtk::Button (M("GENERAL_CLOSE")));
closeButton->signal_clicked().connect( sigc::mem_fun(*this, &Splash::closePressed) );
Gtk::HBox* bottomHBox = Gtk::manage (new Gtk::HBox ());
bottomHBox->pack_end (*closeButton, Gtk::PACK_SHRINK, 0);
get_content_area()->pack_start (*bottomHBox, Gtk::PACK_SHRINK, 0);
get_action_area()->pack_start (*closeButton, Gtk::PACK_SHRINK, 0);
Glib::RefPtr<Gtk::CssProvider> localCSS = Gtk::CssProvider::create();
localCSS->load_from_data ("textview { font-family: monospace; font-size: 8pt; }");
localCSS->load_from_data ("textview { font-family: monospace; }");
// Tab 1: the image
splashImage = Gtk::manage(new SplashImage ());