Inheritance: EventBox
Exemplo n.º 1
0
        private void BuildPrimaryLayout ()
        {
            primary_vbox = new VBox ();

            BuildHeader ();
            BuildViews ();
            BuildFooter ();

            search_entry_align = new Alignment (1.0f, 0.5f, 0f, 0f);
            var box = new HBox () { Spacing = 2 };
            var grabber = new GrabHandle ();
            grabber.ControlWidthOf (view_container.SearchEntry, 150, 350, false);
            box.PackStart (grabber, false, false, 0);
            box.PackStart (view_container.SearchEntry, false, false, 0);
            search_entry_align.Child = box;

            ActionService.PopulateToolbarPlaceholder (header_toolbar, "/HeaderToolbar/SearchEntry", search_entry_align);
            search_entry_align.Visible = view_container.SearchSensitive = true;
            search_entry_align.ShowAll ();

            primary_vbox.Show ();
            Add (primary_vbox);
        }
Exemplo n.º 2
0
        private void BuildPrimaryLayout()
        {
            primary_vbox = new VBox ();

            BuildHeader ();
            BuildViews ();
            BuildFooter ();

            search_entry_align = new Alignment (1.0f, 0.5f, 0f, 0f);
            var box = new HBox () { Spacing = 2 };
            var grabber = new GrabHandle ();
            var search_entry = view_container.SearchEntry;
            grabber.ControlWidthOf (search_entry, 150, 350, false);

            int search_entry_width = SearchEntryWidth.Get ();

            // -1 indicates that height should be preserved
            search_entry.SetSizeRequest (search_entry_width, -1);

            search_entry.SizeAllocated += (o, a) => {
                SearchEntryWidth.Set (search_entry.Allocation.Width);
            };

            box.PackStart (grabber, false, false, 0);
            box.PackStart (view_container.SearchEntry, false, false, 0);
            search_entry_align.Child = box;

            ActionService.PopulateToolbarPlaceholder (header_toolbar, "/HeaderToolbar/SearchEntry", search_entry_align);
            search_entry_align.Visible = view_container.SearchSensitive = true;
            search_entry_align.ShowAll ();

            primary_vbox.Show ();
            Add (primary_vbox);
        }