Commit 711404e7 authored by Adrien Plazas's avatar Adrien Plazas

heaer-bar: Put the storage rescan button in a revealer

This makes the button take just as much space even when it is hidden,
keeping the space allocated to the squeezer consistent.
parent 610fda12
Pipeline #32947 failed with stage
in 0 seconds
......@@ -63,9 +63,13 @@
</child>
<child>
<object class="GtkButton" id="storage_rescan_button">
<object class="GtkRevealer" id="storage_rescan_revealer">
<property name="visible">False</property>
<property name="no-show-all">True</property>
<property name="reveal-child">True</property>
<child>
<object class="GtkButton" id="storage_rescan_button">
<property name="visible">true</property>
<signal name="clicked" handler="on_storage_rescan_button_clicked"/>
<child>
......@@ -75,6 +79,8 @@
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="pack-type">end</property>
</packing>
......
......@@ -47,7 +47,7 @@ namespace Usage
private Gtk.Button storage_back_button;
[GtkChild]
private Gtk.Button storage_rescan_button;
private Gtk.Revealer storage_rescan_revealer;
[GtkChild]
private Gtk.Button storage_select_button;
......@@ -93,7 +93,7 @@ namespace Usage
break;
case HeaderBarMode.STORAGE:
storage_back_button.hide ();
storage_rescan_button.hide ();
storage_rescan_revealer.hide ();
storage_select_button.hide ();
storage_cancel_button.hide ();
break;
......@@ -111,7 +111,7 @@ namespace Usage
else
show_title();
storage_rescan_button.show ();
storage_rescan_revealer.show ();
storage_select_button.hide ();
break;
......@@ -145,7 +145,7 @@ namespace Usage
view_switcher.show ();
storage_select_button.hide ();
storage_rescan_button.hide ();
storage_rescan_revealer.reveal_child = false;
storage_back_button.hide ();
StorageAnalyzer.get_default().create_cache.begin(true);
......@@ -203,8 +203,7 @@ namespace Usage
public void show_storage_rescan_button(bool show)
{
show &= mode == HeaderBarMode.STORAGE;
storage_rescan_button.visible = show;
storage_rescan_revealer.reveal_child = show;
}
public void show_storage_select_button(bool show)
......@@ -229,7 +228,7 @@ namespace Usage
{
if(show)
{
storage_rescan_button.hide ();
storage_rescan_revealer.hide ();
storage_select_button.hide ();
storage_back_button.hide();
storage_cancel_button.show();
......@@ -263,7 +262,7 @@ namespace Usage
{
storage_back_button.show ();
storage_rescan_button.show ();
storage_rescan_revealer.show ();
storage_select_button.hide ();
storage_cancel_button.hide();
storage_selection_menu = null;
......
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