Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Controls bottom box
- bottom_box_layout = clutter_box_layout_new ();
- clutter_box_layout_set_vertical (CLUTTER_BOX_LAYOUT (bottom_box_layout),
- FALSE);
- bottom_box = clutter_box_new (bottom_box_layout);
- clutter_box_layout_set_spacing (CLUTTER_BOX_LAYOUT (bottom_box_layout), 10);
- clutter_box_pack (CLUTTER_BOX (info_box), bottom_box, "x-fill", TRUE, NULL);
- // Controls volume box
- volume_box_layout = clutter_box_layout_new ();
- clutter_box_layout_set_vertical (CLUTTER_BOX_LAYOUT (bottom_box_layout),
- FALSE);
- ui->volume_box = clutter_box_new (volume_box_layout);
- clutter_box_layout_set_spacing (CLUTTER_BOX_LAYOUT (volume_box_layout), 10);
- clutter_box_pack (CLUTTER_BOX (bottom_box), ui->volume_box, "y-align",
- CLUTTER_BOX_ALIGNMENT_CENTER, NULL);
- // Controls volume low
- ui->volume_low = clutter_texture_new_from_file (ui->volume_low_png, &error);
- if (!ui->volume_low && error)
- g_debug ("Clutter error: %s\n", error->message);
- if (error) {
- g_error_free (error);
- error = NULL;
- }
- clutter_box_pack (CLUTTER_BOX (ui->volume_box), ui->volume_low, "x-align",
- CLUTTER_BOX_ALIGNMENT_START, NULL);
- // Controls volume intensity
- vol_int_box_layout =
- clutter_bin_layout_new (CLUTTER_BIN_ALIGNMENT_FIXED,
- CLUTTER_BIN_ALIGNMENT_FIXED);
- vol_int_box = clutter_box_new (vol_int_box_layout);
- ui->vol_int_bg = clutter_rectangle_new_with_color (&control_color1);
- clutter_container_add_actor (CLUTTER_CONTAINER (vol_int_box), ui->vol_int_bg);
- ui->vol_int = clutter_rectangle_new_with_color (&control_color1);
- clutter_container_add_actor (CLUTTER_CONTAINER (vol_int_box), ui->vol_int);
- clutter_box_pack (CLUTTER_BOX (ui->volume_box), vol_int_box, "x-fill",
- FALSE, "y-fill", FALSE, "y-align", CLUTTER_BOX_ALIGNMENT_CENTER, NULL);
- // Controls volume high
- ui->volume_high = clutter_texture_new_from_file (ui->volume_high_png, &error);
- if (!ui->volume_high && error)
- g_debug ("Clutter error: %s\n", error->message);
- if (error) {
- g_error_free (error);
- error = NULL;
- }
- clutter_box_pack (CLUTTER_BOX (ui->volume_box), ui->volume_high, "x-align",
- CLUTTER_BOX_ALIGNMENT_END, NULL);
- // Controls position text
- duration_str = g_strdup_printf ("0:00:00/%s", ui->duration_str);
- ui->control_pos = clutter_text_new_full ("Sans 22px", duration_str,
- &control_color1);
- clutter_box_pack (CLUTTER_BOX (bottom_box), ui->control_pos, "x-align",
- CLUTTER_BOX_ALIGNMENT_END, NULL);
Add Comment
Please, Sign In to add comment