Scrollable toolbars has been named, and 'scrollableToolbar' class added

see #4035
This commit is contained in:
Hombre
2018-09-03 23:19:37 +02:00
parent 758299aa2c
commit b226c125ce
3 changed files with 6 additions and 0 deletions

View File

@@ -631,6 +631,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel)
beforeAfterBox->pack_start (*afterBox);
MyScrolledToolbar *stb1 = Gtk::manage(new MyScrolledToolbar());
stb1->set_name("EditorToolbarTop");
stb1->add(*toolBarPanel);
editbox->pack_start (*stb1, Gtk::PACK_SHRINK, 2);
editbox->pack_start (*beforeAfterBox);
@@ -766,6 +767,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel)
iops->attach_next_to (*tbRightPanel_1, Gtk::POS_RIGHT, 1, 1);
MyScrolledToolbar *stb2 = Gtk::manage(new MyScrolledToolbar());
stb2->set_name("EditorToolbarBottom");
stb2->add(*iops);
editbox->pack_start (*stb2, Gtk::PACK_SHRINK, 0);

View File

@@ -129,6 +129,7 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
// if NOT a single row toolbar
if (!options.FileBrowserToolbarSingleRow) {
hbToolBar1STB = Gtk::manage(new MyScrolledToolbar());
hbToolBar1STB->set_name("FileBrowserQueryToolbar");
hbToolBar1STB->add(*hbToolBar1);
pack_start (*hbToolBar1STB, Gtk::PACK_SHRINK, 0);
}
@@ -137,6 +138,7 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
buttonBar = Gtk::manage( new Gtk::HBox () );
buttonBar->set_name ("ToolBarPanelFileBrowser");
MyScrolledToolbar *stb = Gtk::manage(new MyScrolledToolbar());
stb->set_name("FileBrowserIconToolbar");
stb->add(*buttonBar);
pack_start (*stb, Gtk::PACK_SHRINK);
@@ -2057,6 +2059,7 @@ void FileCatalog::updateFBQueryTB (bool singleRow)
if (!hbToolBar1STB) {
removeIfThere(buttonBar, hbToolBar1, false);
hbToolBar1STB = Gtk::manage(new MyScrolledToolbar());
hbToolBar1STB->set_name("FileBrowserQueryToolbar");
hbToolBar1STB->add(*hbToolBar1);
hbToolBar1STB->show();
pack_start (*hbToolBar1STB, Gtk::PACK_SHRINK, 0);

View File

@@ -992,6 +992,7 @@ MyScrolledToolbar::MyScrolledToolbar ()
{
set_policy (Gtk::POLICY_EXTERNAL, Gtk::POLICY_NEVER);
set_propagate_natural_height(true);
get_style_context()->add_class("scrollableToolbar");
}
bool MyScrolledToolbar::on_scroll_event (GdkEventScroll* event)