summaryrefslogtreecommitdiffstats
path: root/src/ui/previewholder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/previewholder.cpp')
-rw-r--r--src/ui/previewholder.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ui/previewholder.cpp b/src/ui/previewholder.cpp
index 21f3f38d7..5e75179a3 100644
--- a/src/ui/previewholder.cpp
+++ b/src/ui/previewholder.cpp
@@ -49,16 +49,20 @@ PreviewHolder::PreviewHolder() :
_wrap(false),
_border(BORDER_NONE)
{
+ set_name( "PreviewHolder" );
_scroller = Gtk::manage(new Gtk::ScrolledWindow());
+ _scroller->set_name( "PreviewHolderScroller" );
((Gtk::ScrolledWindow *)_scroller)->set_policy(Gtk::POLICY_AUTOMATIC,
Gtk::POLICY_AUTOMATIC);
#if WITH_GTKMM_3_0
_insides = Gtk::manage(new Gtk::Grid());
+ _insides->set_name( "PreviewHolderGrid" );
_insides->set_column_spacing(8);
// Add a container with the scroller and a spacer
Gtk::Grid* spaceHolder = Gtk::manage(new Gtk::Grid());
+ spaceHolder->set_name( "PreviewHolderSpaceHolder" );
_scroller->set_hexpand();
_scroller->set_vexpand();
@@ -340,6 +344,12 @@ void PreviewHolder::calcGridSize( const Gtk::Widget* thing, int itemCount, int&
width = itemCount;
height = 1;
+#if GTK_CHECK_VERSION(3,16,0)
+ // Disable overlay scrolling as the scrollbar covers up swatches.
+ // For some reason this also makes the height 55px.
+ ((Gtk::ScrolledWindow *)_scroller)->set_overlay_scrolling(false);
+#endif
+
if ( _anchor == SP_ANCHOR_SOUTH || _anchor == SP_ANCHOR_NORTH ) {
Gtk::Requisition req;
#if GTK_CHECK_VERSION(3,0,0)