, automation_mode_button (_("mode"))
, global_automation_button (_("automation"))
+ , _toolbar_viewport (*manage (new Gtk::Adjustment (0, 0, 1e10)), *manage (new Gtk::Adjustment (0, 0, 1e10)))
, midi_panic_button (_("Panic"))
#ifdef WITH_CMT
toolbar_base.set_name ("ToolBarBase");
toolbar_base.add (toolbar_hbox);
- _toolbar_trimmer.add (toolbar_base);
+ _toolbar_viewport.add (toolbar_base);
+ /* stick to the required height but allow width to vary if there's not enough room */
+ _toolbar_viewport.set_size_request (1, -1);
toolbar_frame.set_shadow_type (SHADOW_OUT);
toolbar_frame.set_name ("BaseFrame");
- toolbar_frame.add (_toolbar_trimmer);
+ toolbar_frame.add (_toolbar_viewport);
DPIReset.connect (sigc::mem_fun (*this, &Editor::resize_text_widgets));
}
#include "gtkmm2ext/selector.h"
#include "gtkmm2ext/click_box.h"
#include "gtkmm2ext/dndtreeview.h"
-#include "gtkmm2ext/trimming_bin.h"
#include "pbd/stateful.h"
#include "pbd/signals.h"
Gtk::HBox toolbar_hbox;
Gtk::EventBox toolbar_base;
Gtk::Frame toolbar_frame;
- Gtkmm2ext::TrimmingBin _toolbar_trimmer;
+ Gtk::Viewport _toolbar_viewport;
/* midi toolbar */
+++ /dev/null
-#include <gtkmm/scrolledwindow.h>
-
-namespace Gtkmm2ext {
-
-/** A somewhat specialised adaption of Gtk::ScrolledWindow which is the same,
- * except that the scrollbars are never visible. It is useful for long toolbars
- * which may not fit horizontally on smaller screens; it lets them extend off the
- * right-hand side of the screen without causing the parent window to jump around.
- *
- * It is not the same as a Gtk::ScrolledWindow with policies to never display
- * scrollbars, as these do not behave as we require in this case.
- *
- * It is hard-wired to perform as if it were a Gtk::ScrolledWindow with a
- * vertical scrollbar policy of POLICY_NEVER and a horizontal policy of
- * POLICY_AUTOMATIC. This could be generalised.
- */
-class TrimmingBin : public Gtk::ScrolledWindow
-{
-public:
- void on_size_request (Gtk::Requisition *);
- void on_size_allocate (Gtk::Allocation &);
-};
-
-}
+++ /dev/null
-#include <iostream>
-#include "gtkmm2ext/trimming_bin.h"
-
-using namespace std;
-using namespace Gtkmm2ext;
-
-void
-TrimmingBin::on_size_request (Gtk::Requisition* r)
-{
- Gtk::ScrolledWindow::on_size_request (r);
-
- /* Munge the height request so that it is that of the child;
- the Gtk::ScrolledWindow's request may include space for
- a horizontal scrollbar, which we will never show.
- */
-
- Gtk::Widget* c = get_child ();
- if (c && c->is_visible ()) {
- Gtk::Requisition cr;
- c->size_request (cr);
- r->height = cr.height;
- }
-}
-
-void
-TrimmingBin::on_size_allocate (Gtk::Allocation& a)
-{
- /* We replace Gtk::ScrolledWindow's on_size_allocate with this
- which accepts what we are given and forces the child to use
- the same allocation (which may result in it being shrunk).
- */
-
- set_allocation (a);
- Widget* c = get_child ();
- if (c && c->is_visible ()) {
- c->size_allocate (a);
- }
-}
'tearoff.cc',
'textviewer.cc',
'treeutils.cc',
- 'trimming_bin.cc',
'utils.cc',
'version.cc',
'window_title.cc'