Guest User

Untitled

a guest
Jan 19th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.50 KB | None | 0 0
  1. // Controls bottom box
  2. bottom_box_layout = clutter_box_layout_new ();
  3. clutter_box_layout_set_vertical (CLUTTER_BOX_LAYOUT (bottom_box_layout),
  4. FALSE);
  5. bottom_box = clutter_box_new (bottom_box_layout);
  6. clutter_box_layout_set_spacing (CLUTTER_BOX_LAYOUT (bottom_box_layout), 10);
  7.  
  8. clutter_box_pack (CLUTTER_BOX (info_box), bottom_box, "x-fill", TRUE, NULL);
  9.  
  10. // Controls volume box
  11. volume_box_layout = clutter_box_layout_new ();
  12. clutter_box_layout_set_vertical (CLUTTER_BOX_LAYOUT (bottom_box_layout),
  13. FALSE);
  14. ui->volume_box = clutter_box_new (volume_box_layout);
  15. clutter_box_layout_set_spacing (CLUTTER_BOX_LAYOUT (volume_box_layout), 10);
  16.  
  17. clutter_box_pack (CLUTTER_BOX (bottom_box), ui->volume_box, "y-align",
  18. CLUTTER_BOX_ALIGNMENT_CENTER, NULL);
  19.  
  20. // Controls volume low
  21. ui->volume_low = clutter_texture_new_from_file (ui->volume_low_png, &error);
  22. if (!ui->volume_low && error)
  23. g_debug ("Clutter error: %s\n", error->message);
  24. if (error) {
  25. g_error_free (error);
  26. error = NULL;
  27. }
  28. clutter_box_pack (CLUTTER_BOX (ui->volume_box), ui->volume_low, "x-align",
  29. CLUTTER_BOX_ALIGNMENT_START, NULL);
  30.  
  31. // Controls volume intensity
  32. vol_int_box_layout =
  33. clutter_bin_layout_new (CLUTTER_BIN_ALIGNMENT_FIXED,
  34. CLUTTER_BIN_ALIGNMENT_FIXED);
  35. vol_int_box = clutter_box_new (vol_int_box_layout);
  36.  
  37. ui->vol_int_bg = clutter_rectangle_new_with_color (&control_color1);
  38. clutter_container_add_actor (CLUTTER_CONTAINER (vol_int_box), ui->vol_int_bg);
  39.  
  40. ui->vol_int = clutter_rectangle_new_with_color (&control_color1);
  41. clutter_container_add_actor (CLUTTER_CONTAINER (vol_int_box), ui->vol_int);
  42.  
  43. clutter_box_pack (CLUTTER_BOX (ui->volume_box), vol_int_box, "x-fill",
  44. FALSE, "y-fill", FALSE, "y-align", CLUTTER_BOX_ALIGNMENT_CENTER, NULL);
  45.  
  46. // Controls volume high
  47. ui->volume_high = clutter_texture_new_from_file (ui->volume_high_png, &error);
  48. if (!ui->volume_high && error)
  49. g_debug ("Clutter error: %s\n", error->message);
  50. if (error) {
  51. g_error_free (error);
  52. error = NULL;
  53. }
  54. clutter_box_pack (CLUTTER_BOX (ui->volume_box), ui->volume_high, "x-align",
  55. CLUTTER_BOX_ALIGNMENT_END, NULL);
  56.  
  57. // Controls position text
  58. duration_str = g_strdup_printf ("0:00:00/%s", ui->duration_str);
  59. ui->control_pos = clutter_text_new_full ("Sans 22px", duration_str,
  60. &control_color1);
  61. clutter_box_pack (CLUTTER_BOX (bottom_box), ui->control_pos, "x-align",
  62. CLUTTER_BOX_ALIGNMENT_END, NULL);
Add Comment
Please, Sign In to add comment