diff options
author | Carl Hetherington <carl@carlh.net> | 2011-01-03 03:10:43 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-01-03 03:10:43 +0000 |
commit | cf45b07f73c9b2c8d19365d27b4f8f5004822095 (patch) | |
tree | 8d019dbc9b06f0e4b78eda878350c19fcda00a3d /libs/gtkmm2ext/gtkmm2ext | |
parent | 6ea84edab278854bca473f46639c44f494a2e1c6 (diff) |
Somewhat experimental fix to try to stop the editor window jumping around on small screens.
git-svn-id: svn://localhost/ardour2/branches/3.0@8412 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/gtkmm2ext/gtkmm2ext')
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/trimming_bin.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/libs/gtkmm2ext/gtkmm2ext/trimming_bin.h b/libs/gtkmm2ext/gtkmm2ext/trimming_bin.h new file mode 100644 index 0000000000..4566d71cba --- /dev/null +++ b/libs/gtkmm2ext/gtkmm2ext/trimming_bin.h @@ -0,0 +1,24 @@ +#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 &); +}; + +} |