visualizer-view: add helper viewport for scrolling

We can avoid using the inline scrollbar in favor of overlay
scrolling if we bridge the adjustment into the GtkViewport.
This sadly requires us to subclass things to get it just
right.
This commit is contained in:
Christian Hergert
2016-10-03 16:08:13 -07:00
parent 59cbd8fc3f
commit 8d8c879384
5 changed files with 171 additions and 23 deletions

View File

@ -17,24 +17,23 @@
<property name="visible">true</property>
<child>
<object class="GtkScrolledWindow">
<!-- Horizontal scrolling is handled by @scrollbar -->
<property name="hscrollbar-policy">never</property>
<property name="visible">true</property>
<property name="hadjustment">scroll_adjustment</property>
<property name="propagate-natural-height">true</property>
<property name="vexpand">true</property>
<property name="visible">true</property>
<child>
<object class="SpVisualizerList" id="list">
<object class="SpViewport">
<property name="visible">true</property>
<property name="hadjustment">scroll_adjustment</property>
<child>
<object class="SpVisualizerList" id="list">
<property name="visible">true</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkScrollbar" id="scrollbar">
<property name="adjustment">scroll_adjustment</property>
<property name="orientation">horizontal</property>
</object>
</child>
</object>
</child>
</object>