From 0f2d68221673a94eb2d64701a7b1d23278d4a439 Mon Sep 17 00:00:00 2001 From: Bryan Schumaker Date: Sun, 6 Nov 2011 20:33:47 -0500 Subject: [PATCH] ocarina: Split buttons over two rows The single row was getting somewhat long, so I split them up. --- ocarina/footer/controls.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/ocarina/footer/controls.cpp b/ocarina/footer/controls.cpp index cec485d6..1d901615 100644 --- a/ocarina/footer/controls.cpp +++ b/ocarina/footer/controls.cpp @@ -5,20 +5,29 @@ static GtkWidget *controls = NULL; -static GtkWidget *make_buttons() +static GtkWidget *make_bottom_row() { GtkWidget *buttons = gtk_hbox_new(FALSE, 0); gtk_widget_show(buttons); - box_pack_end(buttons, make_volume_button(), FALSE, FALSE, 0); box_pack_end(buttons, make_next_button(), FALSE, FALSE, 0); box_pack_end(buttons, make_stop_button(), FALSE, FALSE, 0); box_pack_end(buttons, make_pause_button(), FALSE, FALSE, 0); box_pack_end(buttons, make_play_button(), FALSE, FALSE, 0); box_pack_end(buttons, make_forward_button(), FALSE, FALSE, 0); box_pack_end(buttons, make_rewind_button(), FALSE, FALSE, 0); + + return buttons; +} + +static GtkWidget *make_top_row() +{ + GtkWidget *buttons = gtk_hbox_new(FALSE, 0); + + box_pack_end(buttons, make_volume_button(), FALSE, FALSE, 0); box_pack_end(buttons, make_open_button(), FALSE, FALSE, 0); + gtk_widget_show_all(buttons); return buttons; } @@ -27,7 +36,8 @@ static void make_controls() controls = gtk_vbox_new(FALSE, 0); gtk_widget_show(controls); - box_pack_start(controls, make_buttons(), FALSE, FALSE, 0); + box_pack_start(controls, make_top_row(), FALSE, FALSE, 0); + box_pack_start(controls, make_bottom_row(), FALSE, FALSE, 0); } GtkWidget *get_controls()