network: Wrap panel in a scrolled window

After introducing the new single-column layout,
we can easily hit the case where there are too
many connections and/or devices and the panel
gets way too tall.

To fix that, wrap all the widgets inside a
scrolled window that only scrolls vertically.

https://bugzilla.gnome.org/show_bug.cgi?id=785581
This commit is contained in:
Georges Basile Stavracas Neto 2017-07-16 14:55:32 -03:00 committed by Rui Matos
parent e35ecd5468
commit a87d804fa2

View file

@ -28,19 +28,34 @@
<template class="CcNetworkPanel" parent="CcPanel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin">6</property>
<child>
<object class="GtkBox" id="main_box">
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">12</property>
<property name="orientation">vertical</property>
<property name="hscrollbar_policy">never</property>
<child>
<object class="GtkViewport">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">3</property>
<property name="spacing">12</property>
<property name="margin">18</property>
<property name="orientation">vertical</property>
<property name="halign">center</property>
<property name="valign">start</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">12</property>
<property name="orientation">vertical</property>
<property name="width_request">350</property>
<!-- Each GtkBox below will contain GtkStacks from the NetDevices -->
<child>
@ -73,6 +88,11 @@
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</template>