Пример #1
0
 private void OnSizeRequested(object sender, Gtk.SizeRequestedArgs args)
 {
     if ((this.child != null))
     {
         args.Requisition = this.child.SizeRequest();
     }
 }
Пример #2
0
        private void HeaderSizeRequested(object obj, Gtk.SizeRequestedArgs args)
        {
            Gtk.Requisition req      = args.Requisition;
            Gtk.Requisition labelReq = headerExpander.ChildRequisition;

            req.Height = (int)(labelReq.Height * 1.5);

            int icon_height, icon_width;

            if (Gtk.Icon.SizeLookup(Gtk.IconSize.Button, out icon_height, out icon_width) && req.Height < icon_height * 1.5)
            {
                req.Height = (int)(icon_height * 1.5);
            }

            args.Requisition = req;
        }