Exemplo n.º 1
0
        private RightClickLabelButton create_button(UserLabel label)
        {
            RightClickLabelButton b = new RightClickLabelButton();
            b.Name = label.metalabel.label;

            Gtk.Alignment box_alignment = new Gtk.Alignment(0, 0, 0, 0);
            Gtk.HBox box = new Gtk.HBox();

            Gtk.Label l = new Gtk.Label(" " + label.metalabel.label);

            Gtk.Image img = label.dot();

            box.Add(img);

            GtkCommon.set_foreground_color(l, new Gdk.Color(label.metalabel.color.r, label.metalabel.color.g, label.metalabel.color.b));

            box.Add(l);

            box_alignment.LeftPadding = 3;
            box_alignment.Add(box);

            b.Add(box_alignment);

            b.BorderWidth = 0;
            b.Relief = Gtk.ReliefStyle.None;

            b.ButtonPressEvent += delegate (object sender, ButtonPressEventArgs args) {
                item_click(args, label, b);
            };

            return b;
        }