#include <gtk/gtk.h>

#define N_LEVELS 4

int main(int argc, char **argv)
{
  gtk_init (&argc, &argv);

  GtkCssProvider *css_provider = gtk_css_provider_new ();
  gtk_css_provider_load_from_data (css_provider,
    "frame > border { background-color: rgba(0, 0, 0, 0.2); }", -1, NULL);

  gtk_style_context_add_provider_for_screen (gdk_screen_get_default (),
                                             GTK_STYLE_PROVIDER (css_provider),
                                             GTK_STYLE_PROVIDER_PRIORITY_USER);

  GtkWidget *containers[N_LEVELS];
  for (unsigned i = 0; i < N_LEVELS; ++i)
    {
      containers[i] = gtk_frame_new (g_strdup_printf ("%i", i));
      gtk_container_set_border_width (GTK_CONTAINER (containers[i]), 6);

      if (i > 0)
        gtk_container_add (GTK_CONTAINER (containers[i - 1]), containers[i]);
    }

  GtkWidget *scale = gtk_scale_new_with_range (GTK_ORIENTATION_VERTICAL,
                                               0, 100, 1);
  gtk_widget_set_size_request (scale, 42, 127);

  GtkWidget *check_button = gtk_check_button_new_with_label ("GtkCheckButton");

  GtkWidget *box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
  gtk_container_add (GTK_CONTAINER (box), scale);
  gtk_container_add (GTK_CONTAINER (box), check_button);
  gtk_container_add (GTK_CONTAINER (containers[N_LEVELS - 1]), box);

  GtkWidget *window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_container_add (GTK_CONTAINER (window), containers[0]);
  g_signal_connect (G_OBJECT (window), "delete-event",
                    G_CALLBACK(&gtk_main_quit), NULL);
  gtk_widget_show_all (window);

  gtk_main ();
}
