Commit d2c54544 authored by Adrien Plazas's avatar Adrien Plazas
Browse files

storage-view: Replace the GtkPaned by a HdyLeaflet

This makes the switcher hide itself if the window is too narrow, helping
the window to fit phone screens.
parent afd1b7d1
......@@ -20,14 +20,18 @@
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkPaned" id="paned">
<object class="HdyLeaflet" id="leaflet">
<property name="visible">True</property>
<property name="orientation">horizontal</property>
<property name="position">300</property>
<property name="mode-transition-type">slide</property>
<property name="visible-child">scrolled_window</property>
<child>
<object class="GtkScrolledWindow" id="scrolled_window">
<property name="visible">True</property>
<property name="hexpand">False</property>
<property name="hexpand-set">True</property>
<property name="vexpand">True</property>
<property name="width-request">300</property>
</object>
</child>
</object>
......
......@@ -37,7 +37,7 @@ namespace Usage
private Gtk.ScrolledWindow scrolled_window;
[GtkChild]
private Gtk.Paned paned;
private Hdy.Leaflet leaflet;
public StorageView ()
{
......@@ -49,7 +49,10 @@ namespace Usage
scrolled_window.add(storage_list_box);
var graph = new StorageGraph();
paned.add2(graph);
graph.hexpand = true;
graph.vexpand = true;
graph.width_request = 300;
leaflet.add(graph);
action_bar = new StorageActionBar();
revealer.add(action_bar);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment