summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0fcf513)
raw | patch | inline | side by side (parent: 0fcf513)
author | joncruz <joncruz@users.sourceforge.net> | |
Fri, 22 Feb 2008 09:28:35 +0000 (09:28 +0000) | ||
committer | joncruz <joncruz@users.sourceforge.net> | |
Fri, 22 Feb 2008 09:28:35 +0000 (09:28 +0000) |
Fixes Bug #168619
src/ui/previewholder.cpp | patch | blob | history |
index da991e1dfc85756e7abf220be1c5ba08325ca41c..ba0b6a7efa31f9aa822b0c17bf2cc1d062d85c1a 100644 (file)
--- a/src/ui/previewholder.cpp
+++ b/src/ui/previewholder.cpp
{
items.clear();
_prefCols = 0;
+ // Kludge to restore scrollbars
+ if ( !_wrap && (_view != VIEW_TYPE_LIST) && (_anchor == Gtk::ANCHOR_NORTH || _anchor == Gtk::ANCHOR_SOUTH) ) {
+ dynamic_cast<Gtk::ScrolledWindow*>(_scroller)->set_policy( Gtk::POLICY_AUTOMATIC, Gtk::POLICY_NEVER );
+ }
rebuildUI();
}
_baseSize = size;
_view = view;
_ratio = ratio;
+ // Kludge to restore scrollbars
+ if ( !_wrap && (_view != VIEW_TYPE_LIST) && (_anchor == Gtk::ANCHOR_NORTH || _anchor == Gtk::ANCHOR_SOUTH) ) {
+ dynamic_cast<Gtk::ScrolledWindow*>(_scroller)->set_policy( Gtk::POLICY_AUTOMATIC, Gtk::POLICY_NEVER );
+ }
rebuildUI();
}
}
// g_message( "on_size_allocate(%d, %d) (%d, %d)", allocation.get_x(), allocation.get_y(), allocation.get_width(), allocation.get_height() );
// g_message(" anchor:%d", _anchor);
Gtk::VBox::on_size_allocate( allocation );
+
+ if ( _insides && !_wrap && (_view != VIEW_TYPE_LIST) && (_anchor == Gtk::ANCHOR_NORTH || _anchor == Gtk::ANCHOR_SOUTH) ) {
+ Gtk::Requisition req;
+ _insides->size_request(req);
+ gint delta = allocation.get_width() - req.width;
+
+ if ( (delta > 4) && req.height < allocation.get_height() ) {
+ dynamic_cast<Gtk::ScrolledWindow*>(_scroller)->set_policy( Gtk::POLICY_NEVER, Gtk::POLICY_NEVER );
+ } else {
+ dynamic_cast<Gtk::ScrolledWindow*>(_scroller)->set_policy( Gtk::POLICY_AUTOMATIC, Gtk::POLICY_NEVER );
+ }
+ }
}
void PreviewHolder::on_size_request( Gtk::Requisition* requisition )