~ubuntu-branches/ubuntu/maverick/unity/maverick

« back to all changes in this revision

Viewing changes to unity-private/launcher/scrollerchild.vala

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-09-17 14:02:54 UTC
  • mfrom: (1.1.17 upstream)
  • Revision ID: james.westby@ubuntu.com-20100917140254-6cbue12klia2f07l
Tags: 0.2.40-0ubuntu1
* New upstream release:
  - Fix inactive menus accessible (LP: #604505)
  - Fix some more memory leaks (LP: #604777, #621690, #628144)
  - Fix weird behaviors of quicklist (LP: #617339)
  - Provide an "open this folder" button (LP: #633201)
  - Hidden menu causing gap (LP: #600191)
  - Cannot go fullscreen for flash videos (LP: #631381)
  - Can't access menu items from the keyboard (LP: #636728)
  - Don't register for MDRAGs since they aren't used (LP: #632613)
  - Don't run indicator on special launchers (LP: #627488)
  - Center arrows position in folded launcher tiles (LP: #633084)
  - Launcher icons first appear as white upon login (LP: #601093)
  - Removes jittering when rubber band is in use on the launcher (LP: #632991)
  - Mutter restarts on closing almost any application (LP: #634701)
  - Can't launch apps like synaptic with root privileges from launch bar
    (LP: #599298)
  - Launcher tile dragging shouldn't be masked (LP: #631443)
  - Fix Carousel-ed icons have distorted perspective (LP: #607515)
  - Use no longer sync call (LP: #620011)
* update debian/libunity0.symbols

Show diffs side-by-side

added added

removed removed

Lines of Context:
85
85
                opacity);
86
86
    }
87
87
 
88
 
    private UnityIcon processed_icon;
 
88
    public UnityIcon processed_icon;
89
89
    private ThemeImage close_symbol;
90
90
    private ThemeImage active_indicator;
91
91
    private ThemeImage running_indicator_notify;
221
221
        }
222
222
    }
223
223
 
224
 
  private bool previous_close_state = false;
225
 
  private void on_enable_close_state_changed ()
226
 
  {
227
 
    if (enable_close_state == true && previous_close_state == false)
228
 
      {
229
 
        close_symbol.animate (Clutter.AnimationMode.EASE_OUT_CUBIC,
230
 
                              300,
231
 
                              "opacity", 0xff,
232
 
                              "scale-x", 1.0,
233
 
                              "scale-y", 1.0);
234
 
      }
235
 
    else if (enable_close_state == false && previous_close_state == true)
236
 
      {
237
 
        close_symbol.animate (Clutter.AnimationMode.EASE_OUT_CUBIC,
238
 
                              300,
239
 
                              "opacity", 0x00,
240
 
                              "scale-x", 0.0,
241
 
                              "scale-y", 0.0);
242
 
      }
243
 
    previous_close_state = enable_close_state;
244
 
  }
 
224
    private bool previous_close_state = false;
 
225
    private void on_enable_close_state_changed ()
 
226
    {
 
227
      if (enable_close_state == true && previous_close_state == false)
 
228
        {
 
229
          close_symbol.animate (Clutter.AnimationMode.EASE_OUT_CUBIC,
 
230
                                300,
 
231
                                "opacity", 0xff,
 
232
                                "scale-x", 1.0,
 
233
                                "scale-y", 1.0);
 
234
        }
 
235
      else if (enable_close_state == false && previous_close_state == true)
 
236
        {
 
237
          close_symbol.animate (Clutter.AnimationMode.EASE_OUT_CUBIC,
 
238
                                300,
 
239
                                "opacity", 0x00,
 
240
                                "scale-x", 0.0,
 
241
                                "scale-y", 0.0);
 
242
        }
 
243
      previous_close_state = enable_close_state;
 
244
    }
245
245
 
246
246
    /* alpha helpers */
247
247
    private static float get_ease_out_sine (float alpha)
465
465
          effect_drop_shadow.set_opacity (0.4f);
466
466
          this.effect_drop_shadow.set_margin (5);
467
467
          this.processed_icon.add_effect (effect_drop_shadow);
468
 
 
 
468
          this.processed_icon.set_scale (0.0f, 0.0f);
 
469
          this.processed_icon.scale_gravity = Clutter.Gravity.CENTER;
 
470
          this.processed_icon.animate (Clutter.AnimationMode.EASE_OUT_CUBIC,
 
471
                                       300,
 
472
                                       "scale-x", 1.0,
 
473
                                       "scale-y", 1.0);
469
474
          do_queue_redraw ();
470
475
        }
471
476
    }
488
493
    {
489
494
      uint target_opacity = 0;
490
495
      if (active)
 
496
        target_opacity = 255;
 
497
 
 
498
      if (active && running)
491
499
        {
492
 
          target_opacity = 255;
493
500
          running_indicator_notify.animate (Clutter.AnimationMode.EASE_IN_QUAD,
494
501
                                            150,
495
502
                                            "opacity", 0x00);
620
627
 
621
628
      Clutter.ActorBox child_box = Clutter.ActorBox ();
622
629
 
 
630
      // if we are rotated negatively, we need to work 'backwards'
 
631
      float midpoint = 0;
 
632
 
623
633
      //allocate the running indicator first
624
634
      float width, height, n_width, n_height;
625
635
      running_indicator.get_preferred_width (58, out n_width, out width);
626
636
      running_indicator.get_preferred_height (58, out n_height, out height);
 
637
      midpoint = (processed_icon.stored_height - height) / 2.0f;
 
638
      if (rotation > 0)
 
639
        midpoint = box.get_height () - midpoint - processed_icon.stored_ymod;
 
640
 
627
641
      child_box.x1 = 0;
628
 
      child_box.y1 = (box.get_height () - height) / 2.0f;
 
642
      child_box.y1 = midpoint;
 
643
      //child_box.y1 = (box.get_height () - height) / 2.0f;
629
644
      child_box.x2 = child_box.x1 + width;
630
645
      child_box.y2 = child_box.y1 + height;
631
646
      running_indicator.allocate (child_box, flags);
636
651
      processed_icon.get_preferred_width (48, out width, out n_width);
637
652
      processed_icon.get_preferred_height (48, out height, out n_height);
638
653
      child_box.x1 = grabbed_push + (box.get_width () - width) / 2.0f;
639
 
      child_box.y1 = y;
 
654
      child_box.y1 = 0;
640
655
      child_box.x2 = child_box.x1 + 48;
641
656
      child_box.y2 = child_box.y1 + height;
642
657
      processed_icon.allocate (child_box, flags);
644
659
      //allocate the active indicator
645
660
      active_indicator.get_preferred_width (48, out n_width, out width);
646
661
      active_indicator.get_preferred_height (48, out n_height, out height);
 
662
      midpoint = (processed_icon.stored_height - height) / 2.0f;
 
663
      if (rotation > 0)
 
664
        midpoint = box.get_height () - midpoint - processed_icon.stored_ymod;
 
665
 
647
666
      child_box.x1 = box.get_width () - width;
648
 
      child_box.y1 = (box.get_height () - height) / 2.0f;
 
667
      child_box.y1 = midpoint;
649
668
      child_box.x2 = child_box.x1 + width;
650
669
      child_box.y2 = child_box.y1 + height;
651
670
      active_indicator.allocate (child_box, flags);