Exemplo n.º 1
0
void
rut_fold_set_folded(rut_fold_t *fold, bool folded)
{
    if (fold->folded == folded || fold->child == NULL)
        return;

    if (folded) {
        rut_fixed_remove_child(fold->fold_icon_shim, fold->fold_down_icon);
        rut_fixed_add_child(fold->fold_icon_shim, fold->fold_up_icon);
        rut_box_layout_remove(fold->vbox, fold->child);
    } else {
        rut_fixed_remove_child(fold->fold_icon_shim, fold->fold_up_icon);
        rut_fixed_add_child(fold->fold_icon_shim, fold->fold_down_icon);
        rut_box_layout_add(fold->vbox, true, fold->child);
    }

    fold->folded = folded;

    rut_shell_queue_redraw(fold->shell);
}
Exemplo n.º 2
0
Arquivo: rut-fold.c Projeto: cee1/rig
void
rut_fold_set_folded (RutFold *fold, CoglBool folded)
{
  if (fold->folded == folded || fold->child == NULL)
    return;

  if (folded)
    {
      rut_fixed_remove_child (fold->fold_icon_shim, fold->fold_down_icon);
      rut_fixed_add_child (fold->fold_icon_shim, fold->fold_up_icon);
      rut_box_layout_remove (fold->vbox, fold->child);
    }
  else
    {
      rut_fixed_remove_child (fold->fold_icon_shim, fold->fold_up_icon);
      rut_fixed_add_child (fold->fold_icon_shim, fold->fold_down_icon);
      rut_box_layout_add (fold->vbox, TRUE, fold->child);
    }

  fold->folded = folded;

  rut_shell_queue_redraw (fold->context->shell);
}