示例#1
0
 public void disappear()
 {
     custom_image.Hide();
     custom_label.Hide();
     dec_width = width;
     GLib.Timeout.Add(2, decreassing_size);
 }
示例#2
0
        public AnimatedButton(string label, bool from_zero)
        {
            custom_hbox  = new Gtk.HBox();
            custom_label = new Gtk.Label(label);

            custom_label.LineWrap      = true;
            custom_label.LineWrapMode  = Pango.WrapMode.Word;
            custom_label.MaxWidthChars = 30;

            custom_image        = new Gtk.Image();
            custom_image.Pixbuf = Gdk.Pixbuf.LoadFromResource("llum.arrow.svg");

            custom_hbox.PackStart(custom_image, false, false, 5);
            custom_hbox.PackStart(custom_label, false, false, 5);



            custom_hbox.ShowAll();
            custom_image.Hide();
            custom_label.Hide();

            this.Add(custom_hbox);



            height    = 50;
            width     = 150;
            dec_width = width;

            this.Show();

            if (!from_zero)
            {
                this.SetSizeRequest(width, height);
            }
            else
            {
                appear();
            }
        }