ocarina: Add a separator to the footer
I think the separator looks better, and helps to show where the songlist ends and the footer begins.
This commit is contained in:
parent
c06106bff8
commit
66a3ca63e6
|
@ -4,29 +4,40 @@
|
|||
|
||||
static GtkWidget *footer = NULL;
|
||||
|
||||
static void footer_pack(GtkWidget *widget)
|
||||
static void add_controls()
|
||||
{
|
||||
box_pack_end(footer, widget, FALSE, FALSE, 0);
|
||||
GtkWidget *controls = gtk_hbox_new(FALSE, 0);
|
||||
gtk_widget_show(controls);
|
||||
|
||||
box_pack_end(controls, make_volume_button(), FALSE, FALSE, 0);
|
||||
box_pack_end(controls, make_stop_button(), FALSE, FALSE, 0);
|
||||
box_pack_end(controls, make_pause_button(), FALSE, FALSE, 0);
|
||||
box_pack_end(controls, make_play_button(), FALSE, FALSE, 0);
|
||||
box_pack_end(controls, make_forward_button(), FALSE, FALSE, 0);
|
||||
box_pack_end(controls, make_rewind_button(), FALSE, FALSE, 0);
|
||||
box_pack_end(controls, make_open_button(), FALSE, FALSE, 0);
|
||||
|
||||
box_pack_start(footer, controls, FALSE, FALSE, 0);
|
||||
}
|
||||
|
||||
static void make_tiny_footer()
|
||||
static void make_footer()
|
||||
{
|
||||
footer = gtk_hbox_new(FALSE, 0);
|
||||
gtk_widget_show(footer);
|
||||
GtkWidget *sep = gtk_hseparator_new();
|
||||
footer = gtk_vbox_new(FALSE, 0);
|
||||
box_pack_start(footer, sep, FALSE, FALSE, 0);
|
||||
|
||||
footer_pack(make_volume_button());
|
||||
footer_pack(make_stop_button());
|
||||
footer_pack(make_pause_button());
|
||||
footer_pack(make_play_button());
|
||||
footer_pack(make_forward_button());
|
||||
footer_pack(make_rewind_button());
|
||||
footer_pack(make_open_button());
|
||||
/*
|
||||
* The pause button begins life hidden, so show everything up until
|
||||
* this point, and then add the controls
|
||||
*/
|
||||
gtk_widget_show_all(footer);
|
||||
add_controls();
|
||||
}
|
||||
|
||||
GtkWidget *get_footer()
|
||||
{
|
||||
if (footer == NULL)
|
||||
make_tiny_footer();
|
||||
make_footer();
|
||||
g_object_ref(footer);
|
||||
return footer;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue